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

Changeset 95048 in webkit


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

https://bugs.webkit.org/show_bug.cgi?id=67885
Outline for the high-resolution broken image icon draws at 2x
-and corresponding-
<rdar://problem/10104637>

Reviewed by Dan Bernstein.

Scaled the image size to account for the deviceScaleFactor.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageSizeForError):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95047 r95048  
    1 2011-09-13  Tim Horton  <timothy_horton@apple.com>
    2 
    3         REGRESSION (64275): Shape pattern-image fill turns black
    4         https://bugs.webkit.org/show_bug.cgi?id=51061
    5         <rdar://problem/8504705>
    6 
    7         Reviewed by Simon Fraser.
    8 
    9         When destroying a resource, register clients who are losing their
    10         resource as having pending resources, so they can be resolved in the case a
    11         resource with that id is re-registered.
    12 
    13         Test: svg/custom/pending-resource-after-removal.xhtml
    14 
    15         * rendering/svg/SVGResourcesCache.cpp:
    16         (WebCore::SVGResourcesCache::resourceDestroyed):
    17         * svg/SVGStyledElement.h:
    18         (WebCore::toSVGStyledElement): Added.
     12011-09-13  Beth Dakin  <bdakin@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=67885
     4        Outline for the high-resolution broken image icon draws at 2x
     5        -and corresponding-
     6        <rdar://problem/10104637>
     7
     8        Reviewed by Dan Bernstein.
     9
     10        Scaled the image size to account for the deviceScaleFactor.
     11        * rendering/RenderImage.cpp:
     12        (WebCore::RenderImage::imageSizeForError):
    1913
    20142011-09-13  Eric Seidel  <eric@webkit.org>
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r94980 r95048  
    8585    ASSERT_ARG(newImage, newImage->image());
    8686
    87     Image* brokenImage;
    88     if (newImage->willPaintBrokenImage())
    89         brokenImage = newImage->brokenImage(Page::deviceScaleFactor(frame()));
    90     else
    91         brokenImage = newImage->image();
     87    IntSize imageSize;
     88    if (newImage->willPaintBrokenImage()) {
     89        float deviceScaleFactor = Page::deviceScaleFactor(frame());
     90        imageSize = newImage->brokenImage(deviceScaleFactor)->size();
     91        if (deviceScaleFactor >= 2)
     92            imageSize.scale(0.5f);       
     93    } else
     94        imageSize = newImage->image()->size();
    9295
    9396    // imageSize() returns 0 for the error image. We need the true size of the
    9497    // error image, so we have to get it by grabbing image() directly.
    95     return IntSize(paddingWidth + brokenImage->width() * style()->effectiveZoom(), paddingHeight + brokenImage->height() * style()->effectiveZoom());
     98    return IntSize(paddingWidth + imageSize.width() * style()->effectiveZoom(), paddingHeight + imageSize.height() * style()->effectiveZoom());
    9699}
    97100
Note: See TracChangeset for help on using the changeset viewer.