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

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: reasons as tuple 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 015a8812751d7e2facc25299a71bb46df48a788d..d44796f95e8caafdfaf5ec105b42dfca36bc3dd9 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -646,7 +646,7 @@ void HTMLSelectElement::setActiveSelectionEndIndex(int index)
if (index == m_activeSelectionEndIndex)
return;
m_activeSelectionEndIndex = index;
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::Control), SubtreeStyleChange);
}
void HTMLSelectElement::updateListBoxSelection(bool deselectOtherOptions)
@@ -770,7 +770,7 @@ void HTMLSelectElement::setRecalcListItems()
// Manual selection anchor is reset when manipulating the select programmatically.
m_activeSelectionAnchorIndex = -1;
setOptionsChangedOnRenderer();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::ControlValue), SubtreeStyleChange);
if (!inDocument()) {
if (HTMLOptionsCollection* collection = cachedCollection<HTMLOptionsCollection>(SelectOptions))
collection->invalidateCache();
@@ -1154,7 +1154,7 @@ void HTMLSelectElement::resetImpl()
firstOption->setSelectedState(true);
setOptionsChangedOnRenderer();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::ControlValue), SubtreeStyleChange);
setNeedsValidityCheck();
}

Powered by Google App Engine
This is Rietveld 408576698