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

Changeset 102070 in webkit


Ignore:
Timestamp:
Dec 5, 2011, 4:43:12 PM (15 years ago)
Author:
Lucas Forschler
Message:

Merged r95053.

Location:
branches/safari-534.53-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-534.53-branch/Source/WebCore/ChangeLog

    r102069 r102070  
     12011-12-05  Lucas Forschler  <lforschler@apple.com>
     2
     3    Merge 95053
     4
     5    2011-09-13  Beth Dakin  <bdakin@apple.com>
     6
     7            Adding a comment I forgot to add before.
     8
     9            * rendering/RenderImage.cpp:
     10            (WebCore::RenderImage::imageSizeForError):
     11
    1122011-12-05  Lucas Forschler  <lforschler@apple.com>
    213
  • branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp

    r102068 r102070  
    9090        float deviceScaleFactor = Page::deviceScaleFactor(frame());
    9191        imageSize = newImage->brokenImage(deviceScaleFactor)->size();
    92         if (deviceScaleFactor >= 2)
    93             imageSize.scale(0.5f);       
     92        if (deviceScaleFactor >= 2) {
     93            // It is important to scale by 0.5 instead of the deviceScaleFactor because the
     94            // high resolution broken image artwork is actually a 2x image. We should
     95            // consider adding functionality to Image to ask about the image's resolution,
     96            // and then we could scale by 1 / resolution. This is a solution that would
     97            // scale better since this hardcoded number will have to change if we ever get
     98            // artwork at other, higher resolutions.
     99            imageSize.scale(0.5f);
     100        }
    94101    } else
    95102        imageSize = newImage->image()->size();
Note: See TracChangeset for help on using the changeset viewer.