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

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

Issue 1483543003: No need for SubtreeStyleChange for results attribute change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 5 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/forms/search/search-results-attribute-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/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));
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/search/search-results-attribute-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698