Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland of "Store a PhysicalNaturalSizingInfo in LayoutImage" #50291

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

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 <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1411544}

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 <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1411544}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 13ec29f into master Jan 27, 2025
20 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-44d93d55d6 branch January 27, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants