commit | bf5112feaaa4a2cdbcb96ec8a67914f2890ee5ce | [log] [tgz] |
---|---|---|
author | Xiaocheng Hu <xiaochengh@chromium.org> | Wed Jul 20 01:44:51 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 20 01:44:51 2022 |
tree | b4261e54bb7b5c0f01a11d432bc991b8f3f0592b | |
parent | fa8c80de7c2cdfd12f7ad59fe1b66f1d29445058 [diff] |
[anchor-position] Style & layout implementation of anchor-scroll This patch: 1. Adds a new CSS property 'anchor-scroll', to allow an anchor- positioned element to move with its anchor even when the anchor is in a different scroll container. The syntax is anchor-scroll: none | <dashed-ident> 2. Adds LayoutBox::GetAnchorScrollObject(), which returns the layout object of the anchor referred to by the `anchor-scroll` property. The result is queried from the NGPhysicalAnchorQuery structure of the containing block's fragment. 3. To support the calculation, NGPhysical/LogicalAnchorQuery are augmented to store not only the rects, but also the NGPhysicalFragments of the potential anchors. Spec: https://tabatkins.github.io/specs/css-anchor-position/#anchor-scroll Bug: 1309178 Change-Id: If33099efa5a37ca59aa917beb70d7f7686d765d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3756357 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1026056}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.