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

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

Issue 10451107: Merge 118721 - Form controls in <fieldset disabled> should not be validated. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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') | no next file » | 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 119198)
+++ Source/WebCore/html/HTMLFormControlElement.cpp (working copy)
@@ -116,6 +116,11 @@
m_fieldSetAncestorValid = true;
}
+void HTMLFormControlElement::ancestorDisabledStateWasChanged()
+{
+ disabledAttributeChanged();
+}
+
void HTMLFormControlElement::parseAttribute(Attribute* attr)
{
if (attr->name() == formAttr)
@@ -129,6 +134,7 @@
bool oldReadOnly = m_readOnly;
m_readOnly = !attr->isNull();
if (oldReadOnly != m_readOnly) {
+ setNeedsWillValidateCheck();
setNeedsStyleRecalc();
if (renderer() && renderer()->style()->hasAppearance())
renderer()->theme()->stateChanged(renderer(), ReadOnlyState);
@@ -140,11 +146,11 @@
requiredAttributeChanged();
} else
HTMLElement::parseAttribute(attr);
- setNeedsWillValidateCheck();
}
void HTMLFormControlElement::disabledAttributeChanged()
{
+ setNeedsWillValidateCheck();
setNeedsStyleRecalc();
if (renderer() && renderer()->style()->hasAppearance())
renderer()->theme()->stateChanged(renderer(), EnabledState);
@@ -224,6 +230,7 @@
Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Node* insertionPoint)
{
+ m_fieldSetAncestorValid = false;
m_dataListAncestorState = Unknown;
setNeedsWillValidateCheck();
HTMLElement::insertedInto(insertionPoint);
@@ -367,7 +374,7 @@
if (m_dataListAncestorState == Unknown)
m_dataListAncestorState = NotInsideDataList;
}
- return m_dataListAncestorState == NotInsideDataList && !m_disabled && !m_readOnly;
+ return m_dataListAncestorState == NotInsideDataList && !disabled() && !m_readOnly;
}
bool HTMLFormControlElement::willValidate() const
« no previous file with comments | « Source/WebCore/html/HTMLFormControlElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698