Remove StylePendingImage
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 15:06:19 +0000 (15:06 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 15:06:19 +0000 (15:06 +0000)
commit18efcb1fc5f1d41cd6563f9d6a5282e866bf5f43
tree9549d5ed3391f9f636da76fadf4aa6bcb067bcb1
parent21d970fda72a4bbfa11436785d0fdb4974afd23b
Remove StylePendingImage
https://bugs.webkit.org/show_bug.cgi?id=161245

Reviewed by Andreas Kling.

Instances of this confusing type are used as placeholders during style resolution.
We can get rid of it and make "pending" a state of StyleImage. This simplies the code and
will allow further improvements.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::isPending):
(WebCore::CSSCrossfadeValue::blend):
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::CSSCursorImageValue):
(WebCore::CSSCursorImageValue::~CSSCursorImageValue):

    Save the original URL since the underlying CSSImageValue may change.

(WebCore::CSSCursorImageValue::updateCursorElement):
(WebCore::CSSCursorImageValue::cursorElementRemoved):
(WebCore::CSSCursorImageValue::cursorElementChanged):
(WebCore::CSSCursorImageValue::loadImage):
(WebCore::CSSCursorImageValue::styleImage):
(WebCore::CSSCursorImageValue::isSVGCursor):
(WebCore::CSSCursorImageValue::cachedImageURL):
(WebCore::CSSCursorImageValue::updateCachedImage):
(WebCore::CSSCursorImageValue::detachPendingImage): Deleted.
(WebCore::CSSCursorImageValue::cachedImage): Deleted.
(WebCore::CSSCursorImageValue::cachedOrPendingImage): Deleted.
(WebCore::CSSCursorImageValue::clearCachedImage): Deleted.
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::isPending):
* css/CSSFilterImageValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::~CSSImageSetValue):
(WebCore::CSSImageSetValue::loadBestFitImage):
(WebCore::CSSImageSetValue::styleImage):
(WebCore::CSSImageSetValue::traverseSubresources):
(WebCore::CSSImageSetValue::detachPendingImage): Deleted.
(WebCore::CSSImageSetValue::bestFitImage): Deleted.
(WebCore::CSSImageSetValue::cachedOrPendingImageSet): Deleted.
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::CSSImageValue):
(WebCore::CSSImageValue::~CSSImageValue):
(WebCore::CSSImageValue::isPending):
(WebCore::CSSImageValue::styleImage):
(WebCore::CSSImageValue::loadImage):
(WebCore::CSSImageValue::traverseSubresources):
(WebCore::CSSImageValue::detachPendingImage): Deleted.
(WebCore::CSSImageValue::cachedOrPendingImage): Deleted.
(WebCore::CSSImageValue::cachedImage): Deleted.
* css/CSSImageValue.h:
(WebCore::CSSImageValue::create):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::cachedOrPendingFromValue):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::setOrPendingFromValue):
(WebCore::StyleResolver::cursorOrPendingFromValue):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilter):
(WebCore::crossfadeBlend):
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::image):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::createShapeForImage):
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::StyleCachedImage):
(WebCore::StyleCachedImage::~StyleCachedImage):
(WebCore::StyleCachedImage::setCachedImage):
(WebCore::StyleCachedImage::cssValue):
(WebCore::StyleCachedImage::canRender):
(WebCore::StyleCachedImage::isPending):
(WebCore::StyleCachedImage::isLoaded):
(WebCore::StyleCachedImage::errorOccurred):
(WebCore::StyleCachedImage::imageSize):
(WebCore::StyleCachedImage::imageHasRelativeWidth):
(WebCore::StyleCachedImage::imageHasRelativeHeight):
(WebCore::StyleCachedImage::computeIntrinsicDimensions):
(WebCore::StyleCachedImage::usesImageContainerSize):
(WebCore::StyleCachedImage::setContainerSizeForRenderer):
(WebCore::StyleCachedImage::addClient):
(WebCore::StyleCachedImage::removeClient):
(WebCore::StyleCachedImage::image):
(WebCore::StyleCachedImage::knownToBeOpaque):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::isPending):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
(WebCore::StyleImage::isCachedImage):
(WebCore::StyleImage::StyleImage):
(WebCore::StyleImage::canRender): Deleted.
(WebCore::StyleImage::isPendingImage): Deleted.
* rendering/style/StylePendingImage.h: Removed.
* style/StylePendingResources.cpp:
(WebCore::Style::loadPendingImage):
(WebCore::Style::loadPendingImages):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@205181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCrossfadeValue.h
Source/WebCore/css/CSSCursorImageValue.cpp
Source/WebCore/css/CSSCursorImageValue.h
Source/WebCore/css/CSSFilterImageValue.cpp
Source/WebCore/css/CSSFilterImageValue.h
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/CSSImageGeneratorValue.h
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSImageSetValue.h
Source/WebCore/css/CSSImageValue.cpp
Source/WebCore/css/CSSImageValue.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/rendering/RenderImageResourceStyleImage.cpp
Source/WebCore/rendering/shapes/ShapeOutsideInfo.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 [deleted file]
Source/WebCore/style/StylePendingResources.cpp