⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 95053 in webkit


Ignore:
Timestamp:
Sep 13, 2011, 3:41:36 PM (15 years ago)
Author:
Beth Dakin
Message:

Adding a comment I forgot to add before.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageSizeForError):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95052 r95053  
     12011-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
    182011-09-13  Antti Koivisto  <antti@apple.com>
    29
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r95048 r95053  
    8989        float deviceScaleFactor = Page::deviceScaleFactor(frame());
    9090        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        }
    93100    } else
    94101        imageSize = newImage->image()->size();
Note: See TracChangeset for help on using the changeset viewer.