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

Unified Diff: Source/core/html/HTMLFormControlElement.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/HTMLFormControlElement.cpp
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
index 3ad09c1b9ffe14b63973f60877eb318aad4bf0be..4172bec52bcb9c7b99f11b5686de706c7198a3cb 100644
--- a/Source/core/html/HTMLFormControlElement.cpp
+++ b/Source/core/html/HTMLFormControlElement.cpp
@@ -152,7 +152,7 @@ void HTMLFormControlElement::parseAttribute(const QualifiedName& name, const Ato
m_isReadOnly = !value.isNull();
if (wasReadOnly != m_isReadOnly) {
setNeedsWillValidateCheck();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
if (renderer() && renderer()->style()->hasAppearance())
RenderTheme::theme().stateChanged(renderer(), ReadOnlyControlState);
}
@@ -187,7 +187,7 @@ void HTMLFormControlElement::requiredAttributeChanged()
setNeedsValidityCheck();
// Style recalculation is needed because style selectors may include
// :required and :optional pseudo-classes.
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToRequiredOptionalPseudoClass, SubtreeStyleChange);
rune 2014/09/08 08:27:57 This is an example of a case that should happen du
}
bool HTMLFormControlElement::supportsAutofocus() const
@@ -206,7 +206,7 @@ void HTMLFormControlElement::setAutofilled(bool autofilled)
return;
m_isAutofilled = autofilled;
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControlValue, SubtreeStyleChange);
}
static bool shouldAutofocusOnAttach(const HTMLFormControlElement* element)
@@ -394,7 +394,7 @@ void HTMLFormControlElement::setNeedsWillValidateCheck()
m_willValidateInitialized = true;
m_willValidate = newWillValidate;
setNeedsValidityCheck();
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
if (!m_willValidate)
hideVisibleValidationMessage();
}
@@ -489,7 +489,7 @@ void HTMLFormControlElement::setNeedsValidityCheck()
{
if (!m_validityIsDirty && willValidate()) {
// Update style for pseudo classes such as :valid :invalid.
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleRecalcDueToControl, SubtreeStyleChange);
m_validityIsDirty = true;
}

Powered by Google App Engine
This is Rietveld 408576698