Closed Bug 1943924 Opened 27 days ago Closed 25 days ago

[wpt-sync] Sync PR 50291 - Reland of "Store a PhysicalNaturalSizingInfo in LayoutImage"

Categories

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

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Fredrik Söderquist <fs@opera.com> wrote:

Reland of "Store a PhysicalNaturalSizingInfo in LayoutImage"

Switch the current natural_size_ PhysicalSize to include also the
natural aspect ratio. Due to the dependency from LayoutVideo, it is also
updated to store its own natural dimensions rather than caching the
poster image dimensions.

Use the natural dimensions in LayoutImage to handle the call to
IncrementVisuallyNonEmptyPixelCount() directly rather than calling
LayoutImageResource::ImageSize(). This eliminates the last caller of
LayoutImageResource::ImageSize(), so remove it.

Reland update: Fix LayoutImage natural dimensions for the "represents
nothing" case. If the LayoutImage had no image associated and got an
ImageChanged() notification due to other reasons then it would compute
to no natural dimensions. Set the natural dimensions to 0x0 in this case
instead.

Bug: 41357911, 40866163
Change-Id: Icc8ed20cef1c2398a1d25ac7a4b58132327916d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6198418
Commit-Queue: Fredrik Söderquist \<fs@opera.com>
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1411544}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be188901dc6f [wpt PR 50291] - Reland of "Store a PhysicalNaturalSizingInfo in LayoutImage", a=testonly
Status: NEW → RESOLVED
Closed: 25 days ago
: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.