[webkit-reviews] review granted: [Bug 150443] <img>.naturalWidth should return the density-corrected intrinsic width : [Attachment 386412] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 8 10:05:40 PST 2020
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Noam Rosenthal
<noam at webkit.org>'s request for review:
Bug 150443: <img>.naturalWidth should return the density-corrected intrinsic
width
https://bugs.webkit.org/show_bug.cgi?id=150443
Attachment 386412: Patch
https://bugs.webkit.org/attachment.cgi?id=386412&action=review
--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 386412
--> https://bugs.webkit.org/attachment.cgi?id=386412
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=386412&action=review
> Source/WebCore/html/HTMLImageElement.cpp:534
> +float HTMLImageElement::effectiveImageDevicePixelRatio() const
The "device" in the name is confusing, but I guess we already have
m_imageDevicePixelRatio.
> Source/WebCore/loader/cache/CachedImage.h:81
> + LayoutSize nonClampedImageSizeForRenderer(const RenderElement* renderer,
float multiplier, SizeType = UsedSize) const;
Maybe unclamped
>
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the
-img-element/intrinsicsize/intrinsicsize-with-responsive-images.tentative-expec
ted.txt:8
> -FAIL Test image /images/green.png with width = 800, height = 800, and no
specified sizes assert_equals: naturalWidth expected 400 but got 100
> +FAIL Test image /images/green.png with width = 800, height = 800, and no
specified sizes assert_equals: naturalWidth expected 400 but got 33
Do you understand this behavior change?
More information about the webkit-reviews
mailing list