Closed Bug 1799032 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 36810 - [anchor-position] Resolve tree-scoped anchor references in NGAnchorQuery

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 36810 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36810
Details from upstream follow.

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

[anchor-position] Resolve tree-scoped anchor references in NGAnchorQuery

WIP need tests

This patch makes NG*AnchorQuery to resolve tree-scoped anchor
references. In particular:

  • A common base class NGAnchorQueryBase is introduced for all
    NG*AnchorQuery classes, because they maintain a common
    scoped_name -> reference mapping relationship
  • To make it aware of tree scope:
    • The structure is a map-of-maps, where the the first map is
      keyed by tree scope, and the second keyed by anchor names
    • To handle anchor names defined by non-author style, an
      additional name -> reference map is maintained
  • Then the current methods of the existing NG*AnchorQuery classes
    are changed from using AtomicString to ScopedCSSName as the
    scoped anchor name

See also previous patches:

  • crrev.com/c/3984835: Make anchor names tree-scoped
  • crrev.com/c/3985707: Make anchor() and anchor-size() tree-scoped

Bug: 1309178
Change-Id: Ib377c9dd00b42252add374266c1620ed41bb65f2
Reviewed-on: https://chromium-review.googlesource.com/3989498
WPT-Export-Revision: 54c5671efa070750fc86dad9bdced2642a164a00

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
PASS: 1
FAIL: 1

Chrome

OK : 1
PASS: 2

Safari

OK : 1
PASS: 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dab466ec87fa
[wpt PR 36810] - [anchor-position] Resolve tree-scoped anchor references in NGAnchorQuery, a=testonly
https://hg.mozilla.org/integration/autoland/rev/981776dbbe62
[wpt PR 36810] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.