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

[popover][anchor-position] Implement implicit anchoring (2/2) #37129

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Nov 24, 2022

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4053342 branch 11 times, most recently from 0a083ef to 747b728 Compare December 1, 2022 20:56
- 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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants