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

Side by Side Diff: Source/WebCore/html/HTMLFieldSetElement.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, 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 PassRefPtr<HTMLFieldSetElement> HTMLFieldSetElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form) 43 PassRefPtr<HTMLFieldSetElement> HTMLFieldSetElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
44 { 44 {
45 return adoptRef(new HTMLFieldSetElement(tagName, document, form)); 45 return adoptRef(new HTMLFieldSetElement(tagName, document, form));
46 } 46 }
47 47
48 void HTMLFieldSetElement::disabledAttributeChanged() 48 void HTMLFieldSetElement::disabledAttributeChanged()
49 { 49 {
50 // This element must be updated before the style of nodes in its subtree get s recalculated. 50 // This element must be updated before the style of nodes in its subtree get s recalculated.
51 HTMLFormControlElement::disabledAttributeChanged(); 51 HTMLFormControlElement::disabledAttributeChanged();
52 52
53 for (Node* currentNode = this; currentNode; currentNode = currentNode->trave rseNextNode(this)) { 53 for (Node* currentNode = this->traverseNextNode(this); currentNode; currentN ode = currentNode->traverseNextNode(this)) {
54 if (currentNode && currentNode->isElementNode() && toElement(currentNode )->isFormControlElement()) 54 if (currentNode && currentNode->isElementNode() && toElement(currentNode )->isFormControlElement())
55 static_cast<HTMLFormControlElement*>(currentNode)->setNeedsStyleReca lc(); 55 static_cast<HTMLFormControlElement*>(currentNode)->ancestorDisabledS tateWasChanged();
56 } 56 }
57 } 57 }
58 58
59 bool HTMLFieldSetElement::supportsFocus() const 59 bool HTMLFieldSetElement::supportsFocus() const
60 { 60 {
61 return HTMLElement::supportsFocus(); 61 return HTMLElement::supportsFocus();
62 } 62 }
63 63
64 const AtomicString& HTMLFieldSetElement::formControlType() const 64 const AtomicString& HTMLFieldSetElement::formControlType() const
65 { 65 {
66 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset")); 66 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset"));
67 return fieldset; 67 return fieldset;
68 } 68 }
69 69
70 RenderObject* HTMLFieldSetElement::createRenderer(RenderArena* arena, RenderStyl e*) 70 RenderObject* HTMLFieldSetElement::createRenderer(RenderArena* arena, RenderStyl e*)
71 { 71 {
72 return new (arena) RenderFieldset(this); 72 return new (arena) RenderFieldset(this);
73 } 73 }
74 74
75 HTMLLegendElement* HTMLFieldSetElement::legend() const 75 HTMLLegendElement* HTMLFieldSetElement::legend() const
76 { 76 {
77 for (Element* node = firstElementChild(); node; node = node->nextElementSibl ing()) { 77 for (Element* node = firstElementChild(); node; node = node->nextElementSibl ing()) {
78 if (node->hasTagName(legendTag)) 78 if (node->hasTagName(legendTag))
79 return static_cast<HTMLLegendElement*>(node); 79 return static_cast<HTMLLegendElement*>(node);
80 } 80 }
81 return 0; 81 return 0;
82 } 82 }
83 83
84 } // namespace 84 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/fieldset/validation-in-fieldset-expected.txt ('k') | Source/WebCore/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698