Closed Bug 2087557 Opened 1 month ago Closed 22 days ago

[wpt-sync] Sync PR 64238 - Defer HTMLPlugInElement image loads from style recalc to a task

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mason Freed <masonf@chromium.org> wrote:

Defer HTMLPlugInElement image loads from style recalc to a task

Previously, HTMLPlugInElement::CustomStyleForLayoutObject() invoked
ImageLoader::UpdateFromElement(kUpdateNormal) directly during style
recalculation. When an \<object> or \<embed> transitioned to an image
type with a cached broken or immediate image resource, ImageLoader took
the synchronous load path inside style recalc, synchronously firing
error events or triggering HTMLObjectElement::RenderFallbackContent()
and DetachLayoutTree() while the style engine was in the middle of
recalculating style.

Add ImageLoader::kUpdateFromTask (guarded by
HTMLPlugInDeferStyleRecalcImageLoad) to post the image load update as a
DOM manipulation task while keeping the document load event delayed
until the task runs, and update
Document::InitiateStyleOrLayoutDependentLoadForPrint() to also wait on
IsDelayingLoadEvent().

Fixed: 575053155
Bug: 575053155
Change-Id: I55acfa7c5a7331248fd396776f51679064f2bf85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8639987
Reviewed-by: Christoph Schwering \<schwering@google.com>
Reviewed-by: Noam Rosenthal \<nrosenthal@google.com>
Commit-Queue: Noam Rosenthal \<nrosenthal@google.com>
Auto-Submit: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1727790}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 24 tests

Status Summary

Firefox

OK : 1[GitHub] 16[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug] 17[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-64-25h2-opt]
PASS : 3[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 44[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 45[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug] 47[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-64-25h2-opt]
FAIL : 1[GitHub] 3[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 6[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

CRASH: 1

Safari

OK : 1
FAIL : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.