[wpt-sync] Sync PR 46247 - Fix print only object bitmap image loading
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 46247 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/46247
Details from upstream follow.
Traian Captan <tcaptan@chromium.org> wrote:
Fix print only object bitmap image loading
An object element with image data that is not rendered on screen will
not initially load the image. This is because of step 2 of the spec
algorithm which states that "if the element is not being rendered,
then jump to the step below labeled fallback", skipping over step 3.5
to actually "Fetch request". [1]If the object element is to be displayed in printing mode, the bitmap
image loading will be kicked off by the post layout call back
HTMLPlugInElement::CustomStyleForLayoutObject
. This will be too late
for the first print rendering, however it will render on subsequent
print attempts if they are made.The proposed fix for this issue is to follow the pattern in
Document::WillPrintSoon
, which gets called before printing, to
ensure that bitmap images in all object elements in the doc are loaded
before printing.
PrintRenderFrameHelper::PrintRequestedPages
is modified to also call
WillPrintSoon
so that printing from the system print dialog works as
expected. This matches
PrintRenderFrameHelper::RequestPrintPreview
which calls it for the
print preview path.
WebFrameTestProxy::StartTest
was modified to call WillPrintSoon` so
that wpt tests for print only will load the images before dumping the
print rendering pixels and match the system print dialog and print
preview paths.[1]https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element
Bug: 41477900
Change-Id: I937d1dfff548235ef4967a625f2e0e5132b95b93Reviewed-on: https://chromium-review.googlesource.com/5535938
WPT-Export-Revision: 6f563194a9d48a4df4cb12f05914f73dbc241bf0
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 1•4 months ago
|
||
Assignee | ||
Comment 2•4 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests
Status Summary
Firefox
OK
: 1
FAIL
: 1[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview] 3[Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt, GitHub]
Chrome
OK
: 1
PASS
: 2
FAIL
: 1
Safari
OK
: 1
PASS
: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /html/semantics/embedded-content/the-object-element/object-image-display-none-loading.html [wpt.fyi]
- Test that object image not displayed is not loaded unnecessarily.:
FAIL
- Test that object image not displayed is not loaded unnecessarily.:
New Tests That Don't Pass
- /html/semantics/embedded-content/the-object-element/object-image-display-none-loading.html [wpt.fyi]
- Test that object image not displayed is not loaded unnecessarily.:
FAIL
(Chrome:PASS
, Safari:PASS
)
- Test that object image not displayed is not loaded unnecessarily.:
- /html/semantics/embedded-content/the-object-element/object-image-display-none-loading-for-print.html [wpt.fyi]:
FAIL
(Chrome:PASS
) - /html/semantics/embedded-content/the-object-element/object-image-only-for-print.html [wpt.fyi]:
FAIL
(Chrome:FAIL
)
https://hg.mozilla.org/mozilla-central/rev/e70354aa3082
https://hg.mozilla.org/mozilla-central/rev/a8b147f9a1b2
Description
•