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

Unified Diff: Source/core/rendering/RenderObject.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/rendering/RenderBlock.cpp ('k') | Source/core/rendering/style/ContentData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 11fe4cda51b931443bf3813cb916a09e4267616b..f58c8cdcb0b59e57de5b93ecb19983d730a804b8 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -158,7 +158,7 @@ RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
// trigger a style change now as the node is not fully attached. Moving this code to style change
// doesn't make sense as it should be run once at renderer creation.
image->setStyleInternal(style);
- if (const StyleImage* styleImage = static_cast<const ImageContentData*>(contentData)->image()) {
+ if (const StyleImage* styleImage = toImageContentData(contentData)->image()) {
image->setImageResource(RenderImageResourceStyleImage::create(const_cast<StyleImage*>(styleImage)));
image->setIsGeneratedContent();
} else
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/style/ContentData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698