Summary: | <img>.naturalWidth should return the density-corrected intrinsic width | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> | ||||||||
Component: | Images | Assignee: | Noam Rosenthal <noam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, dbates, dino, don.olmstead, e, esprehn+autocc, ews-feeder, ews-watchlist, gyuyoung.kim, japhet, noam, sabouhallawa, simon.fraser, webkit-bug-importer, yoav | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=144095 | ||||||||||
Attachments: |
|
Description
Simon Pieters (:zcorpan)
2015-10-22 03:39:04 PDT
Created attachment 386408 [details]
Patch
Created attachment 386412 [details]
Patch
Comment on attachment 386412 [details] 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-expected.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? > Maybe unclamped OKEY >> +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? Yes, it's the expected behavior change. That test happens to have images with srcset, and it's asking for their natural width/height. Created attachment 387112 [details]
Patch
Comment on attachment 387112 [details] Patch Rejecting attachment 387112 [details] from commit-queue. noam@webkit.org does not have committer permissions according to https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/contributors.json. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/contributors.json by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights. Comment on attachment 387112 [details] Patch Clearing flags on attachment: 387112 Committed r254229: <https://trac.webkit.org/changeset/254229> All reviewed patches have been landed. Closing bug. |