diff options
Diffstat (limited to 'Source/WebCore/bindings/v8/custom')
-rw-r--r-- | Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp | 18 | ||||
-rw-r--r-- | Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp | 3 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp index 9fa9f80..cda0737 100644 --- a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp +++ b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp @@ -35,6 +35,7 @@ #include "Document.h" #include "ExceptionCode.h" #include "Node.h" +#include "TouchList.h" #include "XPathNSResolver.h" #include "XPathResult.h" @@ -46,6 +47,8 @@ #include "V8IsolatedContext.h" #include "V8Node.h" #include "V8Proxy.h" +#include "V8Touch.h" +#include "V8TouchList.h" #if ENABLE(3D_CANVAS) #include "V8WebGLRenderingContext.h" #endif @@ -163,4 +166,19 @@ v8::Handle<v8::Value> toV8(Document* impl, bool forceNewObject) return wrapper; } +#if ENABLE(TOUCH_EVENTS) +v8::Handle<v8::Value> V8Document::createTouchListCallback(const v8::Arguments& args) +{ + RefPtr<TouchList> touchList = TouchList::create(); + + for (int i = 0; i < args.Length(); i++) { + if (!args[i]->IsObject()) + return v8::Undefined(); + touchList->append(V8Touch::toNative(args[i]->ToObject())); + } + + return toV8(touchList.release()); +} +#endif + } // namespace WebCore diff --git a/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp index 81ad955..6bd5abb 100644 --- a/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp +++ b/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp @@ -241,8 +241,7 @@ InjectedScript InjectedScriptHost::injectedScriptFor(ScriptState* inspectedScrip if (!canAccessInspectedWindow(inspectedScriptState)) return InjectedScript(); - ASSERT(!m_injectedScriptSource.isEmpty()); - pair<long, ScriptObject> injectedScript = injectScript(m_injectedScriptSource, inspectedScriptState); + pair<long, ScriptObject> injectedScript = injectScript(injectedScriptSource(), inspectedScriptState); InjectedScript result(injectedScript.second); m_idToInjectedScript.set(injectedScript.first, result); global->SetHiddenValue(key, injectedScript.second.v8Object()); |