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

Side by Side Diff: Source/WebCore/bindings/v8/custom/V8EventCustom.cpp

Issue 12386021: Revert 144142 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1425/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « Source/WebCore/bindings/scripts/CodeGeneratorV8.pm ('k') | no next file » | 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 24 matching lines...) Expand all
35 #include "ClipboardEvent.h" 35 #include "ClipboardEvent.h"
36 #include "Event.h" 36 #include "Event.h"
37 #include "EventHeaders.h" 37 #include "EventHeaders.h"
38 #include "EventInterfaces.h" 38 #include "EventInterfaces.h"
39 #include "EventNames.h" 39 #include "EventNames.h"
40 #include "V8Binding.h" 40 #include "V8Binding.h"
41 #include "V8Clipboard.h" 41 #include "V8Clipboard.h"
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 v8::Handle<v8::Value> V8Event::dataTransferAttrGetterCustom(v8::Local<v8::String > name, const v8::AccessorInfo& info)
46 {
47 Event* event = V8Event::toNative(info.Holder());
48
49 if (event->isDragEvent())
50 return toV8Fast(static_cast<MouseEvent*>(event)->clipboard(), info, even t);
51
52 return v8::Undefined();
53 }
54
45 v8::Handle<v8::Value> V8Event::clipboardDataAttrGetterCustom(v8::Local<v8::Strin g> name, const v8::AccessorInfo& info) 55 v8::Handle<v8::Value> V8Event::clipboardDataAttrGetterCustom(v8::Local<v8::Strin g> name, const v8::AccessorInfo& info)
46 { 56 {
47 Event* event = V8Event::toNative(info.Holder()); 57 Event* event = V8Event::toNative(info.Holder());
48 58
49 if (event->isClipboardEvent()) 59 if (event->isClipboardEvent())
50 return toV8Fast(static_cast<ClipboardEvent*>(event)->clipboard(), info, event); 60 return toV8Fast(static_cast<ClipboardEvent*>(event)->clipboard(), info, event);
51 61
52 return v8::Undefined(); 62 return v8::Undefined();
53 } 63 }
54 64
(...skipping 10 matching lines...) Expand all
65 // We need to check Event first to avoid infinite recursion. 75 // We need to check Event first to avoid infinite recursion.
66 if (eventNames().interfaceForEvent == desiredInterface) 76 if (eventNames().interfaceForEvent == desiredInterface)
67 return V8Event::createWrapper(event, creationContext, isolate); 77 return V8Event::createWrapper(event, creationContext, isolate);
68 78
69 DOM_EVENT_INTERFACES_FOR_EACH(TRY_TO_WRAP_WITH_INTERFACE) 79 DOM_EVENT_INTERFACES_FOR_EACH(TRY_TO_WRAP_WITH_INTERFACE)
70 80
71 return V8Event::createWrapper(event, creationContext, isolate); 81 return V8Event::createWrapper(event, creationContext, isolate);
72 } 82 }
73 83
74 } // namespace WebCore 84 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/bindings/scripts/CodeGeneratorV8.pm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698