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

Unified Diff: Source/WebCore/html/HTMLFormControlElement.cpp

Issue 9805002: Revert 105710 - Introduce RadioButtonGroup class to keep track of the group members and required st… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « Source/WebCore/html/HTMLFormControlElement.h ('k') | Source/WebCore/html/HTMLInputElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLFormControlElement.cpp
===================================================================
--- Source/WebCore/html/HTMLFormControlElement.cpp (revision 111481)
+++ Source/WebCore/html/HTMLFormControlElement.cpp (working copy)
@@ -122,21 +122,15 @@
} else if (attr->name() == requiredAttr) {
bool oldRequired = m_required;
m_required = !attr->isNull();
- if (oldRequired != m_required)
- requiredAttributeChanged();
+ if (oldRequired != m_required) {
+ setNeedsValidityCheck();
+ setNeedsStyleRecalc(); // Updates for :required :optional classes.
+ }
} else
HTMLElement::parseMappedAttribute(attr);
setNeedsWillValidateCheck();
}
-void HTMLFormControlElement::requiredAttributeChanged()
-{
- setNeedsValidityCheck();
- // Style recalculation is needed because style selectors may include
- // :required and :optional pseudo-classes.
- setNeedsStyleRecalc();
-}
-
static bool shouldAutofocus(HTMLFormControlElement* element)
{
if (!element->autofocus())
« no previous file with comments | « Source/WebCore/html/HTMLFormControlElement.h ('k') | Source/WebCore/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698