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

Side by Side Diff: platform/chromium/PasteboardChromium.cpp

Issue 294023: WebCore fix for "Copy Image".... (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch
« no previous file with comments | « platform/chromium/ChromiumBridge.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 #if ENABLE(SVG) 140 #if ENABLE(SVG)
141 else if (node->hasTagName(SVGNames::imageTag)) 141 else if (node->hasTagName(SVGNames::imageTag))
142 urlString = static_cast<Element*>(node)->getAttribute(XLinkNames::hrefAt tr); 142 urlString = static_cast<Element*>(node)->getAttribute(XLinkNames::hrefAt tr);
143 #endif 143 #endif
144 else if (node->hasTagName(HTMLNames::embedTag) || node->hasTagName(HTMLNames ::objectTag)) { 144 else if (node->hasTagName(HTMLNames::embedTag) || node->hasTagName(HTMLNames ::objectTag)) {
145 Element* element = static_cast<Element*>(node); 145 Element* element = static_cast<Element*>(node);
146 urlString = element->getAttribute(element->imageSourceAttributeName()); 146 urlString = element->getAttribute(element->imageSourceAttributeName());
147 } 147 }
148 KURL url = urlString.isEmpty() ? KURL() : node->document()->completeURL(depr ecatedParseURL(urlString)); 148 KURL url = urlString.isEmpty() ? KURL() : node->document()->completeURL(depr ecatedParseURL(urlString));
149 149
150 NativeImageSkia* bitmap = 0; 150 NativeImagePtr bitmap = image->nativeImageForCurrentFrame();
151 #if !PLATFORM(CG)
152 bitmap = image->nativeImageForCurrentFrame();
153 #endif
154 ChromiumBridge::clipboardWriteImage(bitmap, url, title); 151 ChromiumBridge::clipboardWriteImage(bitmap, url, title);
155 } 152 }
156 153
157 bool Pasteboard::canSmartReplace() 154 bool Pasteboard::canSmartReplace()
158 { 155 {
159 return ChromiumBridge::clipboardIsFormatAvailable(PasteboardPrivate::WebSmar tPasteFormat, m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardP rivate::StandardBuffer); 156 return ChromiumBridge::clipboardIsFormatAvailable(PasteboardPrivate::WebSmar tPasteFormat, m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardP rivate::StandardBuffer);
160 } 157 }
161 158
162 String Pasteboard::plainText(Frame* frame) 159 String Pasteboard::plainText(Frame* frame)
163 { 160 {
(...skipping 25 matching lines...) Expand all
189 createFragmentFromText(context.get(), markup); 186 createFragmentFromText(context.get(), markup);
190 if (fragment) 187 if (fragment)
191 return fragment.release(); 188 return fragment.release();
192 } 189 }
193 } 190 }
194 191
195 return 0; 192 return 0;
196 } 193 }
197 194
198 } // namespace WebCore 195 } // namespace WebCore
OLDNEW
« no previous file with comments | « platform/chromium/ChromiumBridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698