Closed Bug 2063785 Opened 23 days ago Closed 10 days ago

When anchor has IB-split, anchor() and anchor-size() consider only the first inline fragments

Categories

(Core :: Layout: Positioned, defect)

defect

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug, Whiteboard: anchor-positioning-transform-triage, [wptsync upstream])

User Story

user-impact-score:100

Attachments

(2 files)

Load the attached Testcase #1.

Expected results:
The green rectangle covers all the text. Google Chrome and Safari both have the expected results.

Actual results:
The green rectangle covers only "ipsum dolor".

Whiteboard: anchor-positioning-transform-triage
See Also: → 2010760
Blocks: 2010760
User Story: (updated)
No longer blocks: 2010760
See Also: → 2066179

This allows an anchor element that is IB-split to return a correct
union rect so that anchor functions resolve against the anchor's
entire bounding rect, rather than only the first inline fragment.

This patch follows Chrome's and Safari's behavior of unioning the
MozBlockInsideInlineWrapper rects. That is, we do not drill into
the wrapper to find the rects of the real block children.
anchor-position-inline-008.html tests that by adding explicit
width to the block child under anchor.

Note that calling getBoundingClientRect() for inline element that
has IB-split will drill into the block wrapper. This internal
inconsistency is tracked in Bug 2066179.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Pushed by aethanyc@gmail.com: https://github.com/mozilla-firefox/firefox/commit/61f357d29efb https://hg.mozilla.org/integration/autoland/rev/f9494577f9d6 Union IB-split sibling rects in GetCombinedFragmentRects(). r=layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 10 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62318 for changes under testing/web-platform/tests

Whiteboard: anchor-positioning-transform-triage → anchor-positioning-transform-triage, [wptsync upstream]

Upstream PR merged by moz-wptsync-bot

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: