Add type-checked casts for StyleImage and subclasses
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Feb 2014 19:10:38 +0000 (19:10 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Feb 2014 19:10:38 +0000 (19:10 +0000)
commit4a420ee47acf324a7d88f5222fe6e8d422ac8987
tree717acba4b8fd0334dcd0d49f3a12db10bef3ec09
parent91b19c7bec5d41b381d7f55867eab57f1c662b91
Add type-checked casts for StyleImage and subclasses
<http://webkit.org/b/128915>

Reviewed by Oliver Hunt.

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::detachPendingImage):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedImageURL):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::detachPendingImage):
(WebCore::CSSImageSetValue::~CSSImageSetValue):
(WebCore::CSSImageSetValue::cachedImageSet):
(WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::detachPendingImage):
(WebCore::CSSImageValue::cachedImage):
(WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage):
(WebCore::StyleResolver::loadPendingImages):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
- Switch from static_cast<>() operators to toTypeName() methods.
- Replace 0 with nullptr where convenient.

* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StylePendingImage.h:
- Define type-checked cast macros.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCursorImageValue.cpp
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSImageValue.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/rendering/style/StyleCachedImage.h
Source/WebCore/rendering/style/StyleCachedImageSet.h
Source/WebCore/rendering/style/StyleGeneratedImage.h
Source/WebCore/rendering/style/StyleImage.h
Source/WebCore/rendering/style/StylePendingImage.h