| 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/CSSParserToken.h" | 5 #include "core/css/parser/CSSParserToken.h" |
| 6 | 6 |
| 7 #include "core/css/CSSMarkup.h" | 7 #include "core/css/CSSMarkup.h" |
| 8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
| 9 #include "core/css/parser/CSSPropertyParser.h" | 9 #include "core/css/parser/CSSPropertyParser.h" |
| 10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ASSERT(type == NumberToken); | 42 ASSERT(type == NumberToken); |
| 43 m_numericValue = | 43 m_numericValue = |
| 44 clampTo<double>(numericValue, -std::numeric_limits<float>::max(), | 44 clampTo<double>(numericValue, -std::numeric_limits<float>::max(), |
| 45 std::numeric_limits<float>::max()); | 45 std::numeric_limits<float>::max()); |
| 46 } | 46 } |
| 47 | 47 |
| 48 CSSParserToken::CSSParserToken(CSSParserTokenType type, | 48 CSSParserToken::CSSParserToken(CSSParserTokenType type, |
| 49 UChar32 start, | 49 UChar32 start, |
| 50 UChar32 end) | 50 UChar32 end) |
| 51 : m_type(UnicodeRangeToken), m_blockType(NotBlock) { | 51 : m_type(UnicodeRangeToken), m_blockType(NotBlock) { |
| 52 ASSERT_UNUSED(type, type == UnicodeRangeToken); | 52 DCHECK_EQ(type, UnicodeRangeToken); |
| 53 m_unicodeRange.start = start; | 53 m_unicodeRange.start = start; |
| 54 m_unicodeRange.end = end; | 54 m_unicodeRange.end = end; |
| 55 } | 55 } |
| 56 | 56 |
| 57 CSSParserToken::CSSParserToken(HashTokenType type, StringView value) | 57 CSSParserToken::CSSParserToken(HashTokenType type, StringView value) |
| 58 : m_type(HashToken), m_blockType(NotBlock), m_hashTokenType(type) { | 58 : m_type(HashToken), m_blockType(NotBlock), m_hashTokenType(type) { |
| 59 initValueFromStringView(value); | 59 initValueFromStringView(value); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void CSSParserToken::convertToDimensionWithUnit(StringView unit) { | 62 void CSSParserToken::convertToDimensionWithUnit(StringView unit) { |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 return builder.append('}'); | 277 return builder.append('}'); |
| 278 | 278 |
| 279 case EOFToken: | 279 case EOFToken: |
| 280 case CommentToken: | 280 case CommentToken: |
| 281 ASSERT_NOT_REACHED(); | 281 ASSERT_NOT_REACHED(); |
| 282 return; | 282 return; |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace blink | 286 } // namespace blink |
| OLD | NEW |