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

Unified Diff: sky/engine/core/css/resolver/StyleBuilderCustom.cpp

Issue 709213002: Remove ContentData. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
Index: sky/engine/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/sky/engine/core/css/resolver/StyleBuilderCustom.cpp b/sky/engine/core/css/resolver/StyleBuilderCustom.cpp
index bec148cc762f32c1e767f99387d7d8d213ac7d97..e762659f9132366a6b5a0ec0192a66cd3e2929c6 100644
--- a/sky/engine/core/css/resolver/StyleBuilderCustom.cpp
+++ b/sky/engine/core/css/resolver/StyleBuilderCustom.cpp
@@ -807,76 +807,6 @@ void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState&
state.style()->setSubtreeWillChangeContents(willChangeContents || state.parentStyle()->subtreeWillChangeContents());
}
-void StyleBuilderFunctions::applyInitialCSSPropertyContent(StyleResolverState& state)
-{
- state.style()->clearContent();
-}
-
-void StyleBuilderFunctions::applyInheritCSSPropertyContent(StyleResolverState&)
-{
- // FIXME: In CSS3, it will be possible to inherit content. In CSS2 it is not. This
- // note is a reminder that eventually "inherit" needs to be supported.
-}
-
-void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& state, CSSValue* value)
-{
- // list of string, uri, counter, attr, i
-
- if (!value->isValueList())
- return;
-
- bool didSet = false;
- for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
- CSSValue* item = i.value();
- if (item->isImageGeneratorValue()) {
- if (item->isGradientValue())
- state.style()->setContent(StyleGeneratedImage::create(toCSSGradientValue(item)->gradientWithStylesResolved(state.document().textLinkColors(), state.style()->color()).get()), didSet);
- else
- state.style()->setContent(StyleGeneratedImage::create(toCSSImageGeneratorValue(item)), didSet);
- didSet = true;
- } else if (item->isImageSetValue()) {
- state.style()->setContent(state.elementStyleResources().setOrPendingFromValue(CSSPropertyContent, toCSSImageSetValue(item)), didSet);
- didSet = true;
- }
-
- if (item->isImageValue()) {
- state.style()->setContent(state.elementStyleResources().cachedOrPendingFromValue(state.document(), CSSPropertyContent, toCSSImageValue(item)), didSet);
- didSet = true;
- continue;
- }
-
- if (!item->isPrimitiveValue())
- continue;
-
- CSSPrimitiveValue* contentValue = toCSSPrimitiveValue(item);
-
- if (contentValue->isString()) {
- state.style()->setContent(contentValue->getStringValue().impl(), didSet);
- didSet = true;
- } else if (contentValue->isAttr()) {
- // FIXME: Can a namespace be specified for an attr(foo)?
- if (state.style()->styleType() == NOPSEUDO)
- state.style()->setUnique();
- else
- state.parentStyle()->setUnique();
- QualifiedName attr(AtomicString(contentValue->getStringValue()));
- const AtomicString& value = state.element()->getAttribute(attr);
- state.style()->setContent(value.isNull() ? emptyString() : value.string(), didSet);
- didSet = true;
- // register the fact that the attribute value affects the style
- state.contentAttrValues().append(attr.localName());
- } else {
- switch (contentValue->getValueID()) {
- default:
- // normal and none do not have any effect.
- { }
- }
- }
- }
- if (!didSet)
- state.style()->clearContent();
-}
-
void StyleBuilderFunctions::applyInitialCSSPropertyFont(StyleResolverState&)
{
ASSERT_NOT_REACHED();
« no previous file with comments | « sky/engine/core/css/parser/CSSPropertyParser.cpp ('k') | sky/engine/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698