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

Unified Diff: Source/core/html/HTMLObjectElement.cpp

Issue 171663005: Consistently use ElementTraversal API when looking for an Element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLObjectElement.cpp
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp
index 2879919fce53e5037bc832d5a646fa4f557d4899..cad947b6161d3e528dcbf4a06e13c680fca31395 100644
--- a/Source/core/html/HTMLObjectElement.cpp
+++ b/Source/core/html/HTMLObjectElement.cpp
@@ -145,7 +145,7 @@ void HTMLObjectElement::parametersForPlugin(Vector<String>& paramNames, Vector<S
// Scan the PARAM children and store their name/value pairs.
// Get the URL and type from the params if we don't already have them.
- for (Node* child = firstChild(); child; child = child->nextSibling()) {
+ for (Element* child = ElementTraversal::firstWithin(*this); child; child = ElementTraversal::nextSibling(*child)) {
if (!child->hasTagName(paramTag))
continue;
@@ -420,8 +420,8 @@ bool HTMLObjectElement::isExposed() const
if (ancestor->hasTagName(objectTag) && toHTMLObjectElement(ancestor)->isExposed())
return false;
}
- for (Node* node = firstChild(); node; node = NodeTraversal::next(*node, this)) {
- if (node->hasTagName(objectTag) || node->hasTagName(embedTag))
+ for (Element* element = ElementTraversal::firstWithin(*this); element; element = ElementTraversal::next(*element, this)) {
+ if (element->hasTagName(objectTag) || element->hasTagName(embedTag))
return false;
}
return true;
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698