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

Side by Side Diff: Source/core/clipboard/Clipboard.cpp

Issue 214053003: Don't use stale compositing state in LocalFrame::nodeImage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/compositing/drag-opacity-crash-expected.txt ('k') | Source/core/frame/LocalFrame.h » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « LayoutTests/compositing/drag-opacity-crash-expected.txt ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698