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

Side by Side Diff: Source/core/html/HTMLFieldSetElement.cpp

Issue 69543007: Have NodeTraversal::nextSkippingChildren() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void HTMLFieldSetElement::disabledAttributeChanged() 60 void HTMLFieldSetElement::disabledAttributeChanged()
61 { 61 {
62 // This element must be updated before the style of nodes in its subtree get s recalculated. 62 // This element must be updated before the style of nodes in its subtree get s recalculated.
63 HTMLFormControlElement::disabledAttributeChanged(); 63 HTMLFormControlElement::disabledAttributeChanged();
64 invalidateDisabledStateUnder(this); 64 invalidateDisabledStateUnder(this);
65 } 65 }
66 66
67 void HTMLFieldSetElement::childrenChanged(bool changedByParser, Node* beforeChan ge, Node* afterChange, int childCountDelta) 67 void HTMLFieldSetElement::childrenChanged(bool changedByParser, Node* beforeChan ge, Node* afterChange, int childCountDelta)
68 { 68 {
69 HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, after Change, childCountDelta); 69 HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, after Change, childCountDelta);
70 for (Element* element = ElementTraversal::firstWithin(this); element; elemen t = ElementTraversal::nextSkippingChildren(element, this)) { 70 for (Element* element = ElementTraversal::firstWithin(this); element; elemen t = ElementTraversal::nextSkippingChildren(*element, this)) {
71 if (element->hasTagName(legendTag)) 71 if (element->hasTagName(legendTag))
72 invalidateDisabledStateUnder(element); 72 invalidateDisabledStateUnder(element);
73 } 73 }
74 } 74 }
75 75
76 bool HTMLFieldSetElement::supportsFocus() const 76 bool HTMLFieldSetElement::supportsFocus() const
77 { 77 {
78 return HTMLElement::supportsFocus(); 78 return HTMLElement::supportsFocus();
79 } 79 }
80 80
81 const AtomicString& HTMLFieldSetElement::formControlType() const 81 const AtomicString& HTMLFieldSetElement::formControlType() const
82 { 82 {
83 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString: :ConstructFromLiteral)); 83 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString: :ConstructFromLiteral));
84 return fieldset; 84 return fieldset;
85 } 85 }
86 86
87 RenderObject* HTMLFieldSetElement::createRenderer(RenderStyle*) 87 RenderObject* HTMLFieldSetElement::createRenderer(RenderStyle*)
88 { 88 {
89 return new RenderFieldset(this); 89 return new RenderFieldset(this);
90 } 90 }
91 91
92 HTMLLegendElement* HTMLFieldSetElement::legend() const 92 HTMLLegendElement* HTMLFieldSetElement::legend() const
93 { 93 {
94 for (Element* child = ElementTraversal::firstWithin(this); child; child = El ementTraversal::nextSkippingChildren(child, this)) { 94 for (Element* child = ElementTraversal::firstWithin(this); child; child = El ementTraversal::nextSkippingChildren(*child, this)) {
95 if (child->hasTagName(legendTag)) 95 if (child->hasTagName(legendTag))
96 return toHTMLLegendElement(child); 96 return toHTMLLegendElement(child);
97 } 97 }
98 return 0; 98 return 0;
99 } 99 }
100 100
101 PassRefPtr<HTMLCollection> HTMLFieldSetElement::elements() 101 PassRefPtr<HTMLCollection> HTMLFieldSetElement::elements()
102 { 102 {
103 return ensureCachedHTMLCollection(FormControls); 103 return ensureCachedHTMLCollection(FormControls);
104 } 104 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 { 136 {
137 refreshElementsIfNeeded(); 137 refreshElementsIfNeeded();
138 unsigned len = 0; 138 unsigned len = 0;
139 for (unsigned i = 0; i < m_associatedElements.size(); ++i) 139 for (unsigned i = 0; i < m_associatedElements.size(); ++i)
140 if (m_associatedElements[i]->isEnumeratable()) 140 if (m_associatedElements[i]->isEnumeratable())
141 ++len; 141 ++len;
142 return len; 142 return len;
143 } 143 }
144 144
145 } // namespace 145 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698