Bug
1865833 [wpt PR 43284] - Don't attempt to print pages that don't exist., a=testonly
Automatic update from web-platform-tests
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/c/chromium/src/+/
5049031
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1227511}
--
wpt-commits:
934d3ba105861f4342eee4c79c2932b0e7204fa4
wpt-pr: 43284