Subpixel rendering: Transition class CSSImageGeneratorValue/class StyleImage (and...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Apr 2014 14:18:58 +0000 (14:18 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Apr 2014 14:18:58 +0000 (14:18 +0000)
commit653f2663abf168999e13767960cd5b2b8d16a2ec
treec91c0cf80c3175437c24de17250cf34068092e9e
parent4250b8b7cd4192f88b604a588000e2cd16ef9bed
Subpixel rendering: Transition class CSSImageGeneratorValue/class StyleImage (and its dependencies) from
IntSize to FloatSize to enable subpixel sized (generated)images.
https://bugs.webkit.org/show_bug.cgi?id=130659

Reviewed by Simon Fraser and Andreas Kling.

This is in preparation to support subpixel positioned/sized background images. Generated images
needs to be able to sized on device pixels.

No change in behavior.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::fixedSize):
(WebCore::CSSCanvasValue::image):
* css/CSSCanvasValue.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::fixedSize):
(WebCore::CSSCrossfadeValue::image):
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize):
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
(WebCore::positionFromValue):
(WebCore::CSSGradientValue::computeEndPoint):
(WebCore::endPointsFromAngle):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::fixedSize):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::cachedImageForSize):
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
(WebCore::CSSImageGeneratorValue::evictCachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
* css/CSSImageGeneratorValue.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::setContainerSizeForRenderer):
* loader/cache/CachedImage.h:
* platform/graphics/FloatSizeHash.h: Added.
(WTF::FloatHash<WebCore::FloatSize>::hash):
(WTF::FloatHash<WebCore::FloatSize>::equal):
(WTF::HashTraits<WebCore::FloatSize>::constructDeletedValue):
(WTF::HashTraits<WebCore::FloatSize>::isDeletedValue):
* platform/graphics/LayoutSize.h:
(WebCore::flooredForPainting):
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::computePreferredLogicalWidths):
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::imageSize):
(WebCore::StyleCachedImage::setContainerSizeForRenderer):
(WebCore::StyleCachedImage::image):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.cpp:
(WebCore::StyleCachedImageSet::imageSize):
(WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
(WebCore::StyleCachedImageSet::image):
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::imageSize):
(WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
(WebCore::StyleGeneratedImage::image):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StylePendingImage.h:
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::setContainerSizeForRenderer):
* svg/graphics/SVGImageCache.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSCanvasValue.cpp
Source/WebCore/css/CSSCanvasValue.h
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCrossfadeValue.h
Source/WebCore/css/CSSFilterImageValue.cpp
Source/WebCore/css/CSSFilterImageValue.h
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSGradientValue.h
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/CSSImageGeneratorValue.h
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedImage.h
Source/WebCore/platform/graphics/FloatSizeHash.h [new file with mode: 0644]
Source/WebCore/platform/graphics/LayoutSize.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/StyleCachedImageSet.cpp
Source/WebCore/rendering/style/StyleCachedImageSet.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/svg/graphics/SVGImageCache.cpp
Source/WebCore/svg/graphics/SVGImageCache.h