Closed Bug 2004040 Opened 2 months ago Closed 2 months ago

anchor-center bug when overflowing the viewport

Categories

(Core :: Layout: Positioned, defect)

Firefox 147
defect

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
firefox147 --- fixed
firefox148 --- fixed

People

(Reporter: jakea, Assigned: dshin)

References

(Blocks 2 open bugs)

Details

Attachments

(7 files, 2 obsolete files)

Attached image Incorrect (Firefox)

https://random-stuff.jakearchibald.com/apps/bcd-query/?filterType=version-support&browser=firefox&version=146&title=css

  1. Expand the API row
  2. Click the first revealed cell (firefox desktop), observe the correct behaviour
  3. Click the final revealed cell (Chrome mobile), observe the incorrect behaviour

This seems to happen because the box would overflow the viewport, but it's changing position incorrectly.

Attached image Correct (Chrome)

A bit different from what's filed, but the alignment is still unexpected here.

@dshin it might be worth adding a margin to positioned, as that's also appears to be missing from the behaviour.

.positioned {
  margin: 0 10px;
}
Assignee: nobody → mozilla
Attachment #9530886 - Attachment description: WIP: Bug 2004040 - WIP! → Bug 2004040 - Don't consider anchors without a principal child for anchor position r?#layout
Status: NEW → ASSIGNED
Attachment #9530886 - Attachment description: Bug 2004040 - Don't consider anchors without a principal child for anchor position r?#layout → Bug 2004040 - Don't consider anchors without a principal child for anchor-center position r?#layout
Pushed by dshin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/275da674fe52 https://hg.mozilla.org/integration/autoland/rev/d023bce2235f Improve handling of orthogonal anchor-center alignment r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/e338585458bf https://hg.mozilla.org/integration/autoland/rev/79cfd87c6485 Properly nudge overflowing abspos elements into IMCB. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/23038681a70b https://hg.mozilla.org/integration/autoland/rev/bb3bad054882 Revert "Bug 2004040: Properly nudge overflowing abspos elements into IMCB. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio" for causing wpt failures on align-self-default-overflow-htb-ltr-htb.html

Backed out for causing wpt failures on align-self-default-overflow-htb-ltr-htb.html

Backout link

Push with failures

Failure log

Flags: needinfo?(mozilla)
Assignee: mozilla → dshin
Flags: needinfo?(mozilla) → needinfo?(dshin)
Pushed by dshin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/67791fd91e94 https://hg.mozilla.org/integration/autoland/rev/602833605197 Improve handling of orthogonal anchor-center alignment r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/6eb2a1b52bbb https://hg.mozilla.org/integration/autoland/rev/5501c31cab33 Properly nudge overflowing abspos elements into IMCB. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Flags: needinfo?(dshin) → in-testsuite+

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

For more information, please visit BugBot documentation.

Flags: needinfo?(dshin)
See Also: → 2005451
Attachment #9532357 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Broken Anchor Positioning feature: Anchored element gets placed on the far side of the anchor
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Relatively small change, well-covered by Web Platform Tests.
  • String changes made/needed: No
  • Is Android affected?: yes
Blocks: 2005340
Attachment #9530886 - Attachment is obsolete: true
Attachment #9532506 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Broken Anchor Positioning feature: Anchored element gets placed on the far side of the anchor
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Relatively small change, well-covered by Web Platform Tests.
  • String changes made/needed: N/A
  • Is Android affected?: yes
Attachment #9532507 - Flags: approval-mozilla-beta?
Attachment #9532357 - Attachment is obsolete: true
Attachment #9532357 - Flags: approval-mozilla-beta?
Attachment #9532506 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9532507 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(dshin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: