scrollWidth / scrollHeight not properly calculated when content has negative margin
Categories
(Core :: Layout: Scrolling and Overflow, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox-esr128 | --- | unaffected |
firefox134 | --- | affected |
firefox135 | --- | affected |
firefox136 | --- | affected |
People
(Reporter: m.irrschik, Assigned: emilio, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Steps to reproduce:
For the attached case, the contentWidth/Height and scrollWidth/Height should be equals (and were till FF133, and still are in chrome/edge) - but since v134 the values are wronlgy caluclated, assumingly because of incorrect handling of the negative margins.
Actual results:
scrollWidth/scrollHeight is wrong (310 in my test-case)
Expected results:
scrollWidth/scrollHeight should be 300 in my test-case
Updated•3 days ago
|
Comment 1•3 days ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dc12acb51f96b585efb881cf95c2dd3452fe23a6&tochange=a661bff10b1fea7e6d828efad298bbdbe2a8574c
Comment 2•3 days ago
|
||
:emilio, since you are the author of the regressor, bug 1936156, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•3 days ago
|
Assignee | ||
Updated•2 days ago
|
Assignee | ||
Comment 3•2 days ago
|
||
Assignee | ||
Comment 4•2 days ago
|
||
Thanks for the report! FYI, in case you've encountered this in a site you develop or what not, a potential workaround is to use display: flow-root
, or something that turns the block into a block formatting context.
Comment 7•2 days ago
•
|
||
Backed out for causing multiple failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/e1e29a88000d0dbbb33b2e0f8c75a096dbe718b8
Failure log -> TEST-UNEXPECTED-FAIL | widget/tests/test_wheeltransaction.xhtml
INFO - TEST-UNEXPECTED-FAIL | widget/tests/test_wheeltransaction.xhtml | Test timed out. -
[task 2025-01-17T19:10:59.514Z] 19:10:59 INFO - GECKO(1619) | MEMORY STAT | vsize 20137MB | residentFast 626MB | heapAllocated 289MB
[task 2025-01-17T19:11:02.531Z] 19:11:02 INFO - Error: Unable to restore focus, expect failures and timeouts.
[task 2025-01-17T19:11:02.532Z] 19:11:02 INFO - GECKO(1619) | [Parent 1619, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/chrome/nsChromeRegistry.cpp:182
[task 2025-01-17T19:11:02.533Z] 19:11:02 INFO - GECKO(1619) | [Parent 1619, Main Thread] WARNING: 'NS_FAILED(rv)', file /builds/worker/checkouts/gecko/chrome/nsChromeProtocolHandler.cpp:73
[task 2025-01-17T19:11:02.546Z] 19:11:02 INFO - GECKO(1619) | [Parent 1619, Main Thread] WARNING: Failed to retarget HTML data delivery to the parser thread.: file /builds/worker/checkouts/gecko/parser/html/nsHtml5StreamParser.cpp:1215
[task 2025-01-17T19:11:02.606Z] 19:11:02 INFO - TEST-OK | widget/tests/test_wheeltransaction.xhtml | took 323690ms
Assignee | ||
Comment 9•21 hours ago
|
||
Blerg, typo, accounted for the normal position twice accidentally in one code-path.
Comment 10•21 hours ago
|
||
Comment 11•18 hours ago
|
||
Backed out for causing wpt failures in scrollWidthHeight-overflow-visible-negative-margins.html.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | /css/cssom-view/scrollWidthHeight-overflow-visible-negative-margins.html | scroll{Width,Height} with negative margins with overflow: auto, padding: 2px, border: 0, display: flex - assert_equals: scrollWidth expecting 5px of overflow expected 14 but got 15
Assignee | ||
Updated•14 hours ago
|
Comment 13•14 hours ago
|
||
Comment 14•12 hours ago
|
||
Backed out for causing wpt failures in scrollWidthHeight-overflow-visible-negative-margins.html.
Description
•