| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 if (!args.Length()) { | 69 if (!args.Length()) { |
| 70 clipboard->clearAllData(); | 70 clipboard->clearAllData(); |
| 71 return; | 71 return; |
| 72 } | 72 } |
| 73 | 73 |
| 74 if (args.Length() != 1) { | 74 if (args.Length() != 1) { |
| 75 throwError(v8SyntaxError, "clearData: Invalid number of arguments", args
.GetIsolate()); | 75 throwError(v8SyntaxError, "clearData: Invalid number of arguments", args
.GetIsolate()); |
| 76 return; | 76 return; |
| 77 } | 77 } |
| 78 | 78 |
| 79 String type = toWebCoreString(args[0]); | 79 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]); |
| 80 clipboard->clearData(type); | 80 clipboard->clearData(type); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void V8Clipboard::setDragImageMethodCustom(const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 83 void V8Clipboard::setDragImageMethodCustom(const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 84 { | 84 { |
| 85 Clipboard* clipboard = V8Clipboard::toNative(args.Holder()); | 85 Clipboard* clipboard = V8Clipboard::toNative(args.Holder()); |
| 86 | 86 |
| 87 if (!clipboard->isForDragAndDrop()) | 87 if (!clipboard->isForDragAndDrop()) |
| 88 return; | 88 return; |
| 89 | 89 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 104 return; | 104 return; |
| 105 } | 105 } |
| 106 | 106 |
| 107 if (toElement(node)->hasTagName(HTMLNames::imgTag) && !node->inDocument()) | 107 if (toElement(node)->hasTagName(HTMLNames::imgTag) && !node->inDocument()) |
| 108 clipboard->setDragImage(toHTMLImageElement(node)->cachedImage(), IntPoin
t(x, y)); | 108 clipboard->setDragImage(toHTMLImageElement(node)->cachedImage(), IntPoin
t(x, y)); |
| 109 else | 109 else |
| 110 clipboard->setDragImageElement(node, IntPoint(x, y)); | 110 clipboard->setDragImageElement(node, IntPoint(x, y)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace WebCore | 113 } // namespace WebCore |
| OLD | NEW |