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); |
} |