Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: Source/core/css/resolver/StyleResourceLoader.cpp

Issue 404343002: Introduce DEFINE_CONTENT_DATA_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResourceLoader.cpp
diff --git a/Source/core/css/resolver/StyleResourceLoader.cpp b/Source/core/css/resolver/StyleResourceLoader.cpp
index c9652dfcec7818231554dbee2545f084aee9d9cf..16ee44d79b401ae09a9e5c0356d29444ff893a19 100644
--- a/Source/core/css/resolver/StyleResourceLoader.cpp
+++ b/Source/core/css/resolver/StyleResourceLoader.cpp
@@ -134,11 +134,11 @@ void StyleResourceLoader::loadPendingImages(RenderStyle* style, ElementStyleReso
case CSSPropertyContent: {
for (ContentData* contentData = const_cast<ContentData*>(style->contentData()); contentData; contentData = contentData->next()) {
if (contentData->isImage()) {
- StyleImage* image = static_cast<ImageContentData*>(contentData)->image();
+ StyleImage* image = toImageContentData(contentData)->image();
if (image->isPendingImage()) {
RefPtr<StyleImage> loadedImage = loadPendingImage(toStylePendingImage(image), elementStyleResources.deviceScaleFactor());
if (loadedImage)
- static_cast<ImageContentData*>(contentData)->setImage(loadedImage.release());
+ toImageContentData(contentData)->setImage(loadedImage.release());
}
}
}
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698