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

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.cpp

Issue 2609933005: Implements CSSPropertyAPI for the webkit-text-emphasis-style property. (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..86d4995476d467fe0e6df3ef73460e2061674113
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.cpp
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.h"
Bugs Nash 2017/01/05 04:24:11 this file seems to be missing?
aazzam 2017/01/05 04:25:56 the .h files are generated! so I added a flag in C
Bugs Nash 2017/01/05 04:44:41 (y)
+
+#include "core/css/CSSStringValue.h"
Bugs Nash 2017/01/05 04:44:41 what is this needed for?
aazzam 2017/01/05 05:12:44 consumeString (line 22) returns a CSSStringValue,
+#include "core/css/CSSValueList.h"
+#include "core/css/parser/CSSParserTokenRange.h"
+#include "core/css/parser/CSSPropertyParser.h"
+#include "core/css/parser/CSSPropertyParserHelpers.h"
+
+namespace blink {
+
+const CSSValue* CSSPropertyAPIWebkitTextEmphasisStyle::parseSingleValue(
Bugs Nash 2017/01/05 04:44:41 where is this being called from?
aazzam 2017/01/05 05:12:44 in CSSPropertyParser.cpp, on this line - https://c
+ CSSParserTokenRange& range,
+ const CSSParserContext& context) {
+ CSSValueID id = range.peek().id();
+ if (id == CSSValueNone)
+ return CSSPropertyParserHelpers::consumeIdent(range);
+
+ if (CSSValue* textEmphasisStyle =
+ CSSPropertyParserHelpers::consumeString(range))
+ return textEmphasisStyle;
+
+ CSSIdentifierValue* fill =
+ CSSPropertyParserHelpers::consumeIdent<CSSValueFilled, CSSValueOpen>(
+ range);
+ CSSIdentifierValue* shape =
+ CSSPropertyParserHelpers::consumeIdent<CSSValueDot, CSSValueCircle,
+ CSSValueDoubleCircle,
+ CSSValueTriangle, CSSValueSesame>(
+ range);
+ if (!fill) {
+ fill = CSSPropertyParserHelpers::consumeIdent<CSSValueFilled, CSSValueOpen>(
+ range);
+ }
+ if (fill && shape) {
+ CSSValueList* parsedValues = CSSValueList::createSpaceSeparated();
+ parsedValues->append(*fill);
+ parsedValues->append(*shape);
+ return parsedValues;
+ }
+ if (fill)
+ return fill;
+ if (shape)
+ return shape;
+ return nullptr;
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698