| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/parser/CSSTokenizer.h" | 5 #include "core/css/parser/CSSTokenizer.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 #include "core/CSSTokenizerCodepoints.cpp" | 8 #include "core/CSSTokenizerCodepoints.cpp" |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 CSSParserToken CSSTokenizer::blockStart(CSSParserTokenType blockType, | 108 CSSParserToken CSSTokenizer::blockStart(CSSParserTokenType blockType, |
| 109 CSSParserTokenType type, | 109 CSSParserTokenType type, |
| 110 StringView name) { | 110 StringView name) { |
| 111 m_blockStack.append(blockType); | 111 m_blockStack.append(blockType); |
| 112 return CSSParserToken(type, name, CSSParserToken::BlockStart); | 112 return CSSParserToken(type, name, CSSParserToken::BlockStart); |
| 113 } | 113 } |
| 114 | 114 |
| 115 CSSParserToken CSSTokenizer::blockEnd(CSSParserTokenType type, | 115 CSSParserToken CSSTokenizer::blockEnd(CSSParserTokenType type, |
| 116 CSSParserTokenType startType) { | 116 CSSParserTokenType startType) { |
| 117 if (!m_blockStack.isEmpty() && m_blockStack.last() == startType) { | 117 if (!m_blockStack.isEmpty() && m_blockStack.back() == startType) { |
| 118 m_blockStack.pop_back(); | 118 m_blockStack.pop_back(); |
| 119 return CSSParserToken(type, CSSParserToken::BlockEnd); | 119 return CSSParserToken(type, CSSParserToken::BlockEnd); |
| 120 } | 120 } |
| 121 return CSSParserToken(type); | 121 return CSSParserToken(type); |
| 122 } | 122 } |
| 123 | 123 |
| 124 CSSParserToken CSSTokenizer::leftParenthesis(UChar cc) { | 124 CSSParserToken CSSTokenizer::leftParenthesis(UChar cc) { |
| 125 return blockStart(LeftParenthesisToken); | 125 return blockStart(LeftParenthesisToken); |
| 126 } | 126 } |
| 127 | 127 |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 reconsume(first); | 675 reconsume(first); |
| 676 return areIdentifier; | 676 return areIdentifier; |
| 677 } | 677 } |
| 678 | 678 |
| 679 StringView CSSTokenizer::registerString(const String& string) { | 679 StringView CSSTokenizer::registerString(const String& string) { |
| 680 m_stringPool.append(string); | 680 m_stringPool.append(string); |
| 681 return string; | 681 return string; |
| 682 } | 682 } |
| 683 | 683 |
| 684 } // namespace blink | 684 } // namespace blink |
| OLD | NEW |