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/CSSPrimitiveValueUnitTrie.h" | 8 #include "core/css/CSSPrimitiveValueUnitTrie.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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 case RightBraceToken: | 287 case RightBraceToken: |
288 return builder.append('}'); | 288 return builder.append('}'); |
289 | 289 |
290 case EOFToken: | 290 case EOFToken: |
291 case CommentToken: | 291 case CommentToken: |
292 ASSERT_NOT_REACHED(); | 292 ASSERT_NOT_REACHED(); |
293 return; | 293 return; |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
| 297 bool CSSParserToken::isValidNumericValue(double value) |
| 298 { |
| 299 return value >= -std::numeric_limits<float>::max() |
| 300 && value <= std::numeric_limits<float>::max(); |
| 301 } |
| 302 |
| 303 bool CSSParserToken::isValidNumericValue() const |
| 304 { |
| 305 return isValidNumericValue(numericValue()); |
| 306 } |
| 307 |
297 } // namespace blink | 308 } // namespace blink |
OLD | NEW |