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

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: use const char[] 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 e29df48ac983220bd7ef1dd34be6a5f97faf5317..f471828b02fc01dc64a44d17d026c2e804c706fc 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -659,7 +659,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(StyleChangeReasonForTracing::ControlValue, SubtreeStyleChange);
esprehn 2014/09/19 04:53:10 ditto for all of these.
kouhei (in TOK) 2014/09/22 09:03:54 Done.
}
m_needsToUpdateViewValue = true;
setNeedsValidityCheck();
@@ -699,10 +699,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(StyleChangeReasonForTracing::Control, SubtreeStyleChange);
UseCounter::count(document(), UseCounter::ResultsAttribute);
} else if (name == incrementalAttr) {
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::Control, SubtreeStyleChange);
UseCounter::count(document(), UseCounter::IncrementalAttribute);
} else if (name == minAttr) {
m_inputTypeView->minOrMaxAttributeChanged();
@@ -855,7 +855,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
RefPtrWillBeRawPtr<HTMLInputElement> protector(this);
m_reflectsCheckedAttribute = false;
m_isChecked = nowChecked;
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::Control, SubtreeStyleChange);
if (RadioButtonGroupScope* scope = radioButtonGroupScope())
scope->updateCheckedState(this);
@@ -969,7 +969,7 @@ void HTMLInputElement::setSuggestedValue(const String& value)
return;
m_needsToUpdateViewValue = true;
m_suggestedValue = sanitizeValue(value);
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::ControlValue, SubtreeStyleChange);
m_inputTypeView->updateView();
}
@@ -1684,7 +1684,7 @@ void HTMLInputElement::parseMaxLengthAttribute(const AtomicString& value)
m_maxLength = maxLength;
if (oldMaxLength != maxLength)
updateValueIfNeeded();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::Control, SubtreeStyleChange);
setNeedsValidityCheck();
}

Powered by Google App Engine
This is Rietveld 408576698