[wpt-sync] Sync PR 42460 - Revert "Recalculate style before setting ICB size for printing."
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox121 fixed)
Tracking | Status | |
---|---|---|
firefox121 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 42460 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/42460
Details from upstream follow.
Phillis Tang <phillis@chromium.org> wrote:
Revert "Recalculate style before setting ICB size for printing."
This reverts commit f992984634e8ffc2a9faba835da87085d7a79916.
Reason for revert: Causing PrintBrowserTest.NoResizeEvent to fail on Linux. Example build: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20ChromiumOS%20MSan%20Tests/38907/overview
Original change's description:
Recalculate style before setting ICB size for printing.
A zoom factor used when viewing a webpage on screen may have been set in
computed style. This would affect @page margin resolution incorrectly
when entering print mode, which in turn would result in an incorrect
initial containing block size. To fix this, recalculate style before
calculating the page area size.Since we now recalculate style before setting any initial containing
block size for printing at all, viewport units will not be resolved
correctly. So make sure that they get calculated before laying out. This
used to be triggered by calling LayoutViewportWasResized(). It turns out
though, now that we need to do this unconditionally before the first
layout, that LayoutViewportWasResized() does more than we want. For
printing, we don't need to re-evaluate media queries, and we do not want
a resize event to be fired. Therefore, split the viewport units dirtying
into a separate function. Introduce a lambda in
ForceLayoutForPagination() to avoid repetitive code.Make PrintBrowserTest.NoResizeEvent more evil, by modifying its resource
HTML file to use a named page, and also a wide DIV. This would make the
test fail without this CL.Add external/wpt/css/printing/ to the scalefactor200 virtual test suite.
Three other tests (the already existing page-margin-xxx tests) would
also fail without this fix, but add a test for this specific issue
(abspos) as well.Bug: 1488751, 1486499
Change-Id: If42211ddb6aadc49dcdee71ccd9597aa2818a672
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4922711
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Morten Stenshorne \<mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1207513}Bug: 1488751, 1486499
Change-Id: I84bcbf4acea734cea3a495ea9ac78399c8801345
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4927588
Owners-Override: Phillis Tang \<phillis@chromium.org>
Bot-Commit: Rubber Stamper \<rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Phillis Tang \<phillis@chromium.org>
Commit-Queue: Rubber Stamper \<rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1207774}
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
Assignee | ||
Comment 3•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
Comment 6•1 year ago
|
||
bugherder |
Description
•