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

Side by Side Diff: third_party/WebKit/Source/core/clipboard/DataTransfer.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 211 }
212 212
213 void DataTransfer::setDragImage(Element* image, int x, int y) 213 void DataTransfer::setDragImage(Element* image, int x, int y)
214 { 214 {
215 ASSERT(image); 215 ASSERT(image);
216 216
217 if (!isForDragAndDrop()) 217 if (!isForDragAndDrop())
218 return; 218 return;
219 219
220 IntPoint location(x, y); 220 IntPoint location(x, y);
221 if (isHTMLImageElement(*image) && !image->inShadowIncludingDocument()) 221 if (isHTMLImageElement(*image) && !image->isConnected())
222 setDragImageResource(toHTMLImageElement(*image).cachedImage(), location) ; 222 setDragImageResource(toHTMLImageElement(*image).cachedImage(), location) ;
223 else 223 else
224 setDragImageElement(image, location); 224 setDragImageElement(image, location);
225 } 225 }
226 226
227 void DataTransfer::clearDragImage() 227 void DataTransfer::clearDragImage()
228 { 228 {
229 if (!canSetDragImage()) 229 if (!canSetDragImage())
230 return; 230 return;
231 231
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 } 510 }
511 511
512 DEFINE_TRACE(DataTransfer) 512 DEFINE_TRACE(DataTransfer)
513 { 513 {
514 visitor->trace(m_dataObject); 514 visitor->trace(m_dataObject);
515 visitor->trace(m_dragImage); 515 visitor->trace(m_dragImage);
516 visitor->trace(m_dragImageElement); 516 visitor->trace(m_dragImageElement);
517 } 517 }
518 518
519 } // namespace blink 519 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp ('k') | third_party/WebKit/Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698