summaryrefslogtreecommitdiffstats
path: root/webkit/port/bindings
diff options
context:
space:
mode:
authorpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 02:12:45 +0000
committerpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 02:12:45 +0000
commite0c0505ed7c35b88796e0a7466d792b1ac8d13d3 (patch)
tree9dca29c93727eb6e07403bba8d4a97177fbf22ee /webkit/port/bindings
parent519c492fc66735bf2542edc457337cf27abc3bf9 (diff)
downloadchromium_src-e0c0505ed7c35b88796e0a7466d792b1ac8d13d3.zip
chromium_src-e0c0505ed7c35b88796e0a7466d792b1ac8d13d3.tar.gz
chromium_src-e0c0505ed7c35b88796e0a7466d792b1ac8d13d3.tar.bz2
Re-apply change 10840 since today's WebKit merge brought in the pieces it depends
on (and that depend on it). Unforking Document.idl and HTMLCanvasElement.idl Original review URL: http://codereview.chromium.org/39050 TBR=mbelshe Review URL: http://codereview.chromium.org/39103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings')
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp39
-rw-r--r--webkit/port/bindings/v8/v8_custom.h8
2 files changed, 4 insertions, 43 deletions
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index ecbe1b8..7b4ccdd 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -970,47 +970,8 @@ CALLBACK_FUNC_DECL(HTMLDocumentOpen) {
return args.Holder();
}
-// Document --------------------------------------------------------------------
-CALLBACK_FUNC_DECL(DocumentEvaluate) {
- INC_STATS("DOM.Document.evaluate()");
- Document* imp = V8Proxy::DOMWrapperToNode<Document>(args.Holder());
- ExceptionCode ec = 0;
- String expression = ToWebCoreString(args[0]);
- Node* contextNode = NULL;
- if (V8Node::HasInstance(args[1])) {
- contextNode = V8Proxy::DOMWrapperToNode<Node>(args[1]);
- }
- // Find the XPath
- XPathNSResolver* resolver = NULL;
- if (V8XPathNSResolver::HasInstance(args[2])) {
- resolver = V8Proxy::ToNativeObject<XPathNSResolver>(
- V8ClassIndex::XPATHNSRESOLVER, args[2]);
- } else if (args[2]->IsObject()) {
- v8::Handle<v8::Object> obj = args[2]->ToObject();
- resolver = new JSXPathNSResolver(obj);
- } else if (!args[2]->IsNull() && !args[2]->IsUndefined()) {
- V8Proxy::SetDOMException(TYPE_MISMATCH_ERR);
- return v8::Handle<v8::Value>();
- }
- int type = ToInt32(args[3]);
- XPathResult* inResult = NULL;
- if (V8XPathResult::HasInstance(args[4])) {
- inResult = V8Proxy::ToNativeObject<XPathResult>(
- V8ClassIndex::XPATHRESULT, args[4]);
- }
-
- v8::TryCatch try_catch;
- RefPtr<XPathResult> result =
- imp->evaluate(expression, contextNode, resolver, type, inResult, ec);
- if (try_catch.HasCaught() || ec != 0) {
- if (!try_catch.HasCaught())
- V8Proxy::SetDOMException(ec);
- return v8::Handle<v8::Value>();
- }
- return V8Proxy::ToV8Object(V8ClassIndex::XPATHRESULT, result.get());
-}
// DOMWindow -------------------------------------------------------------------
diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h
index 2afbfc8..16e9359 100644
--- a/webkit/port/bindings/v8/v8_custom.h
+++ b/webkit/port/bindings/v8/v8_custom.h
@@ -228,6 +228,9 @@ DECLARE_PROPERTY_ACCESSOR(DOMWindowEventHandler)
// Getter/Setter for Element event handlers
DECLARE_PROPERTY_ACCESSOR(ElementEventHandler)
+// HTMLCanvasElement
+DECLARE_CALLBACK(HTMLCanvasElementGetContext)
+
// Customized setter of src and location on HTMLFrameElement
DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLFrameElementSrc)
DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLFrameElementLocation)
@@ -271,10 +274,7 @@ DECLARE_CALLBACK(HTMLDocumentOpen)
// Document customized functions
DECLARE_CALLBACK(DocumentEvaluate)
-DECLARE_CALLBACK(DocumentQuerySelector)
-DECLARE_CALLBACK(DocumentQuerySelectorAll)
-DECLARE_CALLBACK(DocumentFragmentQuerySelector)
-DECLARE_CALLBACK(DocumentFragmentQuerySelectorAll)
+DECLARE_CALLBACK(DocumentGetCSSCanvasContext)
// Window customized functions
DECLARE_CALLBACK(DOMWindowAddEventListener)