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 |