Closed Bug 1865833 Opened 11 months ago Closed 10 months ago

[wpt-sync] Sync PR 43284 - Don't attempt to print pages that don't exist.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:

Don't attempt to print pages that don't exist.

Due to underlying bugs [1], we may re-layout after having generated the
paginated layout, but before actually printing all the pages. If this
re-layout reduces the number of pages, we would crash, since we assumed
that the page count doesn't change under our feet (which should be a
reasonable assumption, but no). Just bail if requested to print a page
out of range.

Don't store the page count in the PrintContext object, since it may be
old news before we use it, thanks to the bugginess. Still need to store
it for plug-in contexts, though.

[1] crbug.com/452672

Bug: 1503093
Change-Id: Iaa9f3eacfc6a4687b0bfd9edfe55ee13dd23c75e
Reviewed-on: https://chromium-review.googlesource.com/5049031
WPT-Export-Revision: 7dd92b30fa67794ca1e1d49891399927bd816ccf

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/689dc8f59170 [wpt PR 43284] - Don't attempt to print pages that don't exist., a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c33c04645617 [wpt PR 43284] - Don't attempt to print pages that don't exist., a=testonly
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.