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

Unified Diff: Source/core/platform/Pasteboard.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/page/animation/KeyframeAnimation.cpp ('k') | Source/core/rendering/AutoTableLayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/Pasteboard.cpp
diff --git a/Source/core/platform/Pasteboard.cpp b/Source/core/platform/Pasteboard.cpp
index 1aa983af506e00859e3bc0854563af02b3427882..9a391e16864d8d56e5e5b98069bcec7578b30e02 100644
--- a/Source/core/platform/Pasteboard.cpp
+++ b/Source/core/platform/Pasteboard.cpp
@@ -78,7 +78,7 @@ void Pasteboard::setSelectionMode(bool selectionMode)
void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, const String& text)
{
String html = createMarkup(selectedRange, 0, AnnotateForInterchange, false, ResolveNonLocalURLs);
- KURL url = selectedRange->startContainer()->document()->url();
+ KURL url = selectedRange->startContainer()->document().url();
String plainText = text;
#if OS(WINDOWS)
replaceNewlinesWithWindowsStyleNewlines(plainText);
@@ -141,7 +141,7 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
urlString = toElement(node)->getAttribute(XLinkNames::hrefAttr);
else if (node->hasTagName(HTMLNames::embedTag) || node->hasTagName(HTMLNames::objectTag))
urlString = toElement(node)->imageSourceURL();
- KURL url = urlString.isEmpty() ? KURL() : node->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
+ KURL url = urlString.isEmpty() ? KURL() : node->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
WebKit::WebImage webImage = bitmap->bitmap();
WebKit::Platform::current()->clipboard()->writeImage(webImage, WebKit::WebURL(url), WebKit::WebString(title));
}
« no previous file with comments | « Source/core/page/animation/KeyframeAnimation.cpp ('k') | Source/core/rendering/AutoTableLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698