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

Unified Diff: third_party/WebKit/Source/core/html/HTMLLIElement.cpp

Issue 2490283002: Use parseHTMLInteger in HTMLLIElement (Closed)
Patch Set: Rename and move test Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/fast/lists/li-minimum-long-value-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLLIElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLIElement.cpp b/third_party/WebKit/Source/core/html/HTMLLIElement.cpp
index 011dab2f3042fe44430b9cdbc5cf9897170d565a..319dfea480e930bb17fc9c3cbe982eb40a8ba151 100644
--- a/third_party/WebKit/Source/core/html/HTMLLIElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLIElement.cpp
@@ -26,6 +26,7 @@
#include "core/CSSValueKeywords.h"
#include "core/HTMLNames.h"
#include "core/dom/LayoutTreeBuilderTraversal.h"
+#include "core/html/parser/HTMLParserIdioms.h"
#include "core/layout/LayoutListItem.h"
#include "core/layout/api/LayoutLIItem.h"
@@ -124,9 +125,8 @@ inline void HTMLLIElement::parseValue(const AtomicString& value) {
DCHECK(layoutObject());
DCHECK(layoutObject()->isListItem());
- bool valueOK;
- int requestedValue = value.toInt(&valueOK);
- if (valueOK)
+ int requestedValue = 0;
+ if (parseHTMLInteger(value, requestedValue))
toLayoutListItem(layoutObject())->setExplicitValue(requestedValue);
else
toLayoutListItem(layoutObject())->clearExplicitValue();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/lists/li-minimum-long-value-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698