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

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

Issue 10542040: Merge 118725 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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/HTMLFieldSetElement.h ('k') | Source/WebCore/html/HTMLFormControlElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLFieldSetElement.cpp
===================================================================
--- Source/WebCore/html/HTMLFieldSetElement.cpp (revision 119622)
+++ Source/WebCore/html/HTMLFieldSetElement.cpp (working copy)
@@ -45,14 +45,27 @@
return adoptRef(new HTMLFieldSetElement(tagName, document, form));
}
+void HTMLFieldSetElement::invalidateDisabledStateUnder(Element* base)
+{
+ for (Node* currentNode = base->traverseNextNode(base); currentNode; currentNode = currentNode->traverseNextNode(base)) {
+ if (currentNode && currentNode->isElementNode() && toElement(currentNode)->isFormControlElement())
+ static_cast<HTMLFormControlElement*>(currentNode)->ancestorDisabledStateWasChanged();
+ }
+}
+
void HTMLFieldSetElement::disabledAttributeChanged()
{
// This element must be updated before the style of nodes in its subtree gets recalculated.
HTMLFormControlElement::disabledAttributeChanged();
+ invalidateDisabledStateUnder(this);
+}
- for (Node* currentNode = this->traverseNextNode(this); currentNode; currentNode = currentNode->traverseNextNode(this)) {
- if (currentNode && currentNode->isElementNode() && toElement(currentNode)->isFormControlElement())
- static_cast<HTMLFormControlElement*>(currentNode)->ancestorDisabledStateWasChanged();
+void HTMLFieldSetElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+{
+ HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+ for (Element* element = firstElementChild(); element; element = element->nextElementSibling()) {
+ if (element->hasTagName(legendTag))
+ invalidateDisabledStateUnder(element);
}
}
« no previous file with comments | « Source/WebCore/html/HTMLFieldSetElement.h ('k') | Source/WebCore/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698