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

Unified Diff: Source/core/css/parser/CSSParserValues.h

Issue 1128193002: Ignore declarations with out of range numeric values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/svg/css/script-tests/scientific-numbers.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSParserValues.h
diff --git a/Source/core/css/parser/CSSParserValues.h b/Source/core/css/parser/CSSParserValues.h
index 9bcb86c47527544275c8ce70cc9a3671c5ec18e5..b3fab29917349bc243c187b4cbc3c8a104f0d92f 100644
--- a/Source/core/css/parser/CSSParserValues.h
+++ b/Source/core/css/parser/CSSParserValues.h
@@ -268,11 +268,8 @@ inline void CSSParserValue::setFromNumber(double value, int unit)
{
id = CSSValueInvalid;
isInt = false;
- if (std::isfinite(value))
- fValue = value;
- else
- fValue = 0;
- this->unit = unit;
+ fValue = value;
+ this->unit = std::isfinite(value) ? unit : CSSPrimitiveValue::CSS_UNKNOWN;
}
inline void CSSParserValue::setFromOperator(UChar c)
« no previous file with comments | « LayoutTests/svg/css/script-tests/scientific-numbers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698