Closed Bug 1845933 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 41222 - Printing: Better width/height media query evaluation.

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 41222 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/41222
Details from upstream follow.

Morten Stenshorne <mstensho@chromium.org> wrote:

Printing: Better width/height media query evaluation.

ResizeForPrinting() in PrepareFrameAndViewForPrint temporarily changed
the size of the frame as an attempt to affect the media query evaluation
code in Blink. But there are better ways. Just add some awareness to
Blink, and remove ResizeForPrinting() and RestoreSize().

Note that we still use sizes based on the page area, and not the page
box, but now without being affected by any @page size and margins, as
suggested by the spec, although the spec says to use the page box size
(i.e. including margins). This approach has some interoperability.
Discussion: https://github.com/w3c/csswg-drafts/issues/5437

Namedropping https://crbug.com/734815, since there are complaints there
about the behavior of ResizeForPrinting().

Bug: 1117050, 734815
Change-Id: Ifd18c53b581380cffd807540aa2bfacfb8e0eca1
Reviewed-on: https://chromium-review.googlesource.com/4727725
WPT-Export-Revision: 2d83a179e4692abd9ca609a7bdd41fd6e31aff6c

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 6 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by ctuns@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/f62eb7b53f92
[wpt PR 41222] - Printing: Better width/height media query evaluation., a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.