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

Unified Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 620333002: Use invalidation sets for :invalid/:valid/:required/:optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 2 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/forms/TextFieldInputType.cpp
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp
index 93f9b6004e4acb57d7edba40cacd277485a1a5b1..ac8286164d5bd8907342d46aaa65ff04c518e268 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -491,8 +491,8 @@ void TextFieldInputType::subtreeHasChanged()
// sanitizeValue() is needed because IME input doesn't dispatch BeforeTextInsertedEvent.
element().setValueFromRenderer(sanitizeValue(convertFromVisibleValue(element().innerEditorValue())));
element().updatePlaceholderVisibility(false);
- // Recalc for :invalid change.
- element().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Invalid));
+ element().pseudoStateChanged(CSSSelector::PseudoValid);
+ element().pseudoStateChanged(CSSSelector::PseudoInvalid);
didSetValueByUserEdit(wasChanged ? ValueChangeStateChanged : ValueChangeStateNone);
}
« Source/core/html/HTMLFormControlElement.cpp ('K') | « Source/core/html/HTMLFormElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698