diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-09 18:33:50 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-09 18:33:50 +0000 |
commit | a6e8bc495bcdb6c1484ea88bb2f8aa03f6603765 (patch) | |
tree | 95f525511a44859ab44f25ac78a91667264f3010 /webkit/port | |
parent | f9228b5e375b0778f6eaa40d95f2da88b5a99b7c (diff) | |
download | chromium_src-a6e8bc495bcdb6c1484ea88bb2f8aa03f6603765.zip chromium_src-a6e8bc495bcdb6c1484ea88bb2f8aa03f6603765.tar.gz chromium_src-a6e8bc495bcdb6c1484ea88bb2f8aa03f6603765.tar.bz2 |
Reverting 9393.
Merge still broken on a mac clobber build.
Review URL: http://codereview.chromium.org/20182
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/DerivedSources.make | 1 | ||||
-rw-r--r-- | webkit/port/bindings/scripts/CodeGeneratorV8.pm | 4 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_custom.cpp | 23 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_custom.h | 4 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_index.cpp | 1 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_index.h | 1 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 1 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.h | 1 |
8 files changed, 23 insertions, 13 deletions
diff --git a/webkit/port/DerivedSources.make b/webkit/port/DerivedSources.make index 75d28ef..f1cf49d 100644 --- a/webkit/port/DerivedSources.make +++ b/webkit/port/DerivedSources.make @@ -659,6 +659,7 @@ all : \ V8EntityReference.h \ V8Event.h \ V8EventException.h \ + V8EventTargetNode.h \ V8File.h \ V8FileList.h \ V8HTMLAnchorElement.h \ diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm index dc37a04..f9000a2 100644 --- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm +++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm @@ -1644,7 +1644,7 @@ sub GetNativeType return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType"; return "DOMTimeStamp" if $type eq "DOMTimeStamp"; return "unsigned" if $type eq "RGBColor"; - return "Node*" if $type eq "EventTarget" and $isParameter; + return "EventTargetNode*" if $type eq "EventTarget" and $isParameter; return "String" if $type eq "DOMUserData"; # temporary hack, TODO @@ -1763,7 +1763,7 @@ sub JSValueToNative $implIncludes{"V8Node.h"} = 1; # EventTarget is not in DOM hierarchy, but all Nodes are EventTarget. - return "V8Node::HasInstance($value) ? V8Proxy::DOMWrapperToNode<Node>($value) : 0"; + return "V8Node::HasInstance($value) ? V8Proxy::DOMWrapperToNode<EventTargetNode>($value) : 0"; } AddIncludesForType($type); diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp index 914ebaf..0e58572 100644 --- a/webkit/port/bindings/v8/v8_custom.cpp +++ b/webkit/port/bindings/v8/v8_custom.cpp @@ -62,6 +62,7 @@ #include "Event.h" #include "EventListener.h" #include "EventTarget.h" +#include "EventTargetNode.h" #include "ExceptionCode.h" #include "FloatRect.h" #include "Frame.h" @@ -2887,11 +2888,12 @@ CALLBACK_FUNC_DECL(DOMWindowNOP) } -// Node ------------------------------------------------------------- +// EventTargetNode ------------------------------------------------------------- -CALLBACK_FUNC_DECL(NodeAddEventListener) { - INC_STATS("DOM.Node.addEventListener()"); - Node* node = V8Proxy::DOMWrapperToNode<Node>(args.Holder()); +CALLBACK_FUNC_DECL(EventTargetNodeAddEventListener) { + INC_STATS("DOM.EventTargetNode.addEventListener()"); + EventTargetNode* node = + V8Proxy::DOMWrapperToNode<EventTargetNode>(args.Holder()); V8Proxy* proxy = V8Proxy::retrieve(node->document()->frame()); if (!proxy) @@ -2907,9 +2909,10 @@ CALLBACK_FUNC_DECL(NodeAddEventListener) { return v8::Undefined(); } -CALLBACK_FUNC_DECL(NodeRemoveEventListener) { - INC_STATS("DOM.Node.removeEventListener()"); - Node* node = V8Proxy::DOMWrapperToNode<Node>(args.Holder()); +CALLBACK_FUNC_DECL(EventTargetNodeRemoveEventListener) { + INC_STATS("DOM.EventTargetNode.removeEventListener()"); + EventTargetNode* node = + V8Proxy::DOMWrapperToNode<EventTargetNode>(args.Holder()); V8Proxy* proxy = V8Proxy::retrieve(node->document()->frame()); // It is possbile that the owner document of the node is detached @@ -3189,7 +3192,8 @@ ACCESSOR_GETTER(DOMWindowEventHandler) { ACCESSOR_SETTER(ElementEventHandler) { - Node* node = V8Proxy::DOMWrapperToNode<Node>(info.Holder()); + EventTargetNode* node = + V8Proxy::DOMWrapperToNode<EventTargetNode>(info.Holder()); // Name starts with 'on', remove them. String key = ToWebCoreString(name); @@ -3219,7 +3223,8 @@ ACCESSOR_SETTER(ElementEventHandler) { ACCESSOR_GETTER(ElementEventHandler) { - Node* node = V8Proxy::DOMWrapperToNode<Node>(info.Holder()); + EventTargetNode* node = + V8Proxy::DOMWrapperToNode<EventTargetNode>(info.Holder()); // Name starts with 'on', remove them. String key = ToWebCoreString(name); diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h index 72f9979..99eeca3 100644 --- a/webkit/port/bindings/v8/v8_custom.h +++ b/webkit/port/bindings/v8/v8_custom.h @@ -309,8 +309,8 @@ DECLARE_CALLBACK(LocationValueOf) // Implementation of EventTarget::addEventListener // and EventTarget::removeEventListener -DECLARE_CALLBACK(NodeAddEventListener) -DECLARE_CALLBACK(NodeRemoveEventListener) +DECLARE_CALLBACK(EventTargetNodeAddEventListener) +DECLARE_CALLBACK(EventTargetNodeRemoveEventListener) // Custom implementation is Navigator properties. // We actually only need this because WebKit has diff --git a/webkit/port/bindings/v8/v8_index.cpp b/webkit/port/bindings/v8/v8_index.cpp index 9f93a93..5eb1f81 100644 --- a/webkit/port/bindings/v8/v8_index.cpp +++ b/webkit/port/bindings/v8/v8_index.cpp @@ -153,6 +153,7 @@ #include "V8DOMWindow.h" #include "V8Event.h" #include "V8EventException.h" +#include "V8EventTargetNode.h" #include "V8KeyboardEvent.h" #include "V8MouseEvent.h" #include "V8WebKitAnimationEvent.h" diff --git a/webkit/port/bindings/v8/v8_index.h b/webkit/port/bindings/v8/v8_index.h index d388116..0f6fc1f 100644 --- a/webkit/port/bindings/v8/v8_index.h +++ b/webkit/port/bindings/v8/v8_index.h @@ -45,6 +45,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); V(ELEMENT, Element) \ V(ENTITY, Entity) \ V(ENTITYREFERENCE, EntityReference) \ + V(EVENTTARGETNODE, EventTargetNode) \ V(HTMLDOCUMENT, HTMLDocument) \ V(NODE, Node) \ V(NOTATION, Notation) \ diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 4a76163..3bbbe21 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -79,6 +79,7 @@ #include "DOMWindow.h" #include "Entity.h" #include "EventListener.h" +#include "EventTargetNode.h" #include "EventTarget.h" #include "Event.h" #include "EventException.h" diff --git a/webkit/port/bindings/v8/v8_proxy.h b/webkit/port/bindings/v8/v8_proxy.h index 772489f..31bdc40 100644 --- a/webkit/port/bindings/v8/v8_proxy.h +++ b/webkit/port/bindings/v8/v8_proxy.h @@ -56,6 +56,7 @@ class MimeType; class MimeTypeArray; class Plugin; class PluginArray; +class EventTargetNode; class StyleSheetList; class CSSValue; class CSSRule; |