diff options
Diffstat (limited to 'WebCore/bindings/v8')
| -rw-r--r-- | WebCore/bindings/v8/V8DOMWrapper.cpp | 8 | ||||
| -rw-r--r-- | WebCore/bindings/v8/V8Index.cpp | 3 | ||||
| -rw-r--r-- | WebCore/bindings/v8/V8Index.h | 7 | ||||
| -rw-r--r-- | WebCore/bindings/v8/V8Proxy.cpp | 101 |
4 files changed, 10 insertions, 109 deletions
diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp index 7ecc29c..a31c5bd 100644 --- a/WebCore/bindings/v8/V8DOMWrapper.cpp +++ b/WebCore/bindings/v8/V8DOMWrapper.cpp @@ -1541,20 +1541,12 @@ PassRefPtr<EventListener> V8DOMWrapper::getEventListener(Node* node, v8::Local<v return (lookup == ListenerFindOnly) ? V8EventListenerList::findWrapper(value, isAttribute) : V8EventListenerList::findOrCreateWrapper<V8EventListener>(value, isAttribute); } -<<<<<<< HEAD:WebCore/bindings/v8/V8DOMWrapper.cpp -#if PLATFORM(ANDROID) -======= ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8DOMWrapper.cpp #if ENABLE(SVG) PassRefPtr<EventListener> V8DOMWrapper::getEventListener(SVGElementInstance* element, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup) { return getEventListener(element->correspondingElement(), value, isAttribute, lookup); } #endif -<<<<<<< HEAD:WebCore/bindings/v8/V8DOMWrapper.cpp -#endif -======= ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8DOMWrapper.cpp PassRefPtr<EventListener> V8DOMWrapper::getEventListener(AbstractWorker* worker, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup) { diff --git a/WebCore/bindings/v8/V8Index.cpp b/WebCore/bindings/v8/V8Index.cpp index 7acaf89..9686dc6 100644 --- a/WebCore/bindings/v8/V8Index.cpp +++ b/WebCore/bindings/v8/V8Index.cpp @@ -446,7 +446,6 @@ #include "V8Geoposition.h" #include "V8PositionError.h" -<<<<<<< HEAD:WebCore/bindings/v8/V8Index.cpp #if PLATFORM(ANDROID) // TODO: Upstream these guards to webkit.org #if ENABLE(TOUCH_EVENTS) @@ -458,8 +457,6 @@ #include "V8VoidCallback.h" #endif // PLATFORM(ANDROID) -======= ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Index.cpp namespace WebCore { FunctionTemplateFactory V8ClassIndex::GetFactory(V8WrapperType type) diff --git a/WebCore/bindings/v8/V8Index.h b/WebCore/bindings/v8/V8Index.h index 6184f5a..d786aab 100644 --- a/WebCore/bindings/v8/V8Index.h +++ b/WebCore/bindings/v8/V8Index.h @@ -502,7 +502,6 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); V(GEOPOSITION, Geoposition) \ V(POSITIONERROR, PositionError) -<<<<<<< HEAD:WebCore/bindings/v8/V8Index.h #if PLATFORM(ANDROID) // TODO: Upstream this guard. #if ENABLE(TOUCH_EVENTS) @@ -524,8 +523,6 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); #if PLATFORM(ANDROID) // This block is modified, but is not Android-specific. -======= ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Index.h #define DOM_OBJECT_TYPES(V) \ DOM_OBJECT_TYPES_1(V) \ DOM_OBJECT_TYPES_2(V) \ @@ -536,14 +533,10 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); DOM_OBJECT_XPATH_TYPES(V) \ DOM_OBJECT_XSLT_TYPES(V) \ DOM_OBJECT_INSPECTOR_TYPES(V) \ -<<<<<<< HEAD:WebCore/bindings/v8/V8Index.h DOM_OBJECT_GEOLOCATION_TYPES(V) \ DOM_OBJECT_TOUCH_EVENT_TYPES(V) \ DOM_OBJECT_VOIDCALLBACK_TYPES(V) #endif -======= - DOM_OBJECT_GEOLOCATION_TYPES(V) ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Index.h #if ENABLE(SVG) // SVG_OBJECT_TYPES are svg non-node, non-pod types. diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp index c016d90..e3430b2 100644 --- a/WebCore/bindings/v8/V8Proxy.cpp +++ b/WebCore/bindings/v8/V8Proxy.cpp @@ -465,21 +465,16 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* nod // this based on whether the script source has a URL. result = runScript(script, source.url().string().isNull()); } -#if PLATFORM(CHROMIUM) - // TODO(andreip): ChromeBridge->BrowserBridge? - ChromiumBridge::traceEventEnd("v8.run", node, ""); -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp -======= #if ENABLE(INSPECTOR) if (InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0) timelineAgent->didEvaluateScript(); ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp #endif -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp -======= ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp +#if PLATFORM(CHROMIUM) + // TODO(andreip): upstream CHROMIUM guards to webkit.org + ChromiumBridge::traceEventEnd("v8.run", node, ""); +#endif return result; } @@ -553,13 +548,10 @@ v8::Local<v8::Value> V8Proxy::runScriptInternal(v8::Handle<v8::Script> script, b v8::Local<v8::Value> V8Proxy::callFunction(v8::Handle<v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> args[]) { -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp #ifdef ANDROID_INSTRUMENT android::TimeCounter::start(android::TimeCounter::JavaScriptExecuteTimeCounter); #endif -======= V8GCController::checkMemoryUsage(); ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp v8::Local<v8::Value> result; { V8ConsoleMessage::Scope scope; @@ -711,63 +703,6 @@ V8Proxy* V8Proxy::retrieve(ScriptExecutionContext* context) void V8Proxy::disconnectFrame() { -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp - disconnectEventListeners(); -} - -bool V8Proxy::isEnabled() -{ - Settings* settings = m_frame->settings(); - if (!settings) - return false; - - // In the common case, JavaScript is enabled and we're done. - if (settings->isJavaScriptEnabled()) - return true; - - // If JavaScript has been disabled, we need to look at the frame to tell - // whether this script came from the web or the embedder. Scripts from the - // embedder are safe to run, but scripts from the other sources are - // disallowed. - Document* document = m_frame->document(); - if (!document) - return false; - - SecurityOrigin* origin = document->securityOrigin(); - if (origin->protocol().isEmpty()) - return false; // Uninitialized document - - if (origin->protocol() == "http" || origin->protocol() == "https") - return false; // Web site - - // FIXME: the following are application decisions, and they should - // not be made at this layer. instead, we should bridge out to the - // embedder to allow them to override policy here. - -#if PLATFORM(CHROMIUM) - // TODO(andreip): ChromeBridge->BrowserBridge? - if (origin->protocol() == ChromiumBridge::uiResourceProtocol()) - return true; // Embedder's scripts are ok to run -#endif - - // If the scheme is ftp: or file:, an empty file name indicates a directory - // listing, which requires JavaScript to function properly. - const char* kDirProtocols[] = { "ftp", "file" }; -#if PLATFORM(ANDROID) - // TODO(andreip): Port arraysize function to Android. There's one in Gears. - for (size_t i = 0; i < 2; ++i) { -#else - for (size_t i = 0; i < arraysize(kDirProtocols); ++i) { -#endif - if (origin->protocol() == kDirProtocols[i]) { - const KURL& url = document->url(); - return url.pathAfterLastSlash() == url.pathEnd(); - } - } - - return false; // Other protocols fall through to here -======= ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp } void V8Proxy::updateDocumentWrapper(v8::Handle<v8::Value> wrapper) @@ -1238,17 +1173,14 @@ void V8Proxy::initContextIfNeeded() setSecurityToken(); m_frame->loader()->client()->didCreateScriptContextForFrame(); -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp - m_frame->loader()->dispatchWindowObjectAvailable(); -#ifdef ANDROID_INSTRUMENT - android::TimeCounter::record(android::TimeCounter::JavaScriptInitTimeCounter, __FUNCTION__); -#endif -======= // FIXME: This is wrong. We should actually do this for the proper world once // we do isolated worlds the WebCore way. m_frame->loader()->dispatchDidClearWindowObjectInWorld(0); ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp + +#ifdef ANDROID_INSTRUMENT + android::TimeCounter::record(android::TimeCounter::JavaScriptInitTimeCounter, __FUNCTION__); +#endif } void V8Proxy::setDOMException(int exceptionCode) @@ -1430,21 +1362,13 @@ bool V8Proxy::sourceLineNumber(int& result) v8::Handle<v8::Function> frameSourceLine; frameSourceLine = v8::Local<v8::Function>::Cast(v8UtilityContext->Global()->Get(v8::String::New("frameSourceLine"))); if (frameSourceLine.IsEmpty()) -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp - return 0; - v8::Handle<v8::Value> result = v8::Debug::Call(frameSourceLine); - if (result.IsEmpty()) - return 0; - return result->Int32Value(); -#endif -======= return false; v8::Handle<v8::Value> value = v8::Debug::Call(frameSourceLine); if (value.IsEmpty()) return false; result = value->Int32Value(); return true; ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp +#endif } bool V8Proxy::sourceName(String& result) @@ -1460,18 +1384,13 @@ bool V8Proxy::sourceName(String& result) v8::Handle<v8::Function> frameSourceName; frameSourceName = v8::Local<v8::Function>::Cast(v8UtilityContext->Global()->Get(v8::String::New("frameSourceName"))); if (frameSourceName.IsEmpty()) -<<<<<<< HEAD:WebCore/bindings/v8/V8Proxy.cpp - return String(); - return toWebCoreString(v8::Debug::Call(frameSourceName)); -#endif -======= return false; v8::Handle<v8::Value> value = v8::Debug::Call(frameSourceName); if (value.IsEmpty()) return false; result = toWebCoreString(value); return true; ->>>>>>> webkit.org at r51976:WebCore/bindings/v8/V8Proxy.cpp +#endif } void V8Proxy::registerExtensionWithV8(v8::Extension* extension) |
