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

Unified Diff: sky/engine/core/css/parser/CSSPropertyParser.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
« no previous file with comments | « sky/engine/core/css/parser/CSSPropertyParser.h ('k') | sky/engine/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/parser/CSSPropertyParser.cpp
diff --git a/sky/engine/core/css/parser/CSSPropertyParser.cpp b/sky/engine/core/css/parser/CSSPropertyParser.cpp
index 7f44a7e0d14977b63c6a904e9f08d503a36d130e..6cbef6bdbe6ef933f2ce7fda0647351bcde1fa65 100644
--- a/sky/engine/core/css/parser/CSSPropertyParser.cpp
+++ b/sky/engine/core/css/parser/CSSPropertyParser.cpp
@@ -487,10 +487,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
parsedValue = parseQuotes();
break;
- case CSSPropertyContent: // [ <string> | <uri> | <counter> | attr(X) | open-quote |
- // close-quote | no-open-quote | no-close-quote ]+ | inherit
- return parseContent(propId, important);
-
case CSSPropertyClip: // <shape> | auto | inherit
if (id == CSSValueAuto)
validPrimitive = true;
@@ -1882,66 +1878,6 @@ PassRefPtr<CSSValue> CSSPropertyParser::parseQuotes()
return nullptr;
}
-// [ <string> | <uri> | <counter> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
-// in CSS 2.1 this got somewhat reduced:
-// [ <string> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
-bool CSSPropertyParser::parseContent(CSSPropertyID propId, bool important)
-{
- RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
-
- while (CSSParserValue* val = m_valueList->current()) {
- RefPtr<CSSValue> parsedValue = nullptr;
- if (val->unit == CSSPrimitiveValue::CSS_URI) {
- // url
- parsedValue = createCSSImageValueWithReferrer(val->string, completeURL(val->string));
- } else if (val->unit == CSSParserValue::Function) {
- // attr(X) | counter(X [,Y]) | counters(X, Y, [,Z]) | -webkit-gradient(...)
- CSSParserValueList* args = val->function->args.get();
- if (!args)
- return false;
- if (equalIgnoringCase(val->function->name, "attr(")) {
- parsedValue = parseAttr(args);
- if (!parsedValue)
- return false;
- } else if (equalIgnoringCase(val->function->name, "-webkit-image-set(")) {
- parsedValue = parseImageSet(m_valueList);
- if (!parsedValue)
- return false;
- } else if (isGeneratedImageValue(val)) {
- if (!parseGeneratedImage(m_valueList, parsedValue))
- return false;
- } else
- return false;
- } else if (val->unit == CSSPrimitiveValue::CSS_IDENT) {
- // inherit
- // FIXME: These are not yet implemented (http://bugs.webkit.org/show_bug.cgi?id=6503).
- // none
- // normal
- switch (val->id) {
- case CSSValueNone:
- case CSSValueNormal:
- parsedValue = cssValuePool().createIdentifierValue(val->id);
- default:
- break;
- }
- } else if (val->unit == CSSPrimitiveValue::CSS_STRING) {
- parsedValue = createPrimitiveStringValue(val);
- }
- if (!parsedValue)
- break;
- values->append(parsedValue.release());
- m_valueList->next();
- }
-
- if (values->length()) {
- addProperty(propId, values.release(), important);
- m_valueList->next();
- return true;
- }
-
- return false;
-}
-
PassRefPtr<CSSValue> CSSPropertyParser::parseAttr(CSSParserValueList* args)
{
if (args->size() != 1)
« no previous file with comments | « sky/engine/core/css/parser/CSSPropertyParser.h ('k') | sky/engine/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698