Changeset 95053 in webkit
- Timestamp:
- Sep 13, 2011, 3:41:36 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderImage.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95052 r95053 1 2011-09-13 Beth Dakin <bdakin@apple.com> 2 3 Adding a comment I forgot to add before. 4 5 * rendering/RenderImage.cpp: 6 (WebCore::RenderImage::imageSizeForError): 7 1 8 2011-09-13 Antti Koivisto <antti@apple.com> 2 9 -
trunk/Source/WebCore/rendering/RenderImage.cpp
r95048 r95053 89 89 float deviceScaleFactor = Page::deviceScaleFactor(frame()); 90 90 imageSize = newImage->brokenImage(deviceScaleFactor)->size(); 91 if (deviceScaleFactor >= 2) 92 imageSize.scale(0.5f); 91 if (deviceScaleFactor >= 2) { 92 // It is important to scale by 0.5 instead of the deviceScaleFactor because the 93 // high resolution broken image artwork is actually a 2x image. We should 94 // consider adding functionality to Image to ask about the image's resolution, 95 // and then we could scale by 1 / resolution. This is a solution that would 96 // scale better since this hardcoded number will have to change if we ever get 97 // artwork at other, higher resolutions. 98 imageSize.scale(0.5f); 99 } 93 100 } else 94 101 imageSize = newImage->image()->size();
Note:
See TracChangeset
for help on using the changeset viewer.