Closed Bug 1974382 Opened 5 months ago Closed 3 months ago

Anchor resolution visits siblings in incorrect order

Categories

(Core :: Layout: Positioned, defect)

defect

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- wontfix
firefox140 --- wontfix
firefox141 --- wontfix
firefox142 --- wontfix
firefox143 --- fixed

People

(Reporter: jari, Assigned: jari)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [anchorpositioning:m1])

Attachments

(3 files, 1 obsolete file)

Web platform test case [.target 1] is the only one that fails from the file css/css-anchor-position/anchor-position-003.html. In this test case, there are multiple valid anchor divs side by side on the same level in the DOM tree. The last one of them is expected to get chosen, corresponding to the reverse tree order, while in reality the first one of them gets chosen. The outcome of this test is not expected to depend on features that are not yet implemented at this time.

Assignee: nobody → jjalkanen
Status: NEW → ASSIGNED

Anchors with identical names are organized in tree order.
During restyling, the tree undergoes restructuring and the ordering of the frames may go wrong.
With this patch, the adjustments during restyling are recorded and applied only after the tree is ready.

Whiteboard: [anchorpositioning:triage] → [anchorpositioning:m1]

Set release status flags based on info from the regressing bug 1924195

Severity: -- → S3
To document the issue about frames belonging to different child lists when content has been added and we are performing a reflow, and this leading to CompareTreePosition not being able to decide the correct tree order which is detected by a debug assert, a stack trace is provided above.

Here is a pernosco session for this same issue

Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/61e3989223b7 https://hg.mozilla.org/integration/autoland/rev/e72494023a87 Avoid short-circuit evaluation on frame ancestor lookup. r=layout-anchor-positioning-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/05b31c496d13 https://hg.mozilla.org/integration/autoland/rev/554ab507a753 Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f7b41339cca5 https://hg.mozilla.org/integration/autoland/rev/4d1d20e45202 Revert "Bug 1974382: Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin" for causing failures at SelectionActionDelegateTest.
Blocks: 1980206
Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/46c9062e4f5a https://hg.mozilla.org/integration/autoland/rev/a6611a86996a Avoid short-circuit evaluation on frame ancestor lookup. r=layout-anchor-positioning-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/f9b77c969807 https://hg.mozilla.org/integration/autoland/rev/9ec68e348798 Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin,emilio
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Flags: needinfo?(jjalkanen) → in-testsuite+

The patch landed in nightly and beta is affected.
:jari, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(jjalkanen)

This got backed out, right?

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 3 months ago3 months ago
Depends on: 1979403
Flags: needinfo?(jjalkanen)
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9500999 - Attachment is obsolete: true
Target Milestone: 143 Branch → ---
Blocks: 1981644
Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2041e6327e6f https://hg.mozilla.org/integration/autoland/rev/b9c00262fc8d Avoid short-circuit evaluation on frame ancestor lookup. r=layout-anchor-positioning-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/dd03850738f7 https://hg.mozilla.org/integration/autoland/rev/c6b20aeb5d45 Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin,emilio

backout was merged to central

Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1e5321620abb https://hg.mozilla.org/integration/autoland/rev/50a0d3521b8b Avoid short-circuit evaluation on frame ancestor lookup. r=layout-anchor-positioning-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/7ef20f5498d6 https://hg.mozilla.org/integration/autoland/rev/fdd8ff04e351 Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin,emilio
Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b54233122e72 https://hg.mozilla.org/integration/autoland/rev/6e2836763b10 Avoid short-circuit evaluation on frame ancestor lookup. r=layout-anchor-positioning-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/1be7a65f05b8 https://hg.mozilla.org/integration/autoland/rev/99af88954512 Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin,emilio

Backed out for causing wpt failures on anchor-name-003.html

Backout link

Push with failures

Failure log

Pushed by jjalkanen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a857eb71dd6f https://hg.mozilla.org/integration/autoland/rev/0825b0eeb519 Avoid short-circuit evaluation on frame ancestor lookup. r=layout-anchor-positioning-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/d64e49349047 https://hg.mozilla.org/integration/autoland/rev/2845a1497070 Avoid mixing anchors in different child lists. r=layout-anchor-positioning-reviewers,dshin,emilio
Status: REOPENED → RESOLVED
Closed: 3 months ago3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Flags: needinfo?(jjalkanen)
Regressions: 1998438
Regressions: 1998440
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: