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

Unified Diff: Source/core/platform/chromium/PasteboardChromium.cpp

Issue 18278003: Introduce isSVGFontElement() and isSVGImageElement(), and use them (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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/loader/cache/CachedFont.cpp ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/chromium/PasteboardChromium.cpp
diff --git a/Source/core/platform/chromium/PasteboardChromium.cpp b/Source/core/platform/chromium/PasteboardChromium.cpp
index fd1711ff43a7fd6eebad42f898d5ea7e0b305aff..891ca9586bef511cec3f6aae93112b8d7fc7ab3d 100644
--- a/Source/core/platform/chromium/PasteboardChromium.cpp
+++ b/Source/core/platform/chromium/PasteboardChromium.cpp
@@ -48,6 +48,7 @@
#include "core/platform/graphics/Image.h"
#include "core/platform/graphics/skia/NativeImageSkia.h"
#include "core/rendering/RenderImage.h"
+#include "core/svg/SVGImageElement.h"
#include "public/platform/Platform.h"
#include "public/platform/WebClipboard.h"
#include "public/platform/WebDragData.h"
@@ -144,7 +145,7 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
AtomicString urlString;
if (node->hasTagName(HTMLNames::imgTag) || node->hasTagName(HTMLNames::inputTag))
urlString = toElement(node)->getAttribute(HTMLNames::srcAttr);
- else if (node->hasTagName(SVGNames::imageTag))
+ else if (isSVGImageElement(node))
urlString = toElement(node)->getAttribute(XLinkNames::hrefAttr);
else if (node->hasTagName(HTMLNames::embedTag) || node->hasTagName(HTMLNames::objectTag)) {
Element* element = toElement(node);
« no previous file with comments | « Source/core/loader/cache/CachedFont.cpp ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698