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

Unified Diff: Source/core/editing/markup.cpp

Issue 68173014: Have ElementTraversal::firstWithin() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/shadow/ShadowRoot.cpp ('k') | Source/core/html/HTMLCollection.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 ba34662827a84dbc9c4cab77f74257b6d75085ff..09a908b8d02a50440df9ad37bc3b9d879cb88524 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -93,13 +93,13 @@ private:
String m_value;
};
-static void completeURLs(DocumentFragment* fragment, const String& baseURL)
+static void completeURLs(DocumentFragment& fragment, const String& baseURL)
{
Vector<AttributeChange> changes;
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();
@@ -648,7 +648,7 @@ PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document& document, const
fragment->parseHTML(markup, fakeBody.get(), parserContentPolicy);
if (!baseURL.isEmpty() && baseURL != blankURL() && baseURL != document.baseURL())
- completeURLs(fragment.get(), baseURL);
+ completeURLs(*fragment, baseURL);
return fragment.release();
}
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | Source/core/html/HTMLCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698