[wpt-sync] Sync PR 46163 - Resolve page size using standard length utils.
Categories
(Core :: Layout, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 46163 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/46163
Details from upstream follow.
Morten Stenshorne <mstensho@chromium.org> wrote:
Resolve page size using standard length utils.
Calculating the page area size is very similar to how the content box
size of a regular non-replaced CSS box is calculated.content box + padding + border + margin = size of containing block
The only differences:
percentage-based padding/margins in a given dimension are resolved
against the containing block size in that dimension (i.e. a
percentage-based margin-top is resolved against the containing block
height), not unconditionally against the inline-size of the containing
block (regular CSS boxes)Overconstrainedness is resolved differently. Rather than adjusting
margins to fix the equation, the containing block size is adjusted.Auto @page margins are also handled correctly now. Tests included.
Clean up pagination stuff in Document, and move the logic of
GetPageDescription() into pagination utils in layout, and only call it
from external APIs (we used to need it during layout as well, but not
anymore). The end goal here is to be able to implement this by examining
the physical fragments, but we're not quite there yet, since Blink still
doesn't control the margin area of the page.Improve detection of unusable page sizes (if margins+border+padding are
larger than the containing block). We'll now recalculate computed style
for such page containers, and just ignore all author styles.Bug: 40286153
Change-Id: Id660b7e60d71256f32cb56db1cf419ad8ac91c2cReviewed-on: https://chromium-review.googlesource.com/5522379
WPT-Export-Revision: 5367bfd18f6f711269c48a837cb42f269d75914e
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 1•9 months ago
|
||
Assignee | ||
Comment 2•9 months ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI
Total 4 tests
Status Summary
Firefox
FAIL
: 4
Chrome
FAIL
: 4
Links
Details
New Tests That Don't Pass
- /css/css-page/page-margin-auto-negative-print.tentative.html [wpt.fyi]:
FAIL
(Chrome:FAIL
) - /css/css-page/page-margin-auto-print.html [wpt.fyi]:
FAIL
(Chrome:FAIL
) - /css/css-page/page-size-013-print.html [wpt.fyi]:
FAIL
(Chrome:FAIL
) - /css/css-page/page-size-014-print.html [wpt.fyi]:
FAIL
(Chrome:FAIL
)
https://hg.mozilla.org/mozilla-central/rev/98e99918ce04
https://hg.mozilla.org/mozilla-central/rev/e55bcdacb1f3
Description
•