summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/js
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/bindings/js
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/bindings/js')
-rw-r--r--Source/WebCore/bindings/js/GCController.cpp2
-rw-r--r--Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp1
-rw-r--r--Source/WebCore/bindings/js/JSDocumentCustom.cpp15
-rw-r--r--Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp3
-rw-r--r--Source/WebCore/bindings/js/ScriptDebugServer.cpp3
-rw-r--r--Source/WebCore/bindings/js/ScriptGCEvent.cpp2
-rw-r--r--Source/WebCore/bindings/js/ScriptSourceCode.h2
7 files changed, 21 insertions, 7 deletions
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 <runtime/JSGlobalData.h>
#include <runtime/JSLock.h>
-#include <runtime/Collector.h>
+#include <runtime/Heap.h>
#include <wtf/StdLibExtras.h>
#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 = 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<long, ScriptObject> injectedScriptObject = injectScript(m_injectedScriptSource, scriptState);
+ pair<long, ScriptObject> 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<ScriptDebugListener*> 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 <runtime/Collector.h>
+#include <runtime/Heap.h>
#include <runtime/JSGlobalData.h>
#include <wtf/CurrentTime.h>
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)
{
}