Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify implicit anchoring for CSS anchor positioning #2

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

xiaochengh
Copy link
Collaborator

No description provided.

@josepharhar josepharhar merged commit 76dae79 into popup Nov 23, 2022
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 24, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
@xiaochengh xiaochengh deleted the popup.anchor branch November 28, 2022 19:06
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 28, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 28, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 29, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 29, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 29, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 30, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 1, 2022
Spec:
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 1/2 patch implementing implicit anchoring for popovers,
focusing on the DOM-related changes.

The objective is to mark which elements are used as implicit anchors
by popovers. This will be consumed by the followup patch
crrev.com/c/4053342

Change details:
- element.* & element_rare_data.*: Added a counter for the number of
  popovers currently using this element as the anchor
- popover_data.h:
  * Added storage for the current anchor element
  * Also added an IdTargetObserver subclass to get a callback when
    then `anchor` attribute target of a popover has changed
- html_element.*: Maintains the data added above on relevant DOM
  changes

Bug: 1307772, 1380112
Change-Id: I6718483998a9894b227a42c919e0726dfbbd67de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053423
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078248}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 1, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 11, 2022
…licit anchoring (2/2), a=testonly

Automatic update from web-platform-tests
[popover][anchor-position] Implement implicit anchoring (2/2)

- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}

--

wpt-commits: 5779697c61de040d9f462342276015704031e001
wpt-pr: 37129
BruceDai pushed a commit to BruceDai/wpt that referenced this pull request Dec 13, 2022
- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Dec 14, 2022
…licit anchoring (2/2), a=testonly

Automatic update from web-platform-tests
[popover][anchor-position] Implement implicit anchoring (2/2)

- https://drafts.csswg.org/css-anchor-1/#implicit-anchor-element
- josepharhar/html#2

This is the 2/2 patch implementing implicit anchoring for popovers,
focusing on layout-level changes.

With the info of which elements are used as implicit anchors, this
patch adds the implicit anchors into NG*AnchorQuery with LayoutObject
as keys, so that implicit anchor queries can be evaluated without an
anchor name.

At a more detailed level, now all the NG*AnchorQuery classes need to
maintain two hashmaps: one keyed by names for the named anchors, and
the other keyed by LayoutObjects for the implicit anchors. To reduce
code verbosity, the common structure of these classes is abstracted
into a base class NGAnchorQueryBase.

Bug: 1307772, 1380112
Change-Id: I9bdec5e3c08f9b9b20442503dedf32995643f037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053342
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078270}

--

wpt-commits: 5779697c61de040d9f462342276015704031e001
wpt-pr: 37129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants