Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp

Issue 2056593005: Move more helper methods out of CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698