[wpt-sync] Sync PR 46205 - Move page margin handling over to Blink.
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 46205 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/46205
Details from upstream follow.
Morten Stenshorne <mstensho@chromium.org> wrote:
Move page margin handling over to Blink.
Remove the margin handling code from PrintRenderFrameHelper (used by the
actual browser) and SpoolPagesWithBoundariesForTesting() (web tests).This allows @page backgrounds to cover the entire page box, including
the margin area. Tests included.This CL also paves the road for implementing @page margin boxes (such as
author-specified headers and footers), which was the main objective
anyway.The fact that Blink is now responsible for the entire page box means
that the code that deals with shrinking / centering paginated content to
fit the target paper also has to be moved over to Blink.WebPrintPageDescription still provides margin info for each page.
Although PrintRenderFrameHelper no longer needs to position the page
area within the page box based on margins, the margins are still needed
in order to figure out if there's enough room for UA-generated headers
and footers.By moving all of this into Blink, it will be rather straight-forward to
add web tests for page fitting, rather than writing clunky
PrintRenderFrameHelper component browser tests for it. Will follow up
with a CL for this.Three page-orientation tests now start passing. The code in
SpoolPagesWithBoundariesForTesting() didn't add margin translation at
the correct time when rotating. The margins are no longer added there,
so the problem is gone.Bug: 40286153, 40341678
Change-Id: I418b2e08ed76b297ea5d5fc223545b52b3e9b09f
Reviewed-on: https://chromium-review.googlesource.com/5526464
WPT-Export-Revision: c187830b21f188ce2ec49f356718e4d214728085
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 1•9 months ago
|
||
Assignee | ||
Comment 2•9 months ago
|
||
CI Results
Ran 6 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI
Total 2 tests
Status Summary
Firefox
FAIL
: 2
Chrome
FAIL
: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-page/page-box-005-print.html [wpt.fyi]:
FAIL
(Chrome:FAIL
) - /css/css-page/page-box-006-print.html [wpt.fyi]:
FAIL
(Chrome:FAIL
)
https://hg.mozilla.org/mozilla-central/rev/b43e695dd7bf
https://hg.mozilla.org/mozilla-central/rev/8539c1ac01b6
Description
•