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

Unified Diff: Source/core/editing/markup.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/editing/htmlediting.cpp ('k') | Source/core/html/FormAssociatedElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index 2a644bebb6f51a9d2556c1248a6d63400825e522..1a02d43f97b3636d6fa2d2b8f4fd01bc3cd0d1d4 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -99,7 +99,7 @@ static void completeURLs(DocumentFragment* fragment, const String& baseURL)
KURL parsedBaseURL(ParsedURLString, baseURL);
- for (Element* element = ElementTraversal::firstWithin(fragment); element; element = ElementTraversal::next(element, fragment)) {
+ for (Element* element = ElementTraversal::firstWithin(fragment); element; element = ElementTraversal::next(*element, fragment)) {
if (!element->hasAttributes())
continue;
unsigned length = element->attributeCount();
@@ -355,7 +355,7 @@ Node* StyledMarkupAccumulator::traverseNodesForSerialization(Node* startNode, No
if (!n)
break;
- next = NodeTraversal::next(n);
+ next = NodeTraversal::next(*n);
bool openedTag = false;
if (isBlock(n) && canHaveChildrenForEditing(n) && next == pastEnd)
@@ -657,7 +657,7 @@ static const char fragmentMarkerTag[] = "webkit-fragment-marker";
static bool findNodesSurroundingContext(Document* document, RefPtr<Node>& nodeBeforeContext, RefPtr<Node>& nodeAfterContext)
{
- for (Node* node = document->firstChild(); node; node = NodeTraversal::next(node)) {
+ for (Node* node = document->firstChild(); node; node = NodeTraversal::next(*node)) {
if (node->nodeType() == Node::COMMENT_NODE && toCharacterData(node)->data() == fragmentMarkerTag) {
if (!nodeBeforeContext)
nodeBeforeContext = node;
@@ -675,7 +675,7 @@ static void trimFragment(DocumentFragment* fragment, Node* nodeBeforeContext, No
RefPtr<Node> next;
for (RefPtr<Node> node = fragment->firstChild(); node; node = next) {
if (nodeBeforeContext->isDescendantOf(node.get())) {
- next = NodeTraversal::next(node.get());
+ next = NodeTraversal::next(*node);
continue;
}
next = NodeTraversal::nextSkippingChildren(node.get());
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/html/FormAssociatedElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698