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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.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 | « no previous file | Source/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 0ff0c03f9415e195f9206afcadfed11c57a22acd..d34ce94922e4e15fcff7e6cb129cc3f92f423e0b 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -1346,15 +1346,16 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const RenderStyle& s
RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (const ContentData* contentData = style.contentData(); contentData; contentData = contentData->next()) {
if (contentData->isCounter()) {
- const CounterContent* counter = static_cast<const CounterContentData*>(contentData)->counter();
+ const CounterContent* counter = toCounterContentData(contentData)->counter();
ASSERT(counter);
list->append(cssValuePool().createValue(counter->identifier(), CSSPrimitiveValue::CSS_COUNTER_NAME));
} else if (contentData->isImage()) {
- const StyleImage* image = static_cast<const ImageContentData*>(contentData)->image();
+ const StyleImage* image = toImageContentData(contentData)->image();
ASSERT(image);
list->append(image->cssValue());
- } else if (contentData->isText())
- list->append(cssValuePool().createValue(static_cast<const TextContentData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
+ } else if (contentData->isText()) {
+ list->append(cssValuePool().createValue(toTextContentData(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
+ }
}
return list.release();
}
« no previous file with comments | « no previous file | Source/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698