Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
index c1ef198709fc3bee741667419f01790e794bcf5e..a7ea1b235fdf9e17d8f9bbdf04d00ce15e9a5abf 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
@@ -750,9 +750,8 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr |
m_maxResults = !value.isNull() ? std::min(value.toInt(), maxSavedResults) : -1; |
// FIXME: Detaching just for maxResults change is not ideal. We should figure out the right |
// time to relayout for this change. |
- if (m_maxResults != oldResults && (m_maxResults <= 0 || oldResults <= 0)) |
+ if ((m_maxResults < 0) != (oldResults < 0)) |
lazyReattachIfAttached(); |
- setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::fromAttribute(resultsAttr)); |
UseCounter::count(document(), UseCounter::ResultsAttribute); |
} else if (name == incrementalAttr) { |
setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::fromAttribute(incrementalAttr)); |