Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #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)
| |
| 6 | |
| 7 #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,
| |
| 8 #include "core/css/CSSValueList.h" | |
| 9 #include "core/css/parser/CSSParserTokenRange.h" | |
| 10 #include "core/css/parser/CSSPropertyParser.h" | |
| 11 #include "core/css/parser/CSSPropertyParserHelpers.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 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
| |
| 16 CSSParserTokenRange& range, | |
| 17 const CSSParserContext& context) { | |
| 18 CSSValueID id = range.peek().id(); | |
| 19 if (id == CSSValueNone) | |
| 20 return CSSPropertyParserHelpers::consumeIdent(range); | |
| 21 | |
| 22 if (CSSValue* textEmphasisStyle = | |
| 23 CSSPropertyParserHelpers::consumeString(range)) | |
| 24 return textEmphasisStyle; | |
| 25 | |
| 26 CSSIdentifierValue* fill = | |
| 27 CSSPropertyParserHelpers::consumeIdent<CSSValueFilled, CSSValueOpen>( | |
| 28 range); | |
| 29 CSSIdentifierValue* shape = | |
| 30 CSSPropertyParserHelpers::consumeIdent<CSSValueDot, CSSValueCircle, | |
| 31 CSSValueDoubleCircle, | |
| 32 CSSValueTriangle, CSSValueSesame>( | |
| 33 range); | |
| 34 if (!fill) { | |
| 35 fill = CSSPropertyParserHelpers::consumeIdent<CSSValueFilled, CSSValueOpen>( | |
| 36 range); | |
| 37 } | |
| 38 if (fill && shape) { | |
| 39 CSSValueList* parsedValues = CSSValueList::createSpaceSeparated(); | |
| 40 parsedValues->append(*fill); | |
| 41 parsedValues->append(*shape); | |
| 42 return parsedValues; | |
| 43 } | |
| 44 if (fill) | |
| 45 return fill; | |
| 46 if (shape) | |
| 47 return shape; | |
| 48 return nullptr; | |
| 49 } | |
| 50 | |
| 51 } // namespace blink | |
| OLD | NEW |