| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void Clipboard::setDragImageElement(Node* node, const IntPoint& loc) | 236 void Clipboard::setDragImageElement(Node* node, const IntPoint& loc) |
| 237 { | 237 { |
| 238 setDragImage(0, node, loc); | 238 setDragImage(0, node, loc); |
| 239 } | 239 } |
| 240 | 240 |
| 241 PassOwnPtr<DragImage> Clipboard::createDragImage(IntPoint& loc, LocalFrame* fram
e) const | 241 PassOwnPtr<DragImage> Clipboard::createDragImage(IntPoint& loc, LocalFrame* fram
e) const |
| 242 { | 242 { |
| 243 if (m_dragImageElement) { | 243 if (m_dragImageElement) { |
| 244 loc = m_dragLoc; | 244 loc = m_dragLoc; |
| 245 | 245 |
| 246 // https://code.google.com/p/chromium/issues/detail?id=354373 | 246 return frame->nodeImage(*m_dragImageElement); |
| 247 DisableCompositingQueryAsserts disabler; | |
| 248 return frame->nodeImage(m_dragImageElement.get()); | |
| 249 } | 247 } |
| 250 if (m_dragImage) { | 248 if (m_dragImage) { |
| 251 loc = m_dragLoc; | 249 loc = m_dragLoc; |
| 252 return DragImage::create(m_dragImage->image()); | 250 return DragImage::create(m_dragImage->image()); |
| 253 } | 251 } |
| 254 return nullptr; | 252 return nullptr; |
| 255 } | 253 } |
| 256 | 254 |
| 257 static ImageResource* getImageResource(Element* element) | 255 static ImageResource* getImageResource(Element* element) |
| 258 { | 256 { |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 return String("copy"); | 523 return String("copy"); |
| 526 } | 524 } |
| 527 } | 525 } |
| 528 | 526 |
| 529 void Clipboard::trace(Visitor* visitor) | 527 void Clipboard::trace(Visitor* visitor) |
| 530 { | 528 { |
| 531 visitor->trace(m_dataObject); | 529 visitor->trace(m_dataObject); |
| 532 } | 530 } |
| 533 | 531 |
| 534 } // namespace WebCore | 532 } // namespace WebCore |
| OLD | NEW |