Index: Source/core/html/HTMLFormControlElement.cpp |
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp |
index 4972a38a1bd7908f3be7cff35fbaaf736b078e9a..05ae5170943b1bad979fe4cd5ed0d8c6f6271a19 100644 |
--- a/Source/core/html/HTMLFormControlElement.cpp |
+++ b/Source/core/html/HTMLFormControlElement.cpp |
@@ -469,7 +469,7 @@ ValidationMessageClient* HTMLFormControlElement::validationMessageClient() const |
bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement> >* unhandledInvalidControls) |
{ |
- if (!willValidate() || isValidFormControlElement()) |
+ if (!willValidate() || isValidElement()) |
return true; |
// An event handler can deref this object. |
RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this); |
@@ -480,7 +480,7 @@ bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<F |
return false; |
} |
-bool HTMLFormControlElement::isValidFormControlElement() |
+bool HTMLFormControlElement::isValidElement() |
{ |
// If the following assertion fails, setNeedsValidityCheck() is not called |
// correctly when something which changes validity is updated. |
@@ -492,8 +492,9 @@ void HTMLFormControlElement::setNeedsValidityCheck() |
{ |
bool newIsValid = valid(); |
if (willValidate() && newIsValid != m_isValid) { |
- // Update style for pseudo classes such as :valid :invalid. |
- setNeedsStyleRecalc(SubtreeStyleChange); |
+ // A change here could've affected the style of the form itself and |
+ // other form elemetns, so recaluclate the entire form's subtree. |
+ formOwner()->setNeedsStyleRecalc(SubtreeStyleChange); |
keishi
2014/09/29 13:20:43
Form controls can use form attribute to get associ
Bartek Nowierski
2014/10/01 08:23:01
Done.
|
} |
m_isValid = newIsValid; |