summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--JavaScriptCore/wtf/Platform.h10
-rw-r--r--WebCore/bindings/js/ScriptObject.cpp11
-rw-r--r--WebCore/bindings/v8/ScriptController.cpp3
-rw-r--r--WebCore/bindings/v8/ScriptObject.cpp6
-rw-r--r--WebCore/bindings/v8/V8DOMMap.cpp248
-rw-r--r--WebCore/bindings/v8/V8DOMMap.h8
-rw-r--r--WebCore/bindings/v8/V8Utilities.h5
-rw-r--r--WebCore/bindings/v8/V8WorkerContextEventListener.cpp5
-rw-r--r--WebCore/bindings/v8/WorkerContextExecutionProxy.cpp6
-rw-r--r--WebCore/bindings/v8/custom/V8CustomBinding.cpp118
-rw-r--r--WebCore/bindings/v8/custom/V8CustomBinding.h454
-rw-r--r--WebCore/bindings/v8/custom/V8DatabaseCustom.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8DocumentCustom.cpp12
-rw-r--r--WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp10
15 files changed, 7 insertions, 909 deletions
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 230458f..3a7e2a0 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -245,20 +245,12 @@
#define WTF_PLATFORM_ARM 1
#if defined(__ARMEB__)
#define WTF_PLATFORM_BIG_ENDIAN 1
-#ifdef MANUAL_MERGE_REQUIRED
-#elif !defined(__ARM_EABI__) && !defined(__ARMEB__) && !defined(__VFP_FP__)
-#if !defined(ANDROID)
-#else // MANUAL_MERGE_REQUIRED
#elif !defined(__ARM_EABI__) && !defined(__EABI__) && !defined(__VFP_FP__)
-#endif // MANUAL_MERGE_REQUIRED
+#if !defined(ANDROID)
#define WTF_PLATFORM_MIDDLE_ENDIAN 1
#endif
-#ifdef MANUAL_MERGE_REQUIRED
#endif
-#if !defined(__ARM_EABI__)
-#else // MANUAL_MERGE_REQUIRED
#if !defined(__ARM_EABI__) && !defined(__EABI__)
-#endif // MANUAL_MERGE_REQUIRED
#define WTF_PLATFORM_FORCE_PACK 1
#endif
#define ARM_ARCH_VERSION 3
diff --git a/WebCore/bindings/js/ScriptObject.cpp b/WebCore/bindings/js/ScriptObject.cpp
index c5fa399..ea4363e 100644
--- a/WebCore/bindings/js/ScriptObject.cpp
+++ b/WebCore/bindings/js/ScriptObject.cpp
@@ -32,14 +32,10 @@
#include "ScriptObject.h"
#include "JSDOMBinding.h"
-#ifdef MANUAL_MERGE_REQUIRED
#if ENABLE(JAVASCRIPT_DEBUGGER)
-#include "JSInspectorController.h"
-#endif
-#else // MANUAL_MERGE_REQUIRED
#include "JSInspectorBackend.h"
-#endif // MANUAL_MERGE_REQUIRED
+#endif
#include <runtime/JSLock.h>
@@ -131,12 +127,9 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
return handleException(scriptState);
}
-#ifdef MANUAL_MERGE_REQUIRED
#if ENABLE(JAVASCRIPT_DEBUGGER)
-bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorController* value)
-#else // MANUAL_MERGE_REQUIRED
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorBackend* value)
-#endif // MANUAL_MERGE_REQUIRED
+#endif
{
JSLock lock(SilenceAssertionsOnly);
JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index 97a3553..9e5f5b5 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -199,9 +199,7 @@ void ScriptController::evaluateInNewContext(const Vector<ScriptSourceCode>& sour
// Evaluate a script file in the environment of this proxy.
ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
{
-#ifdef MANUAL_MERGE_REQUIRED
LOCK_V8;
-#else // MANUAL_MERGE_REQUIRED
String sourceURL = sourceCode.url();
if (sourceURL.isNull() && !m_XSSAuditor->canEvaluateJavaScriptURL(sourceCode.source())) {
@@ -214,7 +212,6 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
return ScriptValue();
}
-#endif // MANUAL_MERGE_REQUIRED
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(m_proxy->frame());
if (v8Context.IsEmpty())
diff --git a/WebCore/bindings/v8/ScriptObject.cpp b/WebCore/bindings/v8/ScriptObject.cpp
index c64cfe4..b6943bd 100644
--- a/WebCore/bindings/v8/ScriptObject.cpp
+++ b/WebCore/bindings/v8/ScriptObject.cpp
@@ -120,13 +120,9 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorBackend* value)
{
ScriptScope scope(scriptState);
-#ifdef MANUAL_MERGE_REQUIRED
#if !PLATFORM(ANDROID)
- scope.global()->Set(v8::String::New(name), V8Proxy::ToV8Object(V8ClassIndex::INSPECTORCONTROLLER, value));
-#endif
-#else // MANUAL_MERGE_REQUIRED
scope.global()->Set(v8::String::New(name), V8DOMWrapper::convertToV8Object(V8ClassIndex::INSPECTORBACKEND, value));
-#endif // MANUAL_MERGE_REQUIRED
+#endif
return scope.success();
}
diff --git a/WebCore/bindings/v8/V8DOMMap.cpp b/WebCore/bindings/v8/V8DOMMap.cpp
index 2d6639f..1bd68f7 100644
--- a/WebCore/bindings/v8/V8DOMMap.cpp
+++ b/WebCore/bindings/v8/V8DOMMap.cpp
@@ -38,256 +38,8 @@
namespace WebCore {
-#ifdef MANUAL_MERGE_REQUIRED
-// DOM binding algorithm:
-//
-// There are two kinds of DOM objects:
-// 1. DOM tree nodes, such as Document, HTMLElement, ...
-// there classes implement TreeShared<T> interface;
-// 2. Non-node DOM objects, such as CSSRule, Location, etc.
-// these classes implement a ref-counted scheme.
-//
-// A DOM object may have a JS wrapper object. If a tree node
-// is alive, its JS wrapper must be kept alive even it is not
-// reachable from JS roots.
-// However, JS wrappers of non-node objects can go away if
-// not reachable from other JS objects. It works like a cache.
-//
-// DOM objects are ref-counted, and JS objects are traced from
-// a set of root objects. They can create a cycle. To break
-// cycles, we do following:
-// Handles from DOM objects to JS wrappers are always weak,
-// so JS wrappers of non-node object cannot create a cycle.
-// Before starting a global GC, we create a virtual connection
-// between nodes in the same tree in the JS heap. If the wrapper
-// of one node in a tree is alive, wrappers of all nodes in
-// the same tree are considered alive. This is done by creating
-// object groups in GC prologue callbacks. The mark-compact
-// collector will remove these groups after each GC.
-//
-// DOM objects should be deref-ed from the owning thread, not the GC thread
-// that does not own them. In V8, GC can kick in from any thread. To ensure
-// that DOM objects are always deref-ed from the owning thread when running
-// V8 in multi-threading environment, we do following:
-// 1. Maintain a thread specific DOM wrapper map for each object map.
-// (We're using TLS support from WTF instead of base since V8Bindings
-// does not depend on base. We further assume that all child threads
-// running V8 instances are created by WTF and thus a destructor will
-// be called to clean up all thread specific data.)
-// 2. When GC happens:
-// 2.1. If the dead object is in GC thread's map, remove the JS reference
-// and deref the DOM object.
-// 2.2. Otherwise, go through all thread maps to find the owning thread.
-// Remove the JS reference from the owning thread's map and move the
-// DOM object to a delayed queue. Post a task to the owning thread
-// to have it deref-ed from the owning thread at later time.
-// 3. When a thread is tearing down, invoke a cleanup routine to go through
-// all objects in the delayed queue and the thread map and deref all of
-// them.
-
-static void weakDOMObjectCallback(v8::Persistent<v8::Value> v8Object, void* domObject);
-static void weakNodeCallback(v8::Persistent<v8::Value> v8Object, void* domObject);
-
-#if ENABLE(SVG)
-static void weakSVGElementInstanceCallback(v8::Persistent<v8::Value> v8Object, void* domObject);
-
-// SVG non-node elements may have a reference to a context node which should be notified when the element is change.
-static void weakSVGObjectWithContextCallback(v8::Persistent<v8::Value> v8Object, void* domObject);
-#endif
-
-// This is to ensure that we will deref DOM objects from the owning thread, not the GC thread.
-// The helper function will be scheduled by the GC thread to get called from the owning thread.
-static void derefDelayedObjectsInCurrentThread(void*);
-
-// A list of all ThreadSpecific DOM Data objects. Traversed during GC to find a thread-specific map that
-// contains the object - so we can schedule the object to be deleted on the thread which created it.
-class ThreadSpecificDOMData;
-typedef WTF::Vector<ThreadSpecificDOMData*> DOMDataList;
-static DOMDataList& domDataList()
-{
- DEFINE_STATIC_LOCAL(DOMDataList, staticDOMDataList, ());
- return staticDOMDataList;
-}
-
-// Mutex to protect against concurrent access of DOMDataList.
-static WTF::Mutex& domDataListMutex()
-{
- DEFINE_STATIC_LOCAL(WTF::Mutex, staticDOMDataListMutex, ());
- return staticDOMDataListMutex;
-}
-
-class ThreadSpecificDOMData : Noncopyable {
-public:
- enum DOMWrapperMapType {
- DOMNodeMap,
- DOMObjectMap,
- ActiveDOMObjectMap,
-#if ENABLE(SVG)
- DOMSVGElementInstanceMap,
- DOMSVGObjectWithContextMap
-#endif
- };
-
- typedef WTF::HashMap<void*, V8ClassIndex::V8WrapperType> DelayedObjectMap;
-
- template <class KeyType>
- class InternalDOMWrapperMap : public DOMWrapperMap<KeyType> {
- public:
- InternalDOMWrapperMap(v8::WeakReferenceCallback callback)
- : DOMWrapperMap<KeyType>(callback) { }
-
- virtual void forget(KeyType*);
-
- void forgetOnly(KeyType* object)
- {
- DOMWrapperMap<KeyType>::forget(object);
- }
- };
-
- ThreadSpecificDOMData()
- : m_domNodeMap(0)
- , m_domObjectMap(0)
- , m_activeDomObjectMap(0)
-#if ENABLE(SVG)
- , m_domSvgElementInstanceMap(0)
- , m_domSvgObjectWithContextMap(0)
-#endif
- , m_delayedProcessingScheduled(false)
- , m_isMainThread(WTF::isMainThread())
- {
- WTF::MutexLocker locker(domDataListMutex());
- domDataList().append(this);
- }
-
- virtual ~ThreadSpecificDOMData()
- {
- WTF::MutexLocker locker(domDataListMutex());
- domDataList().remove(domDataList().find(this));
- }
-
- void* getDOMWrapperMap(DOMWrapperMapType type)
- {
- switch (type) {
- case DOMNodeMap:
- return m_domNodeMap;
- case DOMObjectMap:
- return m_domObjectMap;
- case ActiveDOMObjectMap:
- return m_activeDomObjectMap;
-#if ENABLE(SVG)
- case DOMSVGElementInstanceMap:
- return m_domSvgElementInstanceMap;
- case DOMSVGObjectWithContextMap:
- return m_domSvgObjectWithContextMap;
-#endif
- }
-
- ASSERT_NOT_REACHED();
- return 0;
- }
-
- InternalDOMWrapperMap<Node>& domNodeMap() { return *m_domNodeMap; }
- InternalDOMWrapperMap<void>& domObjectMap() { return *m_domObjectMap; }
- InternalDOMWrapperMap<void>& activeDomObjectMap() { return *m_activeDomObjectMap; }
-#if ENABLE(SVG)
- InternalDOMWrapperMap<SVGElementInstance>& domSvgElementInstanceMap() { return *m_domSvgElementInstanceMap; }
- InternalDOMWrapperMap<void>& domSvgObjectWithContextMap() { return *m_domSvgObjectWithContextMap; }
-#endif
-
- DelayedObjectMap& delayedObjectMap() { return m_delayedObjectMap; }
- bool delayedProcessingScheduled() const { return m_delayedProcessingScheduled; }
- void setDelayedProcessingScheduled(bool value) { m_delayedProcessingScheduled = value; }
- bool isMainThread() const { return m_isMainThread; }
-
-protected:
- InternalDOMWrapperMap<Node>* m_domNodeMap;
- InternalDOMWrapperMap<void>* m_domObjectMap;
- InternalDOMWrapperMap<void>* m_activeDomObjectMap;
-#if ENABLE(SVG)
- InternalDOMWrapperMap<SVGElementInstance>* m_domSvgElementInstanceMap;
- InternalDOMWrapperMap<void>* m_domSvgObjectWithContextMap;
-#endif
-
- // Stores all the DOM objects that are delayed to be processed when the owning thread gains control.
- DelayedObjectMap m_delayedObjectMap;
-
- // The flag to indicate if the task to do the delayed process has already been posted.
- bool m_delayedProcessingScheduled;
-
- bool m_isMainThread;
-};
-
-// This encapsulates thread-specific DOM data for non-main thread. All the maps in it are created dynamically.
-class NonMainThreadSpecificDOMData : public ThreadSpecificDOMData {
-public:
- NonMainThreadSpecificDOMData()
- {
- m_domNodeMap = new InternalDOMWrapperMap<Node>(&weakNodeCallback);
- m_domObjectMap = new InternalDOMWrapperMap<void>(weakDOMObjectCallback);
- m_activeDomObjectMap = new InternalDOMWrapperMap<void>(weakActiveDOMObjectCallback);
-#if ENABLE(SVG)
- m_domSvgElementInstanceMap = new InternalDOMWrapperMap<SVGElementInstance>(weakSVGElementInstanceCallback);
- m_domSvgObjectWithContextMap = new InternalDOMWrapperMap<void>(weakSVGObjectWithContextCallback);
-#endif
- }
-
- // This is called when WTF thread is tearing down.
- // We assume that all child threads running V8 instances are created by WTF.
- virtual ~NonMainThreadSpecificDOMData()
- {
- delete m_domNodeMap;
- delete m_domObjectMap;
- delete m_activeDomObjectMap;
-#if ENABLE(SVG)
- delete m_domSvgElementInstanceMap;
- delete m_domSvgObjectWithContextMap;
-#endif
- }
-};
-
-// This encapsulates thread-specific DOM data for the main thread. All the maps in it are static.
-// This is because we are unable to rely on WTF::ThreadSpecificThreadExit to do the cleanup since
-// the place that tears down the main thread can not call any WTF functions.
-class MainThreadSpecificDOMData : public ThreadSpecificDOMData {
-public:
- MainThreadSpecificDOMData()
- : m_staticDomNodeMap(weakNodeCallback)
- , m_staticDomObjectMap(weakDOMObjectCallback)
- , m_staticActiveDomObjectMap(weakActiveDOMObjectCallback)
-#if ENABLE(SVG)
- , m_staticDomSvgElementInstanceMap(weakSVGElementInstanceCallback)
- , m_staticDomSvgObjectWithContextMap(weakSVGObjectWithContextCallback)
-#endif
- {
- m_domNodeMap = &m_staticDomNodeMap;
- m_domObjectMap = &m_staticDomObjectMap;
- m_activeDomObjectMap = &m_staticActiveDomObjectMap;
-#if ENABLE(SVG)
- m_domSvgElementInstanceMap = &m_staticDomSvgElementInstanceMap;
- m_domSvgObjectWithContextMap = &m_staticDomSvgObjectWithContextMap;
-#endif
- }
-
-private:
- InternalDOMWrapperMap<Node> m_staticDomNodeMap;
- InternalDOMWrapperMap<void> m_staticDomObjectMap;
- InternalDOMWrapperMap<void> m_staticActiveDomObjectMap;
-#if ENABLE(SVG)
- InternalDOMWrapperMap<SVGElementInstance> m_staticDomSvgElementInstanceMap;
- InternalDOMWrapperMap<void> m_staticDomSvgObjectWithContextMap;
-#endif
-};
-
-DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<NonMainThreadSpecificDOMData>, threadSpecificDOMData, ());
-
-template<typename T>
-static void handleWeakObjectInOwningThread(ThreadSpecificDOMData::DOMWrapperMapType mapType, V8ClassIndex::V8WrapperType objectType, T*);
-
-ThreadSpecificDOMData& getThreadSpecificDOMData()
-#else // MANUAL_MERGE_REQUIRED
DOMDataStoreHandle::DOMDataStoreHandle()
: m_store(new ScopedDOMDataStore(DOMData::getCurrent()))
-#endif // MANUAL_MERGE_REQUIRED
{
}
diff --git a/WebCore/bindings/v8/V8DOMMap.h b/WebCore/bindings/v8/V8DOMMap.h
index eac39d2..27a8007 100644
--- a/WebCore/bindings/v8/V8DOMMap.h
+++ b/WebCore/bindings/v8/V8DOMMap.h
@@ -49,18 +49,10 @@ namespace WebCore {
WeakReferenceMap(v8::WeakReferenceCallback callback) : m_weakReferenceCallback(callback) { }
virtual ~WeakReferenceMap()
{
-#ifdef MANUAL_MERGE_REQUIRED
-#ifndef NDEBUG
-#else // MANUAL_MERGE_REQUIRED
#ifndef NDEBUG
-#endif // MANUAL_MERGE_REQUIRED
if (m_map.size() > 0)
fprintf(stderr, "Leak %d JS wrappers.\n", m_map.size());
-#ifdef MANUAL_MERGE_REQUIRED
-#endif
-#else // MANUAL_MERGE_REQUIRED
#endif
-#endif // MANUAL_MERGE_REQUIRED
}
// Get the JS wrapper object of an object.
diff --git a/WebCore/bindings/v8/V8Utilities.h b/WebCore/bindings/v8/V8Utilities.h
index 781d2bb..8bd310b 100644
--- a/WebCore/bindings/v8/V8Utilities.h
+++ b/WebCore/bindings/v8/V8Utilities.h
@@ -31,17 +31,12 @@
#ifndef V8Utilities_h
#define V8Utilities_h
-#ifdef MANUAL_MERGE_REQUIRED
-// FIXME: Remove once chromium dependencies on v8_utility.h are removed.
-#define V8UTILITIES_DEFINED 1
#if ENABLE(V8_LOCKERS)
#define LOCK_V8 v8::Locker lock
#else
#define LOCK_V8 ((void) 0)
#endif
-#else // MANUAL_MERGE_REQUIRED
-#endif // MANUAL_MERGE_REQUIRED
#include <v8.h>
namespace WebCore {
diff --git a/WebCore/bindings/v8/V8WorkerContextEventListener.cpp b/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
index 9ed7e32..862cd2d 100644
--- a/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
+++ b/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
@@ -35,11 +35,8 @@
#include "V8WorkerContextEventListener.h"
#include "Event.h"
-#ifdef MANUAL_MERGE_REQUIRED
-#include "V8Utilities.h"
-#else // MANUAL_MERGE_REQUIRED
#include "V8Binding.h"
-#endif // MANUAL_MERGE_REQUIRED
+#include "V8Utilities.h"
#include "WorkerContextExecutionProxy.h"
namespace WebCore {
diff --git a/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp b/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
index f80d88f..ba858cf 100644
--- a/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
+++ b/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
@@ -127,16 +127,10 @@ void WorkerContextExecutionProxy::initV8IfNeeded()
v8::V8::IgnoreOutOfMemoryException();
v8::V8::SetFatalErrorHandler(reportFatalErrorInV8);
-#ifdef MANUAL_MERGE_REQUIRED
- // Set up the handler for V8 error message.
- v8::V8::AddMessageListener(handleConsoleMessage);
-
#if PLATFORM(ANDROID)
const int workerThreadPreemptionIntervalMs = 5;
v8::Locker::StartPreemption(workerThreadPreemptionIntervalMs);
#endif
-#else // MANUAL_MERGE_REQUIRED
-#endif // MANUAL_MERGE_REQUIRED
v8Initialized = true;
}
diff --git a/WebCore/bindings/v8/custom/V8CustomBinding.cpp b/WebCore/bindings/v8/custom/V8CustomBinding.cpp
index ee45abd..510aded 100644
--- a/WebCore/bindings/v8/custom/V8CustomBinding.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomBinding.cpp
@@ -64,123 +64,6 @@ bool allowSettingSrcToJavascriptURL(Element* element, String name, String value)
return true;
}
-#ifdef MANUAL_MERGE_REQUIRED
-// DOMImplementation is a singleton in WebCore. If we use our normal
-// mapping from DOM objects to V8 wrappers, the same wrapper will be
-// shared for all frames in the same process. This is a major
-// security problem. Therefore, we generate a DOMImplementation
-// wrapper per document and store it in an internal field of the
-// document. Since the DOMImplementation object is a singleton, we do
-// not have to do anything to keep the DOMImplementation object alive
-// for the lifetime of the wrapper.
-ACCESSOR_GETTER(DocumentImplementation)
-{
- ASSERT(info.Holder()->InternalFieldCount() >= kDocumentMinimumInternalFieldCount);
-
- // Check if the internal field already contains a wrapper.
- v8::Local<v8::Value> implementation = info.Holder()->GetInternalField(kDocumentImplementationIndex);
- if (!implementation->IsUndefined())
- return implementation;
-
- // Generate a wrapper.
- Document* document = V8Proxy::DOMWrapperToNative<Document>(info.Holder());
- v8::Handle<v8::Value> wrapper = V8Proxy::DOMImplementationToV8Object(document->implementation());
-
- // Store the wrapper in the internal field.
- info.Holder()->SetInternalField(kDocumentImplementationIndex, wrapper);
-
- return wrapper;
-}
-
-// --------------- Security Checks -------------------------
-INDEXED_ACCESS_CHECK(History)
-{
- ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
- // Only allow same origin access.
- History* history = V8Proxy::ToNativeObject<History>(V8ClassIndex::HISTORY, host);
- return V8Proxy::CanAccessFrame(history->frame(), false);
-}
-
-NAMED_ACCESS_CHECK(History)
-{
- ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
- // Only allow same origin access.
- History* history = V8Proxy::ToNativeObject<History>(V8ClassIndex::HISTORY, host);
- return V8Proxy::CanAccessFrame(history->frame(), false);
-}
-
-#undef INDEXED_ACCESS_CHECK
-#undef NAMED_ACCESS_CHECK
-#undef NAMED_PROPERTY_GETTER
-#undef NAMED_PROPERTY_SETTER
-
-Frame* V8Custom::GetTargetFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data)
-{
- Frame* target = 0;
- switch (V8ClassIndex::FromInt(data->Int32Value())) {
- case V8ClassIndex::DOMWINDOW: {
- v8::Handle<v8::Value> window = V8Proxy::LookupDOMWrapper(V8ClassIndex::DOMWINDOW, host);
- if (window.IsEmpty())
- return target;
-
- DOMWindow* targetWindow = V8Proxy::ToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, window);
- target = targetWindow->frame();
- break;
- }
- case V8ClassIndex::LOCATION: {
- History* history = V8Proxy::ToNativeObject<History>(V8ClassIndex::HISTORY, host);
- target = history->frame();
- break;
- }
- case V8ClassIndex::HISTORY: {
- Location* location = V8Proxy::ToNativeObject<Location>(V8ClassIndex::LOCATION, host);
- target = location->frame();
- break;
- }
- default:
- break;
- }
- return target;
-}
-
-#if ENABLE(SVG)
-V8ClassIndex::V8WrapperType V8Custom::DowncastSVGPathSeg(void* pathSeg)
-{
- WebCore::SVGPathSeg* realPathSeg = reinterpret_cast<WebCore::SVGPathSeg*>(pathSeg);
-
- switch (realPathSeg->pathSegType()) {
-#define MAKE_CASE(svgValue, v8Value) case WebCore::SVGPathSeg::svgValue: return V8ClassIndex::v8Value
-
- MAKE_CASE(PATHSEG_CLOSEPATH, SVGPATHSEGCLOSEPATH);
- MAKE_CASE(PATHSEG_MOVETO_ABS, SVGPATHSEGMOVETOABS);
- MAKE_CASE(PATHSEG_MOVETO_REL, SVGPATHSEGMOVETOREL);
- MAKE_CASE(PATHSEG_LINETO_ABS, SVGPATHSEGLINETOABS);
- MAKE_CASE(PATHSEG_LINETO_REL, SVGPATHSEGLINETOREL);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_ABS, SVGPATHSEGCURVETOCUBICABS);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_REL, SVGPATHSEGCURVETOCUBICREL);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_ABS, SVGPATHSEGCURVETOQUADRATICABS);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_REL, SVGPATHSEGCURVETOQUADRATICREL);
- MAKE_CASE(PATHSEG_ARC_ABS, SVGPATHSEGARCABS);
- MAKE_CASE(PATHSEG_ARC_REL, SVGPATHSEGARCREL);
- MAKE_CASE(PATHSEG_LINETO_HORIZONTAL_ABS, SVGPATHSEGLINETOHORIZONTALABS);
- MAKE_CASE(PATHSEG_LINETO_HORIZONTAL_REL, SVGPATHSEGLINETOHORIZONTALREL);
- MAKE_CASE(PATHSEG_LINETO_VERTICAL_ABS, SVGPATHSEGLINETOVERTICALABS);
- MAKE_CASE(PATHSEG_LINETO_VERTICAL_REL, SVGPATHSEGLINETOVERTICALREL);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, SVGPATHSEGCURVETOCUBICSMOOTHABS);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_SMOOTH_REL, SVGPATHSEGCURVETOCUBICSMOOTHREL);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, SVGPATHSEGCURVETOQUADRATICSMOOTHABS);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, SVGPATHSEGCURVETOQUADRATICSMOOTHREL);
-
-#undef MAKE_CASE
-
- default:
- return V8ClassIndex::INVALID_CLASS_INDEX;
- }
-}
-
-#endif // ENABLE(SVG)
-
-#else // MANUAL_MERGE_REQUIRED
// DOMImplementation is a singleton in WebCore. If we use our normal
// mapping from DOM objects to V8 wrappers, the same wrapper will be
// shared for all frames in the same process. This is a major
@@ -296,5 +179,4 @@ V8ClassIndex::V8WrapperType V8Custom::DowncastSVGPathSeg(void* pathSeg)
#endif // ENABLE(SVG)
-#endif // MANUAL_MERGE_REQUIRED
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8CustomBinding.h b/WebCore/bindings/v8/custom/V8CustomBinding.h
index 42aca44..b72a349 100644
--- a/WebCore/bindings/v8/custom/V8CustomBinding.h
+++ b/WebCore/bindings/v8/custom/V8CustomBinding.h
@@ -91,459 +91,6 @@ namespace WebCore {
bool allowSettingFrameSrcToJavascriptUrl(HTMLFrameElementBase*, String value);
bool allowSettingSrcToJavascriptURL(Element*, String name, String value);
-#ifdef MANUAL_MERGE_REQUIRED
- class V8Custom {
- public:
- // Constants.
- static const int kDOMWrapperTypeIndex = 0;
- static const int kDOMWrapperObjectIndex = 1;
- static const int kDefaultWrapperInternalFieldCount = 2;
-
- static const int kNPObjectInternalFieldCount = kDefaultWrapperInternalFieldCount + 0;
-
- static const int kDocumentImplementationIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kDocumentMinimumInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kHTMLDocumentMarkerIndex = kDocumentMinimumInternalFieldCount + 0;
- static const int kHTMLDocumentShadowIndex = kDocumentMinimumInternalFieldCount + 1;
- static const int kHTMLDocumentInternalFieldCount = kDocumentMinimumInternalFieldCount + 2;
-
- static const int kXMLHttpRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kXMLHttpRequestInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kMessageChannelPort1Index = kDefaultWrapperInternalFieldCount + 0;
- static const int kMessageChannelPort2Index = kDefaultWrapperInternalFieldCount + 1;
- static const int kMessageChannelInternalFieldCount = kDefaultWrapperInternalFieldCount + 2;
-
- static const int kMessagePortRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kMessagePortEntangledPortIndex = kDefaultWrapperInternalFieldCount + 1;
- static const int kMessagePortInternalFieldCount = kDefaultWrapperInternalFieldCount + 2;
-
-#if ENABLE(WORKERS)
- static const int kWorkerRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kWorkerInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kWorkerContextRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kWorkerContextInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-#endif
-
- static const int kDOMWindowConsoleIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kDOMWindowHistoryIndex = kDefaultWrapperInternalFieldCount + 1;
- static const int kDOMWindowLocationbarIndex = kDefaultWrapperInternalFieldCount + 2;
- static const int kDOMWindowMenubarIndex = kDefaultWrapperInternalFieldCount + 3;
- static const int kDOMWindowNavigatorIndex = kDefaultWrapperInternalFieldCount + 4;
- static const int kDOMWindowPersonalbarIndex = kDefaultWrapperInternalFieldCount + 5;
- static const int kDOMWindowScreenIndex = kDefaultWrapperInternalFieldCount + 6;
- static const int kDOMWindowScrollbarsIndex = kDefaultWrapperInternalFieldCount + 7;
- static const int kDOMWindowSelectionIndex = kDefaultWrapperInternalFieldCount + 8;
- static const int kDOMWindowStatusbarIndex = kDefaultWrapperInternalFieldCount + 9;
- static const int kDOMWindowToolbarIndex = kDefaultWrapperInternalFieldCount + 10;
- static const int kDOMWindowLocationIndex = kDefaultWrapperInternalFieldCount + 11;
- static const int kDOMWindowDOMSelectionIndex = kDefaultWrapperInternalFieldCount + 12;
- static const int kDOMWindowInternalFieldCount = kDefaultWrapperInternalFieldCount + 13;
-
- static const int kStyleSheetOwnerNodeIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kStyleSheetInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- static const int kDOMApplicationCacheCacheIndex =
- kDefaultWrapperInternalFieldCount + 0;
- static const int kDOMApplicationCacheFieldCount =
- kDefaultWrapperInternalFieldCount + 1;
-#endif
-
-#define DECLARE_PROPERTY_ACCESSOR_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##AccessorGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define DECLARE_PROPERTY_ACCESSOR_SETTER(NAME) \
- static void v8##NAME##AccessorSetter(v8::Local<v8::String> name, \
- v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_PROPERTY_ACCESSOR(NAME) DECLARE_PROPERTY_ACCESSOR_GETTER(NAME); DECLARE_PROPERTY_ACCESSOR_SETTER(NAME)
-
-#define DECLARE_NAMED_PROPERTY_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##NamedPropertyGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define DECLARE_NAMED_PROPERTY_SETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##NamedPropertySetter( \
- v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_NAMED_PROPERTY_DELETER(NAME) \
- static v8::Handle<v8::Boolean> v8##NAME##NamedPropertyDeleter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define USE_NAMED_PROPERTY_GETTER(NAME) V8Custom::v8##NAME##NamedPropertyGetter
-
-#define USE_NAMED_PROPERTY_SETTER(NAME) V8Custom::v8##NAME##NamedPropertySetter
-
-#define USE_NAMED_PROPERTY_DELETER(NAME) V8Custom::v8##NAME##NamedPropertyDeleter
-
-#define DECLARE_INDEXED_PROPERTY_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##IndexedPropertyGetter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define DECLARE_INDEXED_PROPERTY_SETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##IndexedPropertySetter( \
- uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_INDEXED_PROPERTY_DELETER(NAME) \
- static v8::Handle<v8::Boolean> v8##NAME##IndexedPropertyDeleter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define USE_INDEXED_PROPERTY_GETTER(NAME) V8Custom::v8##NAME##IndexedPropertyGetter
-
-#define USE_INDEXED_PROPERTY_SETTER(NAME) V8Custom::v8##NAME##IndexedPropertySetter
-
-#define USE_INDEXED_PROPERTY_DELETER(NAME) V8Custom::v8##NAME##IndexedPropertyDeleter
-
-#define DECLARE_CALLBACK(NAME) static v8::Handle<v8::Value> v8##NAME##Callback(const v8::Arguments& args)
-
-#define USE_CALLBACK(NAME) V8Custom::v8##NAME##Callback
-
-#define DECLARE_NAMED_ACCESS_CHECK(NAME) \
- static bool v8##NAME##NamedSecurityCheck(v8::Local<v8::Object> host, \
- v8::Local<v8::Value> key, v8::AccessType type, v8::Local<v8::Value> data)
-
-#define DECLARE_INDEXED_ACCESS_CHECK(NAME) \
- static bool v8##NAME##IndexedSecurityCheck(v8::Local<v8::Object> host, \
- uint32_t index, v8::AccessType type, v8::Local<v8::Value> data)
-
- DECLARE_PROPERTY_ACCESSOR(CanvasRenderingContext2DStrokeStyle);
- DECLARE_PROPERTY_ACCESSOR(CanvasRenderingContext2DFillStyle);
- DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowEvent);
- DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowCrypto);
- DECLARE_PROPERTY_ACCESSOR_SETTER(DOMWindowLocation);
- DECLARE_PROPERTY_ACCESSOR_SETTER(DOMWindowOpener);
-
- DECLARE_PROPERTY_ACCESSOR(DocumentLocation);
- DECLARE_PROPERTY_ACCESSOR(DocumentImplementation);
- DECLARE_PROPERTY_ACCESSOR_GETTER(EventSrcElement);
- DECLARE_PROPERTY_ACCESSOR(EventReturnValue);
- DECLARE_PROPERTY_ACCESSOR_GETTER(EventDataTransfer);
- DECLARE_PROPERTY_ACCESSOR_GETTER(EventClipboardData);
-
- DECLARE_PROPERTY_ACCESSOR(DOMWindowEventHandler);
- DECLARE_PROPERTY_ACCESSOR(ElementEventHandler);
-
- DECLARE_CALLBACK(HTMLCanvasElementGetContext);
-
- DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLFrameElementSrc);
- DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLFrameElementLocation);
- DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLIFrameElementSrc);
-
- DECLARE_PROPERTY_ACCESSOR_SETTER(AttrValue);
-
- DECLARE_PROPERTY_ACCESSOR(HTMLOptionsCollectionLength);
-
- DECLARE_CALLBACK(HTMLInputElementSetSelectionRange);
-
- DECLARE_PROPERTY_ACCESSOR(HTMLInputElementSelectionStart);
- DECLARE_PROPERTY_ACCESSOR(HTMLInputElementSelectionEnd);
-
- DECLARE_NAMED_ACCESS_CHECK(Location);
- DECLARE_INDEXED_ACCESS_CHECK(History);
-
- DECLARE_NAMED_ACCESS_CHECK(History);
- DECLARE_INDEXED_ACCESS_CHECK(Location);
-
- DECLARE_CALLBACK(HTMLCollectionItem);
- DECLARE_CALLBACK(HTMLCollectionNamedItem);
- DECLARE_CALLBACK(HTMLCollectionCallAsFunction);
-
- DECLARE_CALLBACK(HTMLSelectElementRemove);
-
- DECLARE_CALLBACK(HTMLOptionsCollectionRemove);
- DECLARE_CALLBACK(HTMLOptionsCollectionAdd);
-
- DECLARE_CALLBACK(HTMLDocumentWrite);
- DECLARE_CALLBACK(HTMLDocumentWriteln);
- DECLARE_CALLBACK(HTMLDocumentOpen);
- DECLARE_PROPERTY_ACCESSOR(HTMLDocumentAll);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLDocument);
- DECLARE_NAMED_PROPERTY_DELETER(HTMLDocument);
-
- DECLARE_CALLBACK(DocumentEvaluate);
- DECLARE_CALLBACK(DocumentGetCSSCanvasContext);
-
- DECLARE_CALLBACK(DOMWindowAddEventListener);
- DECLARE_CALLBACK(DOMWindowRemoveEventListener);
- DECLARE_CALLBACK(DOMWindowPostMessage);
- DECLARE_CALLBACK(DOMWindowSetTimeout);
- DECLARE_CALLBACK(DOMWindowSetInterval);
- DECLARE_CALLBACK(DOMWindowAtob);
- DECLARE_CALLBACK(DOMWindowBtoa);
- DECLARE_CALLBACK(DOMWindowNOP);
- DECLARE_CALLBACK(DOMWindowToString);
- DECLARE_CALLBACK(DOMWindowShowModalDialog);
- DECLARE_CALLBACK(DOMWindowOpen);
- DECLARE_CALLBACK(DOMWindowClearTimeout);
- DECLARE_CALLBACK(DOMWindowClearInterval);
-
- DECLARE_CALLBACK(DOMParserConstructor);
- DECLARE_CALLBACK(HTMLAudioElementConstructor);
- DECLARE_CALLBACK(HTMLImageElementConstructor);
- DECLARE_CALLBACK(HTMLOptionElementConstructor);
- DECLARE_CALLBACK(MessageChannelConstructor);
- DECLARE_CALLBACK(WebKitCSSMatrixConstructor);
- DECLARE_CALLBACK(WebKitPointConstructor);
- DECLARE_CALLBACK(XMLHttpRequestConstructor);
- DECLARE_CALLBACK(XMLSerializerConstructor);
- DECLARE_CALLBACK(XPathEvaluatorConstructor);
- DECLARE_CALLBACK(XSLTProcessorConstructor);
-
- DECLARE_CALLBACK(XSLTProcessorImportStylesheet);
- DECLARE_CALLBACK(XSLTProcessorTransformToFragment);
- DECLARE_CALLBACK(XSLTProcessorTransformToDocument);
- DECLARE_CALLBACK(XSLTProcessorSetParameter);
- DECLARE_CALLBACK(XSLTProcessorGetParameter);
- DECLARE_CALLBACK(XSLTProcessorRemoveParameter);
-
- DECLARE_CALLBACK(CSSPrimitiveValueGetRGBColorValue);
-
- DECLARE_CALLBACK(CanvasRenderingContext2DSetStrokeColor);
- DECLARE_CALLBACK(CanvasRenderingContext2DSetFillColor);
- DECLARE_CALLBACK(CanvasRenderingContext2DStrokeRect);
- DECLARE_CALLBACK(CanvasRenderingContext2DSetShadow);
- DECLARE_CALLBACK(CanvasRenderingContext2DDrawImage);
- DECLARE_CALLBACK(CanvasRenderingContext2DDrawImageFromRect);
- DECLARE_CALLBACK(CanvasRenderingContext2DCreatePattern);
- DECLARE_CALLBACK(CanvasRenderingContext2DFillText);
- DECLARE_CALLBACK(CanvasRenderingContext2DStrokeText);
- DECLARE_CALLBACK(CanvasRenderingContext2DPutImageData);
-
- DECLARE_PROPERTY_ACCESSOR_GETTER(ClipboardTypes);
- DECLARE_CALLBACK(ClipboardClearData);
- DECLARE_CALLBACK(ClipboardGetData);
- DECLARE_CALLBACK(ClipboardSetData);
- DECLARE_CALLBACK(ClipboardSetDragImage);
-
- DECLARE_CALLBACK(ElementQuerySelector);
- DECLARE_CALLBACK(ElementQuerySelectorAll);
- DECLARE_CALLBACK(ElementSetAttribute);
- DECLARE_CALLBACK(ElementSetAttributeNode);
- DECLARE_CALLBACK(ElementSetAttributeNS);
- DECLARE_CALLBACK(ElementSetAttributeNodeNS);
-
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationProtocol);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationHost);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationHostname);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationPort);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationPathname);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationSearch);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationHash);
- DECLARE_PROPERTY_ACCESSOR_SETTER(LocationHref);
- DECLARE_PROPERTY_ACCESSOR_GETTER(LocationAssign);
- DECLARE_PROPERTY_ACCESSOR_GETTER(LocationReplace);
- DECLARE_PROPERTY_ACCESSOR_GETTER(LocationReload);
- DECLARE_CALLBACK(LocationAssign);
- DECLARE_CALLBACK(LocationReplace);
- DECLARE_CALLBACK(LocationReload);
- DECLARE_CALLBACK(LocationToString);
- DECLARE_CALLBACK(LocationValueOf);
-
- DECLARE_CALLBACK(NodeAddEventListener);
- DECLARE_CALLBACK(NodeRemoveEventListener);
- DECLARE_CALLBACK(NodeInsertBefore);
- DECLARE_CALLBACK(NodeReplaceChild);
- DECLARE_CALLBACK(NodeRemoveChild);
- DECLARE_CALLBACK(NodeAppendChild);
-
- // We actually only need this because WebKit has
- // navigator.appVersion as custom. Our version just
- // passes through.
- DECLARE_PROPERTY_ACCESSOR(NavigatorAppVersion);
-
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestOnabort);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestOnerror);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestOnload);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestOnloadstart);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestOnprogress);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestOnreadystatechange);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestResponseText);
- DECLARE_CALLBACK(XMLHttpRequestAddEventListener);
- DECLARE_CALLBACK(XMLHttpRequestRemoveEventListener);
- DECLARE_CALLBACK(XMLHttpRequestOpen);
- DECLARE_CALLBACK(XMLHttpRequestSend);
- DECLARE_CALLBACK(XMLHttpRequestSetRequestHeader);
- DECLARE_CALLBACK(XMLHttpRequestGetResponseHeader);
- DECLARE_CALLBACK(XMLHttpRequestOverrideMimeType);
- DECLARE_CALLBACK(XMLHttpRequestDispatchEvent);
-
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestUploadOnabort);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestUploadOnerror);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestUploadOnload);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestUploadOnloadstart);
- DECLARE_PROPERTY_ACCESSOR(XMLHttpRequestUploadOnprogress);
- DECLARE_CALLBACK(XMLHttpRequestUploadAddEventListener);
- DECLARE_CALLBACK(XMLHttpRequestUploadRemoveEventListener);
- DECLARE_CALLBACK(XMLHttpRequestUploadDispatchEvent);
-
- DECLARE_CALLBACK(TreeWalkerParentNode);
- DECLARE_CALLBACK(TreeWalkerFirstChild);
- DECLARE_CALLBACK(TreeWalkerLastChild);
- DECLARE_CALLBACK(TreeWalkerNextNode);
- DECLARE_CALLBACK(TreeWalkerPreviousNode);
- DECLARE_CALLBACK(TreeWalkerNextSibling);
- DECLARE_CALLBACK(TreeWalkerPreviousSibling);
-
- DECLARE_CALLBACK(InspectorControllerProfiles);
- DECLARE_CALLBACK(InspectorControllerHighlightDOMNode);
- DECLARE_CALLBACK(InspectorControllerAddResourceSourceToFrame);
- DECLARE_CALLBACK(InspectorControllerGetResourceDocumentNode);
- DECLARE_CALLBACK(InspectorControllerAddSourceToFrame);
- DECLARE_CALLBACK(InspectorControllerSearch);
- DECLARE_CALLBACK(InspectorControllerSetting);
- DECLARE_CALLBACK(InspectorControllerInspectedWindow);
- DECLARE_CALLBACK(InspectorControllerSetSetting);
- DECLARE_CALLBACK(InspectorControllerCurrentCallFrame);
- DECLARE_CALLBACK(InspectorControllerDebuggerEnabled);
- DECLARE_CALLBACK(InspectorControllerPauseOnExceptions);
- DECLARE_CALLBACK(InspectorControllerProfilerEnabled);
-#if ENABLE(DATABASE)
- DECLARE_CALLBACK(InspectorControllerDatabaseTableNames);
-#endif
- DECLARE_CALLBACK(InspectorControllerWrapCallback);
-
- DECLARE_CALLBACK(NodeIteratorNextNode);
- DECLARE_CALLBACK(NodeIteratorPreviousNode);
-
- DECLARE_CALLBACK(NodeFilterAcceptNode);
-
- DECLARE_CALLBACK(HTMLFormElementSubmit);
-
- DECLARE_INDEXED_PROPERTY_GETTER(DOMStringList);
- DECLARE_CALLBACK(DOMStringListItem);
-
- DECLARE_NAMED_PROPERTY_GETTER(DOMWindow);
- DECLARE_INDEXED_PROPERTY_GETTER(DOMWindow);
- DECLARE_NAMED_ACCESS_CHECK(DOMWindow);
- DECLARE_INDEXED_ACCESS_CHECK(DOMWindow);
-
- DECLARE_NAMED_PROPERTY_GETTER(HTMLFrameSetElement);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLFormElement);
- DECLARE_NAMED_PROPERTY_GETTER(NodeList);
- DECLARE_NAMED_PROPERTY_GETTER(NamedNodeMap);
- DECLARE_NAMED_PROPERTY_GETTER(CSSStyleDeclaration);
- DECLARE_NAMED_PROPERTY_SETTER(CSSStyleDeclaration);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLPlugInElement);
- DECLARE_NAMED_PROPERTY_SETTER(HTMLPlugInElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLPlugInElement);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLPlugInElement);
-
- DECLARE_CALLBACK(HTMLPlugInElement);
-
- DECLARE_NAMED_PROPERTY_GETTER(StyleSheetList);
- DECLARE_INDEXED_PROPERTY_GETTER(NamedNodeMap);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLFormElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLSelectElementCollection);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection);
-
- DECLARE_INDEXED_PROPERTY_GETTER(CanvasPixelArray);
- DECLARE_INDEXED_PROPERTY_SETTER(CanvasPixelArray);
-
- DECLARE_PROPERTY_ACCESSOR(MessagePortOnmessage);
- DECLARE_PROPERTY_ACCESSOR(MessagePortOnclose);
- DECLARE_CALLBACK(MessagePortStartConversation);
- DECLARE_CALLBACK(MessagePortAddEventListener);
- DECLARE_CALLBACK(MessagePortRemoveEventListener);
-
- DECLARE_CALLBACK(DatabaseChangeVersion);
- DECLARE_CALLBACK(DatabaseTransaction);
- DECLARE_CALLBACK(SQLTransactionExecuteSql);
- DECLARE_CALLBACK(SQLResultSetRowListItem);
-
- DECLARE_INDEXED_PROPERTY_GETTER(ClientRectList);
-
-#if ENABLE(TOUCH_EVENTS)
- // TODO(andreip): upstream touch related changes to Chromium
- DECLARE_INDEXED_PROPERTY_GETTER(TouchList);
-#endif
-
-#if ENABLE(DOM_STORAGE)
- DECLARE_INDEXED_PROPERTY_GETTER(Storage);
- DECLARE_INDEXED_PROPERTY_SETTER(Storage);
- DECLARE_INDEXED_PROPERTY_DELETER(Storage);
- DECLARE_NAMED_PROPERTY_GETTER(Storage);
- DECLARE_NAMED_PROPERTY_SETTER(Storage);
- DECLARE_NAMED_PROPERTY_DELETER(Storage);
- static v8::Handle<v8::Array> v8StorageNamedPropertyEnumerator(const v8::AccessorInfo& info);
-#endif
-
-#if ENABLE(SVG)
- DECLARE_PROPERTY_ACCESSOR_GETTER(SVGLengthValue);
- DECLARE_CALLBACK(SVGLengthConvertToSpecifiedUnits);
- DECLARE_CALLBACK(SVGMatrixInverse);
- DECLARE_CALLBACK(SVGMatrixRotateFromVector);
- DECLARE_CALLBACK(SVGElementInstanceAddEventListener);
- DECLARE_CALLBACK(SVGElementInstanceRemoveEventListener);
-#endif
-
-#if ENABLE(WORKERS)
- DECLARE_PROPERTY_ACCESSOR(WorkerOnmessage);
- DECLARE_PROPERTY_ACCESSOR(WorkerOnerror);
- DECLARE_CALLBACK(WorkerConstructor);
- DECLARE_CALLBACK(WorkerAddEventListener);
- DECLARE_CALLBACK(WorkerRemoveEventListener);
-
- DECLARE_PROPERTY_ACCESSOR_GETTER(WorkerContextSelf);
- DECLARE_PROPERTY_ACCESSOR(WorkerContextOnmessage);
- DECLARE_CALLBACK(WorkerContextImportScripts);
- DECLARE_CALLBACK(WorkerContextSetTimeout);
- DECLARE_CALLBACK(WorkerContextClearTimeout);
- DECLARE_CALLBACK(WorkerContextSetInterval);
- DECLARE_CALLBACK(WorkerContextClearInterval);
- DECLARE_CALLBACK(WorkerContextAddEventListener);
- DECLARE_CALLBACK(WorkerContextRemoveEventListener);
-#endif
-
-// AppCache
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- DECLARE_PROPERTY_ACCESSOR(DOMApplicationCacheEventHandler);
- DECLARE_CALLBACK(DOMApplicationCacheAddEventListener);
- DECLARE_CALLBACK(DOMApplicationCacheRemoveEventListener);
-#endif
-
-#undef DECLARE_INDEXED_ACCESS_CHECK
-#undef DECLARE_NAMED_ACCESS_CHECK
-
-#undef DECLARE_PROPERTY_ACCESSOR_SETTER
-#undef DECLARE_PROPERTY_ACCESSOR_GETTER
-#undef DECLARE_PROPERTY_ACCESSOR
-
-#undef DECLARE_NAMED_PROPERTY_GETTER
-#undef DECLARE_NAMED_PROPERTY_SETTER
-#undef DECLARE_NAMED_PROPERTY_DELETER
-
-#undef DECLARE_INDEXED_PROPERTY_GETTER
-#undef DECLARE_INDEXED_PROPERTY_SETTER
-#undef DECLARE_INDEXED_PROPERTY_DELETER
-
-#undef DECLARE_CALLBACK
-
- // Returns the NPObject corresponding to an HTMLElement object.
- static NPObject* GetHTMLPlugInElementNPObject(v8::Handle<v8::Object>);
-
- // Returns the owner frame pointer of a DOM wrapper object. It only works for
- // these DOM objects requiring cross-domain access check.
- static Frame* GetTargetFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data);
-
- // Special case for downcasting SVG path segments.
-#if ENABLE(SVG)
- static V8ClassIndex::V8WrapperType DowncastSVGPathSeg(void* pathSeg);
-#endif
-
- private:
- static v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments&, bool singleShot);
- static void ClearTimeoutImpl(const v8::Arguments&);
- static void WindowSetLocation(DOMWindow*, const String&);
- };
-
-#else // MANUAL_MERGE_REQUIRED
class V8Custom {
public:
// Constants.
@@ -1005,7 +552,6 @@ namespace WebCore {
static void WindowSetLocation(DOMWindow*, const String&);
};
-#endif // MANUAL_MERGE_REQUIRED
} // namespace WebCore
#endif // V8CustomBinding_h
diff --git a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
index dbaa942..300e829 100644
--- a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
@@ -32,19 +32,9 @@
#if ENABLE(DATABASE)
-#ifdef MANUAL_MERGE_REQUIRED
-#include "v8_binding.h"
-#include "v8_proxy.h"
-
-#else // MANUAL_MERGE_REQUIRED
-#endif // MANUAL_MERGE_REQUIRED
#include "Database.h"
-#ifdef MANUAL_MERGE_REQUIRED
-#include "V8CustomBinding.h"
-#else // MANUAL_MERGE_REQUIRED
#include "V8Binding.h"
#include "V8CustomBinding.h"
-#endif // MANUAL_MERGE_REQUIRED
#include "V8CustomSQLTransactionCallback.h"
#include "V8CustomSQLTransactionErrorCallback.h"
#include "V8CustomVoidCallback.h"
diff --git a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index 60fc22f..80d204b 100644
--- a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -54,13 +54,8 @@ namespace WebCore {
CALLBACK_FUNC_DECL(DocumentEvaluate)
{
INC_STATS("DOM.Document.evaluate()");
-#ifdef MANUAL_MERGE_REQUIRED
#if ENABLE(XPATH)
- Document* document = V8Proxy::DOMWrapperToNode<Document>(args.Holder());
-#else // MANUAL_MERGE_REQUIRED
-
RefPtr<Document> document = V8DOMWrapper::convertDOMWrapperToNode<Document>(args.Holder());
-#endif // MANUAL_MERGE_REQUIRED
ExceptionCode ec = 0;
String expression = toWebCoreString(args[0]);
RefPtr<Node> contextNode;
@@ -88,14 +83,11 @@ CALLBACK_FUNC_DECL(DocumentEvaluate)
if (ec)
return throwError(ec);
-#ifdef MANUAL_MERGE_REQUIRED
- return V8Proxy::ToV8Object(V8ClassIndex::XPATHRESULT, result.get());
+ return V8DOMWrapper::convertToV8Object(V8ClassIndex::XPATHRESULT, result.release());
#else
return throwError(NOT_SUPPORTED_ERR);
#endif
-#else // MANUAL_MERGE_REQUIRED
- return V8DOMWrapper::convertToV8Object(V8ClassIndex::XPATHRESULT, result.release());
-#endif // MANUAL_MERGE_REQUIRED
+
}
CALLBACK_FUNC_DECL(DocumentGetCSSCanvasContext)
diff --git a/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp b/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
index aced4ee..73aae12 100644
--- a/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
@@ -32,20 +32,10 @@
#if ENABLE(DATABASE)
-#ifdef MANUAL_MERGE_REQUIRED
-#include "v8_binding.h"
-#include "v8_proxy.h"
-
-#else // MANUAL_MERGE_REQUIRED
-#endif // MANUAL_MERGE_REQUIRED
#include "SQLResultSetRowList.h"
-#ifdef MANUAL_MERGE_REQUIRED
-#include "V8CustomBinding.h"
-#else // MANUAL_MERGE_REQUIRED
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
-#endif // MANUAL_MERGE_REQUIRED
namespace WebCore {
diff --git a/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp b/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
index b9b86fc..8fa5bde 100644
--- a/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
@@ -32,20 +32,10 @@
#if ENABLE(DATABASE)
-#ifdef MANUAL_MERGE_REQUIRED
-#include "v8_binding.h"
-#include "v8_proxy.h"
-
-#else // MANUAL_MERGE_REQUIRED
-#endif // MANUAL_MERGE_REQUIRED
#include "Database.h"
#include "SQLValue.h"
-#ifdef MANUAL_MERGE_REQUIRED
-#include "V8CustomBinding.h"
-#else // MANUAL_MERGE_REQUIRED
#include "V8Binding.h"
#include "V8CustomBinding.h"
-#endif // MANUAL_MERGE_REQUIRED
#include "V8CustomSQLStatementCallback.h"
#include "V8CustomSQLStatementErrorCallback.h"
#include "V8Proxy.h"