| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "HTMLNames.h" | 29 #include "HTMLNames.h" |
| 30 #include "core/clipboard/DataObject.h" | 30 #include "core/clipboard/DataObject.h" |
| 31 #include "core/clipboard/DataTransferItem.h" | 31 #include "core/clipboard/DataTransferItem.h" |
| 32 #include "core/clipboard/DataTransferItemList.h" | 32 #include "core/clipboard/DataTransferItemList.h" |
| 33 #include "core/editing/markup.h" | 33 #include "core/editing/markup.h" |
| 34 #include "core/fetch/ImageResource.h" | 34 #include "core/fetch/ImageResource.h" |
| 35 #include "core/fileapi/FileList.h" | 35 #include "core/fileapi/FileList.h" |
| 36 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
| 37 #include "core/html/HTMLImageElement.h" | 37 #include "core/html/HTMLImageElement.h" |
| 38 #include "core/rendering/RenderImage.h" | 38 #include "core/rendering/RenderImage.h" |
| 39 #include "core/rendering/RenderLayer.h" |
| 39 #include "core/rendering/RenderObject.h" | 40 #include "core/rendering/RenderObject.h" |
| 40 #include "platform/DragImage.h" | 41 #include "platform/DragImage.h" |
| 41 #include "platform/MIMETypeRegistry.h" | 42 #include "platform/MIMETypeRegistry.h" |
| 42 #include "platform/clipboard/ClipboardMimeTypes.h" | 43 #include "platform/clipboard/ClipboardMimeTypes.h" |
| 43 #include "platform/clipboard/ClipboardUtilities.h" | 44 #include "platform/clipboard/ClipboardUtilities.h" |
| 44 | 45 |
| 45 namespace WebCore { | 46 namespace WebCore { |
| 46 | 47 |
| 47 // These "conversion" methods are called by both WebCore and WebKit, and never m
ake sense to JS, so we don't | 48 // These "conversion" methods are called by both WebCore and WebKit, and never m
ake sense to JS, so we don't |
| 48 // worry about security for these. They don't allow access to the pasteboard any
way. | 49 // worry about security for these. They don't allow access to the pasteboard any
way. |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 235 |
| 235 void Clipboard::setDragImageElement(Node* node, const IntPoint& loc) | 236 void Clipboard::setDragImageElement(Node* node, const IntPoint& loc) |
| 236 { | 237 { |
| 237 setDragImage(0, node, loc); | 238 setDragImage(0, node, loc); |
| 238 } | 239 } |
| 239 | 240 |
| 240 PassOwnPtr<DragImage> Clipboard::createDragImage(IntPoint& loc, LocalFrame* fram
e) const | 241 PassOwnPtr<DragImage> Clipboard::createDragImage(IntPoint& loc, LocalFrame* fram
e) const |
| 241 { | 242 { |
| 242 if (m_dragImageElement) { | 243 if (m_dragImageElement) { |
| 243 loc = m_dragLoc; | 244 loc = m_dragLoc; |
| 245 |
| 246 // https://code.google.com/p/chromium/issues/detail?id=354373 |
| 247 DisableCompositingQueryAsserts disabler; |
| 244 return frame->nodeImage(m_dragImageElement.get()); | 248 return frame->nodeImage(m_dragImageElement.get()); |
| 245 } | 249 } |
| 246 if (m_dragImage) { | 250 if (m_dragImage) { |
| 247 loc = m_dragLoc; | 251 loc = m_dragLoc; |
| 248 return DragImage::create(m_dragImage->image()); | 252 return DragImage::create(m_dragImage->image()); |
| 249 } | 253 } |
| 250 return nullptr; | 254 return nullptr; |
| 251 } | 255 } |
| 252 | 256 |
| 253 static ImageResource* getImageResource(Element* element) | 257 static ImageResource* getImageResource(Element* element) |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 return String("copy"); | 525 return String("copy"); |
| 522 } | 526 } |
| 523 } | 527 } |
| 524 | 528 |
| 525 void Clipboard::trace(Visitor* visitor) | 529 void Clipboard::trace(Visitor* visitor) |
| 526 { | 530 { |
| 527 visitor->trace(m_dataObject); | 531 visitor->trace(m_dataObject); |
| 528 } | 532 } |
| 529 | 533 |
| 530 } // namespace WebCore | 534 } // namespace WebCore |
| OLD | NEW |