Closed Bug 1987926 Opened 4 months ago Closed 4 months ago

Anchor Lookup Should Not Cross Shadow Boundaries

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Points:
1

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: dshin, Assigned: jari)

References

(Blocks 1 open bug)

Details

(Whiteboard: [anchorpositioning:m2])

Attachments

(1 file)

Expected to work as of bug 1924200.

Jari, would you be able to take a look at this?

Flags: needinfo?(jjalkanen)

I think this is a side effect of missing this little part of the spec:

The anchor name is a tree-scoped name, while anchor spec is a tree-scoped reference.

This means we probably require keeping track of shadow root/document root of the declaration. From my experience with @scope and implicit root, this could get tricky, esp. due to shadow DOM stylesheet sharing - See changes associated with this code.

We could cheat and block referencing anchors across shadow boundaries, but then /css/css-anchor-position/anchor-name-cross-shadow.html would start failing. In fact, that test makes me think that we can't really cheat our way out of tracking the declaration site.

Ok. I am splitting this ticket is two:

  • Disallow anchor references from crossing shadow boundaries altogether (This ticket): We're overly permissive right now. Should change this ASAP.
  • Do the actual tree-scope resolution (Bug 1988038).

This affects our path forward for Bug 1986602 as well.

Blocks: 1986602
Summary: Investigate failures in anchor-name-in-shadow*.html → Anchor Lookup Should Not Cross Shadow Boundaries

I'll look into this.

Assignee: nobody → jjalkanen
Flags: needinfo?(jjalkanen)
See Also: → 1988038
No longer blocks: 1986602
Points: --- → 1
Whiteboard: [anchorpositioning:triage] → [anchorpositioning:m2]
Status: NEW → ASSIGNED
Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/18e76c60d087 https://hg.mozilla.org/integration/autoland/rev/c25bd14e19d9 Anchor lookup should mind cross shadow boundaries. r=layout-anchor-positioning-reviewers,layout-reviewers,dshin
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
QA Whiteboard: [qa-triage-done-c146/b145]
Duplicate of this bug: 1988038
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: