2011-01-24 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jan 2011 05:52:29 +0000 (05:52 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jan 2011 05:52:29 +0000 (05:52 +0000)
commitb40bd65032f685ed197eb33928b58b276210815b
treef377e079d4952020a9197328b83d26140fa32762
parent83e1ef9400fd37b92aff5f2e86d40a8067279ecc
2011-01-24  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Eric Seidel.

        Refcount Images used in rendering code
        https://bugs.webkit.org/show_bug.cgi?id=52701

        Change StyleImage::image(RenderObject*, const IntSize&) and
        CSSImageGeneratorValue::image(RenderObject*, const IntSize&) to
        return PassRefPtr<Image>, and adjust other code accordingly.

        This allows us to return one-time images, for example for CSS gradients
        whose appearance may change depending on factors other than the renderer
        and the destination size.

        * css/CSSCanvasValue.cpp:
        (WebCore::CSSCanvasValue::image):
        * css/CSSCanvasValue.h:
        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::image):
        * css/CSSGradientValue.h:
        * css/CSSImageGeneratorValue.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        (WebCore::RenderBoxModelObject::paintNinePieceImage):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintReplaced):
        (WebCore::RenderImage::paintIntoRect):
        * rendering/RenderImageResource.h:
        (WebCore::RenderImageResource::image):
        * rendering/RenderImageResourceStyleImage.h:
        (WebCore::RenderImageResourceStyleImage::image):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::paint):
        * rendering/style/StyleCachedImage.cpp:
        (WebCore::StyleCachedImage::image):
        * rendering/style/StyleCachedImage.h:
        * rendering/style/StyleGeneratedImage.cpp:
        (WebCore::StyleGeneratedImage::image):
        * rendering/style/StyleGeneratedImage.h:
        * rendering/style/StyleImage.h:
        * rendering/style/StylePendingImage.h:
        (WebCore::StylePendingImage::image):
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCanvasValue.cpp
Source/WebCore/css/CSSCanvasValue.h
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSGradientValue.h
Source/WebCore/css/CSSImageGeneratorValue.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderImageResource.h
Source/WebCore/rendering/RenderImageResourceStyleImage.h
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/style/StyleCachedImage.cpp
Source/WebCore/rendering/style/StyleCachedImage.h
Source/WebCore/rendering/style/StyleGeneratedImage.cpp
Source/WebCore/rendering/style/StyleGeneratedImage.h
Source/WebCore/rendering/style/StyleImage.h
Source/WebCore/rendering/style/StylePendingImage.h
Source/WebCore/rendering/svg/RenderSVGImage.cpp