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

Unified Diff: Source/core/html/HTMLSelectElement.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 906812120075f2065568cbede9200c54123b4cd9..9f014ed3f48465e0b859b73af1cb4c5c6e7b5406 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -647,7 +647,7 @@ void HTMLSelectElement::setActiveSelectionEndIndex(int index)
if (index == m_activeSelectionEndIndex)
return;
m_activeSelectionEndIndex = index;
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
}
void HTMLSelectElement::updateListBoxSelection(bool deselectOtherOptions)
@@ -771,7 +771,7 @@ void HTMLSelectElement::setRecalcListItems()
// Manual selection anchor is reset when manipulating the select programmatically.
m_activeSelectionAnchorIndex = -1;
setOptionsChangedOnRenderer();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControlValue, SubtreeStyleChange);
if (!inDocument()) {
if (HTMLOptionsCollection* collection = cachedCollection<HTMLOptionsCollection>(SelectOptions))
collection->invalidateCache();
@@ -1153,7 +1153,7 @@ void HTMLSelectElement::resetImpl()
firstOption->setSelectedState(true);
setOptionsChangedOnRenderer();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControlValue, SubtreeStyleChange);
setNeedsValidityCheck();
}

Powered by Google App Engine
This is Rietveld 408576698