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

Unified Diff: Source/core/dom/Document.cpp

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 308b749a5a1b821bb9f7eb4eedd88d72bd87a0a6..f683e208514aa354a4ab66da75a1b72b4e534cde 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2060,7 +2060,7 @@ void Document::removeAllEventListeners()
if (DOMWindow* domWindow = this->domWindow())
domWindow->removeAllEventListeners();
- for (Node* node = firstChild(); node; node = NodeTraversal::next(node))
+ for (Node* node = firstChild(); node; node = NodeTraversal::next(*node))
node->removeAllEventListeners();
}
@@ -2641,7 +2641,7 @@ void Document::updateBaseURL()
if (!equalIgnoringFragmentIdentifier(oldBaseURL, m_baseURL)) {
// Base URL change changes any relative visited links.
// FIXME: There are other URLs in the tree that would need to be re-evaluated on dynamic base URL change. Style should be invalidated too.
- for (Element* element = ElementTraversal::firstWithin(this); element; element = ElementTraversal::next(element)) {
+ for (Element* element = ElementTraversal::firstWithin(this); element; element = ElementTraversal::next(*element)) {
if (isHTMLAnchorElement(element))
toHTMLAnchorElement(element)->invalidateCachedVisitedLinkHash();
}
@@ -2659,7 +2659,7 @@ void Document::processBaseElement()
// Find the first href attribute in a base element and the first target attribute in a base element.
const AtomicString* href = 0;
const AtomicString* target = 0;
- for (Element* element = ElementTraversal::firstWithin(this); element && (!href || !target); element = ElementTraversal::next(element)) {
+ for (Element* element = ElementTraversal::firstWithin(this); element && (!href || !target); element = ElementTraversal::next(*element)) {
if (element->hasTagName(baseTag)) {
if (!href) {
const AtomicString& value = element->fastGetAttribute(hrefAttr);
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698