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

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

Issue 64113006: Rename es => exceptionState in core/dom (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | « Source/core/dom/CharacterData.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (m_dataObject->item(i)->kind() == DataTransferItem::kindFile) { 204 if (m_dataObject->item(i)->kind() == DataTransferItem::kindFile) {
205 RefPtr<Blob> blob = m_dataObject->item(i)->getAsFile(); 205 RefPtr<Blob> blob = m_dataObject->item(i)->getAsFile();
206 if (blob && blob->isFile()) 206 if (blob && blob->isFile())
207 files->append(toFile(blob.get())); 207 files->append(toFile(blob.get()));
208 } 208 }
209 } 209 }
210 210
211 return files.release(); 211 return files.release();
212 } 212 }
213 213
214 void Clipboard::setDragImage(Element* image, int x, int y, ExceptionState& es) 214 void Clipboard::setDragImage(Element* image, int x, int y, ExceptionState& excep tionState)
215 { 215 {
216 if (!isForDragAndDrop()) 216 if (!isForDragAndDrop())
217 return; 217 return;
218 218
219 if (!image) { 219 if (!image) {
220 es.throwTypeError("setDragImage: Invalid first argument"); 220 exceptionState.throwTypeError("setDragImage: Invalid first argument");
221 return; 221 return;
222 } 222 }
223 IntPoint location(x, y); 223 IntPoint location(x, y);
224 if (image->hasTagName(HTMLNames::imgTag) && !image->inDocument()) 224 if (image->hasTagName(HTMLNames::imgTag) && !image->inDocument())
225 setDragImageResource(toHTMLImageElement(image)->cachedImage(), location) ; 225 setDragImageResource(toHTMLImageElement(image)->cachedImage(), location) ;
226 else 226 else
227 setDragImageElement(image, location); 227 setDragImageElement(image, location);
228 } 228 }
229 229
230 void Clipboard::setDragImageResource(ImageResource* img, const IntPoint& loc) 230 void Clipboard::setDragImageResource(ImageResource* img, const IntPoint& loc)
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 case DragOperationMove: 516 case DragOperationMove:
517 return String("move"); 517 return String("move");
518 case DragOperationLink: 518 case DragOperationLink:
519 return String("link"); 519 return String("link");
520 default: 520 default:
521 return String("copy"); 521 return String("copy");
522 } 522 }
523 } 523 }
524 524
525 } // namespace WebCore 525 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698