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

Unified Diff: Source/platform/Length.cpp

Issue 1111513003: Simplify parseHTMLAreaCoordinate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Length.cpp
diff --git a/Source/platform/Length.cpp b/Source/platform/Length.cpp
index 1b61e1861ada177cd8f94282a0dadd8ed6ef2a25..3b5bdc1aa4da4dd34470238ea0987598e508ba95 100644
--- a/Source/platform/Length.cpp
+++ b/Source/platform/Length.cpp
@@ -66,11 +66,7 @@ static Length parseHTMLAreaCoordinate(const CharType* data, unsigned length)
unsigned doubleLength;
splitLength(data, length, intLength, doubleLength);
- bool ok;
- int r = charactersToIntStrict(data, intLength, &ok);
- if (ok)
- return Length(r, Fixed);
- return Length(0, Fixed);
+ return Length(charactersToIntStrict(data, intLength), Fixed);
}
// FIXME: Per HTML5, this should follow the "rules for parsing a list of integers".
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698