Closed Bug 1932840 Opened 1 year ago Closed 1 year ago

extra scrollable overflow (regression from bug 1768921)

Categories

(Core :: Layout: Scrolling and Overflow, defect)

Desktop
Unspecified
defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox132 --- unaffected
firefox133 --- unaffected
firefox134 + verified
firefox135 --- verified

People

(Reporter: tnikkel, Assigned: dshin)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Be on Windows with classic scrollbars.
Goto https://speedometer-preview.netlify.app/?developerMode=
Open the developer panel in the top right.
Unselect all.
Select TodoMVC-Svelte-Complex-DOM
Click Step Test twice. An iframe should load.
Open inspector, ctrl-f for "sprint one". That will find a text control.

Frame tree for that text control
nsTextControlFrame@2c1346315a8 parent=2c134631330 (x=0, y=1056, w=9000, h=1920) [content=2c1308263e0] [cs=2c1341bff08] <
ScrollContainer(div)(-1)@2c1346316a0 parent=2c1346315a8 (x=60, y=60, w=8880, h=1800) [content=2c131fc5e80] [cs=2c134b05f08:-moz-text-control-editing-root] <
Block(div)(-1)@2c134631958 parent=2c1346316a0 (x=0, y=0, w=8880, h=1800) ink-overflow=(x=0, y=0, w=8880, h=1860) scr-overflow=(x=0, y=0, w=8880, h=1860) [content=2c131fc5e80] [cs=2c134623408:-moz-scrolled-content] <
line@2c134631ab8 count=1 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=660, y=300, w=3831, h=1020) ink-overflow=(x=660, y=240, w=3831, h=1140) scr-overflow=(x=660, y=240, w=3831, h=1140) in-flow-scr-overflow=(x=660, y=240, w=3831, h=1140) <
Text(0)"Sprint one"@2c134631a18 parent=2c134631958 (x=660, y=240, w=3831, h=1140) [content=2c131fc5f00] [cs=2c13463c108:-moz-text] [run=2c1347de100][0,10,T]
>
>
>
>

Before bug 1768921 that text control was not scrollable, but it is now.

(Relevance: this test control being scrolalble means it is the first scrollable thing found so we give it a display port, instead of the sidebar)

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

:dshin, since you are the author of the regressor, bug 1768921, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

I built with https://hg.mozilla.org/mozilla-central/rev/3973e4edeb0395914a62704fbf735e1dfd8bd906, so that it includes all of the changesets from bug 1932800, and this problem still happens.

(In reply to Timothy Nikkel (:tnikkel) from comment #2)

I built with https://hg.mozilla.org/mozilla-central/rev/3973e4edeb0395914a62704fbf735e1dfd8bd906, so that it includes all of the changesets from bug 1932800, and this problem still happens.

Same result with https://hg.mozilla.org/mozilla-central/rev/c0c4c089fc10652d4829c9acd7a16e9ff10d776d after bug 1932800 got backed out and relanded.

I think we need to fix this before bug 1768921 can ship.

[Tracking Requested - why for this release]: text boxes unexpectedly being scrollable, that also messes up optimizations for finding user scrollable things to set a display port so they are ready to quickly respond to user

Attached file sv.zip

This is much reduced html file, but still a large css file.

It might be that we shouldn't create scrollable overflow for padding if overflow-clip-box-inline is content-box, or something along those lines, since in that case it'll always create overflow.

I'd be surprised if this wasn't an issue on arbitrary text controls, assuming they have padding?

  • The input has a computed height of 32px, with box-sizing: border-box
  • padding-top: 5px, padding-bottom: 8px, border-width: 1px so 17px available for content box
  • font family ("Segoe UI") and size (14px) selection & results in text frame height of 19px (Text(0)"Sprint one" [...] h=1140)
  • Text frame overflows content box by 1px on each side (line[...] (x=660, y=240, w=3831, h=1140))
  • Padding inflation of this box causes the overflow height of 31px
Flags: needinfo?(dshin)
Attached file A testcase

Padding inflation did bring out the behaviour, but having block-direction for text input seems to be something only we do?
Attached testcase allows block-direction scrolling on Firefox by setting test.scrollTop but not in Safari or Chrome.

Blocks: 1933477

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

These elements can't be scrolled block-direction by user anyway. It can be
programatically moved, but other browsers don't support that (See bug 1933477).
This also preserve our heuristics for finding user-scrollable elements.

Assignee: nobody → dshin
Status: NEW → ASSIGNED
Summary: extra scrolalble overflow (regression from bug 1768921) → extra scrollable overflow (regression from bug 1768921)
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f0c8239c94d Ensure padding inflation does not cause block scroll in single-line input elements. r=layout-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49433 for changes under testing/web-platform/tests

Thanks for working on this!

Sorry, my phab suggestion was not fully what I meant. This should be
equivalent.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Upstream PR merged by moz-wptsync-bot
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/03ca2fd8e423 Minor follow-up to save some content->frame trips. r=dshin

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

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox134 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(dshin)

Comment on attachment 9440007 [details]
Bug 1932840: Ensure padding inflation does not cause block scroll in single-line input elements. r=#layout

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Prevent potential perf regression
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: (No Nightly today? Fix is manually confirmed on central using below)
    Run WPT test, ensure all passing
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Change is well-constrained, and re-enables optimization lost by bug 1768921
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(dshin)
Attachment #9440007 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
Attachment #9440007 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

This issue can be reproduced by loading the test in Beta 134.0b3. The fix has been verified in Nightly v135.0a1 and Beta v134.0b4 (try build) in Windows 10. Assuming this is the right verification process, I will close this report. Thank you.

Flags: qe-verify+
Hardware: Unspecified → Desktop
Regressions: 1935126
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: