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

Unified Diff: Source/core/html/HTMLInputElement.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/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 253c04bd2f005c3d7b92a0c8d353b10a9c39e963..bbafa7e710452252bdc57dd44ab7d98e0b0db5a7 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -660,7 +660,7 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
// We only need to setChanged if the form is looking at the default value right now.
if (!hasDirtyValue()) {
updatePlaceholderVisibility(false);
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControlValue, SubtreeStyleChange);
}
m_needsToUpdateViewValue = true;
setNeedsValidityCheck();
@@ -700,10 +700,10 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
// time to relayout for this change.
if (m_maxResults != oldResults && (m_maxResults <= 0 || oldResults <= 0))
lazyReattachIfAttached();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
UseCounter::count(document(), UseCounter::ResultsAttribute);
} else if (name == incrementalAttr) {
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
UseCounter::count(document(), UseCounter::IncrementalAttribute);
} else if (name == minAttr) {
m_inputTypeView->minOrMaxAttributeChanged();
@@ -856,7 +856,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
RefPtrWillBeRawPtr<HTMLInputElement> protector(this);
m_reflectsCheckedAttribute = false;
m_isChecked = nowChecked;
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
if (RadioButtonGroupScope* scope = radioButtonGroupScope())
scope->updateCheckedState(this);
@@ -970,7 +970,7 @@ void HTMLInputElement::setSuggestedValue(const String& value)
return;
m_needsToUpdateViewValue = true;
m_suggestedValue = sanitizeValue(value);
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControlValue, SubtreeStyleChange);
m_inputTypeView->updateView();
}
@@ -1685,7 +1685,7 @@ void HTMLInputElement::parseMaxLengthAttribute(const AtomicString& value)
m_maxLength = maxLength;
if (oldMaxLength != maxLength)
updateValueIfNeeded();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
setNeedsValidityCheck();
}

Powered by Google App Engine
This is Rietveld 408576698