From 65f03d4f644ce73618e5f4f50dd694b26f55ae12 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 13 May 2011 16:23:25 +0100 Subject: Merge WebKit at r75993: Initial merge by git. Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3 --- Source/WebCore/bindings/js/GCController.cpp | 2 +- Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp | 1 + Source/WebCore/bindings/js/JSDocumentCustom.cpp | 15 +++++++++++++++ Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp | 3 +-- Source/WebCore/bindings/js/ScriptDebugServer.cpp | 3 +-- Source/WebCore/bindings/js/ScriptGCEvent.cpp | 2 +- Source/WebCore/bindings/js/ScriptSourceCode.h | 2 +- 7 files changed, 21 insertions(+), 7 deletions(-) (limited to 'Source/WebCore/bindings/js') diff --git a/Source/WebCore/bindings/js/GCController.cpp b/Source/WebCore/bindings/js/GCController.cpp index f193b2e..fe0e36f 100644 --- a/Source/WebCore/bindings/js/GCController.cpp +++ b/Source/WebCore/bindings/js/GCController.cpp @@ -29,7 +29,7 @@ #include "JSDOMWindow.h" #include #include -#include +#include #include #if USE(PTHREADS) diff --git a/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp b/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp index a0e0455..ceb3ccb 100644 --- a/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp +++ b/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp @@ -34,6 +34,7 @@ #include "JSDirectoryEntry.h" +#include "ExceptionCode.h" #include "JSDOMBinding.h" #include "JSEntryCallback.h" #include "JSErrorCallback.h" diff --git a/Source/WebCore/bindings/js/JSDocumentCustom.cpp b/Source/WebCore/bindings/js/JSDocumentCustom.cpp index 5f61e2a..4cc176c 100644 --- a/Source/WebCore/bindings/js/JSDocumentCustom.cpp +++ b/Source/WebCore/bindings/js/JSDocumentCustom.cpp @@ -31,8 +31,11 @@ #include "JSDOMWindowCustom.h" #include "JSHTMLDocument.h" #include "JSLocation.h" +#include "JSTouch.h" +#include "JSTouchList.h" #include "Location.h" #include "ScriptController.h" +#include "TouchList.h" #if ENABLE(SVG) #include "JSSVGDocument.h" @@ -124,4 +127,16 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* documen return wrapper; } +#if ENABLE(TOUCH_EVENTS) +JSValue JSDocument::createTouchList(ExecState* exec) +{ + RefPtr touchList = TouchList::create(); + + for (int i = 0; i < exec->argumentCount(); i++) + touchList->append(toTouch(exec->argument(i))); + + return toJS(exec, touchList.release()); +} +#endif + } // namespace WebCore diff --git a/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp b/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp index de72dea..971098d 100644 --- a/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp +++ b/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp @@ -199,8 +199,7 @@ InjectedScript InjectedScriptHost::injectedScriptFor(ScriptState* scriptState) if (!canAccessInspectedWindow(scriptState)) return InjectedScript(); - ASSERT(!m_injectedScriptSource.isEmpty()); - pair injectedScriptObject = injectScript(m_injectedScriptSource, scriptState); + pair injectedScriptObject = injectScript(injectedScriptSource(), scriptState); globalObject->setInjectedScript(injectedScriptObject.second.jsObject()); InjectedScript result(injectedScriptObject.second); m_idToInjectedScript.set(injectedScriptObject.first, result); diff --git a/Source/WebCore/bindings/js/ScriptDebugServer.cpp b/Source/WebCore/bindings/js/ScriptDebugServer.cpp index 10df223..9845277 100644 --- a/Source/WebCore/bindings/js/ScriptDebugServer.cpp +++ b/Source/WebCore/bindings/js/ScriptDebugServer.cpp @@ -287,12 +287,11 @@ void ScriptDebugServer::dispatchDidParseSource(const ListenerSet& listeners, con String sourceID = ustringToString(JSC::UString::number(source.provider()->asID())); String url = ustringToString(source.provider()->url()); String data = ustringToString(JSC::UString(source.data(), source.length())); - int firstLine = source.firstLine(); Vector copy; copyToVector(listeners, copy); for (size_t i = 0; i < copy.size(); ++i) - copy[i]->didParseSource(sourceID, url, data, firstLine, worldType); + copy[i]->didParseSource(sourceID, url, data, source.firstLine() - 1, source.firstColumn() - 1, worldType); } void ScriptDebugServer::dispatchFailedToParseSource(const ListenerSet& listeners, const SourceCode& source, int errorLine, const String& errorMessage) diff --git a/Source/WebCore/bindings/js/ScriptGCEvent.cpp b/Source/WebCore/bindings/js/ScriptGCEvent.cpp index 4b39799..b7fc7b3 100644 --- a/Source/WebCore/bindings/js/ScriptGCEvent.cpp +++ b/Source/WebCore/bindings/js/ScriptGCEvent.cpp @@ -34,7 +34,7 @@ #if ENABLE(INSPECTOR) #include "JSDOMWindow.h" -#include +#include #include #include diff --git a/Source/WebCore/bindings/js/ScriptSourceCode.h b/Source/WebCore/bindings/js/ScriptSourceCode.h index 092eeb8..6cf3987 100644 --- a/Source/WebCore/bindings/js/ScriptSourceCode.h +++ b/Source/WebCore/bindings/js/ScriptSourceCode.h @@ -44,7 +44,7 @@ class ScriptSourceCode { public: ScriptSourceCode(const String& source, const KURL& url = KURL(), const TextPosition1& startPosition = TextPosition1::minimumPosition()) : m_provider(StringSourceProvider::create(source, url.isNull() ? String() : url.string())) - , m_code(m_provider, startPosition.m_line.oneBasedInt()) + , m_code(m_provider, startPosition) , m_url(url) { } -- cgit v1.1