RESOLVED INVALID91877
[Chromium] Broken image icon does not appear in high dpi
https://bugs.webkit.org/show_bug.cgi?id=91877
Summary [Chromium] Broken image icon does not appear in high dpi
zlieber
Reported 2012-07-20 10:16:06 PDT
[Chromium] Broken image icon does not appear in high dpi
Attachments
Patch (2.14 KB, patch)
2012-07-20 10:17 PDT, zlieber
no flags
zlieber
Comment 1 2012-07-20 10:17:35 PDT
Created attachment 153530 [details] Patch Preliminary patch
Dana Jansens
Comment 2 2012-07-20 11:55:57 PDT
Comment on attachment 153530 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153530&action=review > Source/WebCore/rendering/RenderImage.cpp:317 > + if (m_imageResource->errorOccurred() && deviceScaleFactor*usableWidth >= image->width() && deviceScaleFactor*usableHeight >= image->height() && !image->isNull()) { why not just change the value of usable* when they are being set above? Should the "- 2" be scaled by deviceScaleFactor also?
zlieber
Comment 3 2012-07-20 12:30:40 PDT
(In reply to comment #2) > (From update of attachment 153530 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=153530&action=review > > > Source/WebCore/rendering/RenderImage.cpp:317 > > + if (m_imageResource->errorOccurred() && deviceScaleFactor*usableWidth >= image->width() && deviceScaleFactor*usableHeight >= image->height() && !image->isNull()) { > > why not just change the value of usable* when they are being set above? Should the "- 2" be scaled by deviceScaleFactor also? The value is used below and need to be in original form, otherwise the image will be in a wrong position. If usableWidth represents what it's supposed to (usable width), then I'd guess all its components should be scaled. Also see comments on crbug.com/136118.
Dana Jansens
Comment 4 2012-07-20 12:42:25 PDT
Comment on attachment 153530 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153530&action=review >>> Source/WebCore/rendering/RenderImage.cpp:317 >>> + if (m_imageResource->errorOccurred() && deviceScaleFactor*usableWidth >= image->width() && deviceScaleFactor*usableHeight >= image->height() && !image->isNull()) { >> >> why not just change the value of usable* when they are being set above? Should the "- 2" be scaled by deviceScaleFactor also? > > The value is used below and need to be in original form, otherwise the image will be in a wrong position. > > If usableWidth represents what it's supposed to (usable width), then I'd guess all its components should be scaled. > > Also see comments on crbug.com/136118. Ok, the image is scaled by only deviceScaleFactor, so I agree this seems right to do if the context scale is always >= deviceScaleFactor. This does seem right in the context scale = deviceScale case, and won't be any different in other cases. style nit: put spaces around * and maybe consider using a temporary variable for them eg deviceScaledUsuableWidth.
Terry Anderson
Comment 5 2012-07-20 16:28:22 PDT
If https://bugs.webkit.org/show_bug.cgi?id=90190 lands before this patch, please upload baselines for the following two tests: fast/hidpi/broken-image-icon-hidpi.html fast/hidpi/broken-image-with-size-hidpi.html and also unskip these in TestExpectations
Terry Anderson
Comment 6 2012-07-20 16:50:15 PDT
(In reply to comment #5) > If https://bugs.webkit.org/show_bug.cgi?id=90190 lands before this patch, please upload baselines for the following two tests: > > fast/hidpi/broken-image-icon-hidpi.html > fast/hidpi/broken-image-with-size-hidpi.html > > and also unskip these in TestExpectations Sorry, please disregard my previous comment for the time being. I am still working on WK90190.
zlieber
Comment 7 2012-08-09 10:09:38 PDT
This is a chromium resource issue, no change is required in WebKit. See http://crbug.com/136118 for details.
Note You need to log in before you can comment on or make changes to this bug.