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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 void DataTransfer::setDragImage(Element* image, int x, int y) 212 void DataTransfer::setDragImage(Element* image, int x, int y)
213 { 213 {
214 ASSERT(image); 214 ASSERT(image);
215 215
216 if (!isForDragAndDrop()) 216 if (!isForDragAndDrop())
217 return; 217 return;
218 218
219 IntPoint location(x, y); 219 IntPoint location(x, y);
220 if (isHTMLImageElement(*image) && !image->inDocument()) 220 if (isHTMLImageElement(*image) && !image->inShadowIncludingDocument())
221 setDragImageResource(toHTMLImageElement(*image).cachedImage(), location) ; 221 setDragImageResource(toHTMLImageElement(*image).cachedImage(), location) ;
222 else 222 else
223 setDragImageElement(image, location); 223 setDragImageElement(image, location);
224 } 224 }
225 225
226 void DataTransfer::clearDragImage() 226 void DataTransfer::clearDragImage()
227 { 227 {
228 if (!canSetDragImage()) 228 if (!canSetDragImage())
229 return; 229 return;
230 230
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 510
511 DEFINE_TRACE(DataTransfer) 511 DEFINE_TRACE(DataTransfer)
512 { 512 {
513 visitor->trace(m_dataObject); 513 visitor->trace(m_dataObject);
514 visitor->trace(m_dragImage); 514 visitor->trace(m_dragImage);
515 visitor->trace(m_dragImageElement); 515 visitor->trace(m_dragImageElement);
516 } 516 }
517 517
518 } // namespace blink 518 } // 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