| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |