| 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 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "V8Clipboard.h" | 32 #include "V8Clipboard.h" |
| 33 | 33 |
| 34 #include "HTMLNames.h" | 34 #include "HTMLNames.h" |
| 35 #include "V8Node.h" | 35 #include "V8Node.h" |
| 36 #include "bindings/v8/V8Binding.h" | 36 #include "bindings/v8/V8Binding.h" |
| 37 #include "core/dom/Clipboard.h" | 37 #include "core/dom/Clipboard.h" |
| 38 #include "core/dom/Element.h" | 38 #include "core/dom/Element.h" |
| 39 #include "core/dom/Node.h" | 39 #include "core/dom/Node.h" |
| 40 #include "core/html/HTMLImageElement.h" | 40 #include "core/html/HTMLImageElement.h" |
| 41 #include "core/platform/graphics/IntPoint.h" | 41 #include "platform/geometry/IntPoint.h" |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| 45 void V8Clipboard::clearDataMethodCustom(const v8::FunctionCallbackInfo<v8::Value
>& args) | 45 void V8Clipboard::clearDataMethodCustom(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 46 { | 46 { |
| 47 Clipboard* clipboard = V8Clipboard::toNative(args.Holder()); | 47 Clipboard* clipboard = V8Clipboard::toNative(args.Holder()); |
| 48 | 48 |
| 49 if (!args.Length()) { | 49 if (!args.Length()) { |
| 50 clipboard->clearAllData(); | 50 clipboard->clearAllData(); |
| 51 return; | 51 return; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 return; | 84 return; |
| 85 } | 85 } |
| 86 | 86 |
| 87 if (toElement(node)->hasTagName(HTMLNames::imgTag) && !node->inDocument()) | 87 if (toElement(node)->hasTagName(HTMLNames::imgTag) && !node->inDocument()) |
| 88 clipboard->setDragImage(toHTMLImageElement(node)->cachedImage(), IntPoin
t(x, y)); | 88 clipboard->setDragImage(toHTMLImageElement(node)->cachedImage(), IntPoin
t(x, y)); |
| 89 else | 89 else |
| 90 clipboard->setDragImageElement(node, IntPoint(x, y)); | 90 clipboard->setDragImageElement(node, IntPoint(x, y)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace WebCore | 93 } // namespace WebCore |
| OLD | NEW |