| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/css/properties/CSSPropertyAPIContent.h" | 5 #include "core/css/properties/CSSPropertyAPIContent.h" |
| 6 | 6 |
| 7 #include "core/CSSValueKeywords.h" | 7 #include "core/CSSValueKeywords.h" |
| 8 #include "core/css/CSSCounterValue.h" | 8 #include "core/css/CSSCounterValue.h" |
| 9 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
| 10 #include "core/css/CSSStringValue.h" | 10 #include "core/css/CSSStringValue.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 if (args.Peek().GetType() != kIdentToken) | 23 if (args.Peek().GetType() != kIdentToken) |
| 24 return nullptr; | 24 return nullptr; |
| 25 | 25 |
| 26 AtomicString attr_name = | 26 AtomicString attr_name = |
| 27 args.ConsumeIncludingWhitespace().Value().ToAtomicString(); | 27 args.ConsumeIncludingWhitespace().Value().ToAtomicString(); |
| 28 if (!args.AtEnd()) | 28 if (!args.AtEnd()) |
| 29 return nullptr; | 29 return nullptr; |
| 30 | 30 |
| 31 // TODO(esprehn): This should be lowerASCII(). | 31 // TODO(esprehn): This should be lowerASCII(). |
| 32 if (context->IsHTMLDocument()) | 32 if (context->IsHTMLDocument()) |
| 33 attr_name = attr_name.Lower(); | 33 attr_name = attr_name.DeprecatedLower(); |
| 34 | 34 |
| 35 CSSFunctionValue* attr_value = CSSFunctionValue::Create(CSSValueAttr); | 35 CSSFunctionValue* attr_value = CSSFunctionValue::Create(CSSValueAttr); |
| 36 attr_value->Append(*CSSCustomIdentValue::Create(attr_name)); | 36 attr_value->Append(*CSSCustomIdentValue::Create(attr_name)); |
| 37 return attr_value; | 37 return attr_value; |
| 38 } | 38 } |
| 39 | 39 |
| 40 CSSValue* ConsumeCounterContent(CSSParserTokenRange args, bool counters) { | 40 CSSValue* ConsumeCounterContent(CSSParserTokenRange args, bool counters) { |
| 41 CSSCustomIdentValue* identifier = | 41 CSSCustomIdentValue* identifier = |
| 42 CSSPropertyParserHelpers::ConsumeCustomIdent(args); | 42 CSSPropertyParserHelpers::ConsumeCustomIdent(args); |
| 43 if (!identifier) | 43 if (!identifier) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 if (!parsed_value) | 105 if (!parsed_value) |
| 106 return nullptr; | 106 return nullptr; |
| 107 } | 107 } |
| 108 values->Append(*parsed_value); | 108 values->Append(*parsed_value); |
| 109 } while (!range.AtEnd()); | 109 } while (!range.AtEnd()); |
| 110 | 110 |
| 111 return values; | 111 return values; |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace blink | 114 } // namespace blink |
| OLD | NEW |