Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / results / V8TestSVG.cpp
index a04f0ec..0604dd3 100644 (file)
@@ -36,9 +36,7 @@
 #include "HTMLNames.h"
 #include "RuntimeEnabledFeatures.h"
 #include "V8SVGAnimatedString.h"
-#include "V8SVGDocument.h"
 #include "V8SVGPoint.h"
-#include "bindings/v8/BindingSecurity.h"
 #include "bindings/v8/ExceptionState.h"
 #include "bindings/v8/V8DOMConfiguration.h"
 #include "bindings/v8/V8ObjectConstructor.h"
@@ -71,7 +69,7 @@ void webCoreInitializeScriptWrappableForInterface(WebCore::TestSVG* object)
 }
 
 namespace WebCore {
-const WrapperTypeInfo V8TestSVG::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSVG::domTemplate, V8TestSVG::derefObject, 0, 0, 0, V8TestSVG::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestSVG::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSVG::domTemplate, V8TestSVG::derefObject, 0, 0, 0, V8TestSVG::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
 
 namespace TestSVGV8Internal {
 
@@ -160,28 +158,6 @@ static void immutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
 }
 
-static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
-    ExceptionState exceptionState(ExceptionState::ExecutionContext, "getSVGDocument", "TestSVG", info.Holder(), info.GetIsolate());
-    TestSVG* imp = V8TestSVG::toNative(info.Holder());
-    if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(exceptionState), exceptionState)) {
-        v8SetReturnValueNull(info);
-        exceptionState.throwIfNeeded();
-        return;
-    }
-    RefPtr<SVGDocument> result = imp->getSVGDocument(exceptionState);
-    if (exceptionState.throwIfNeeded())
-        return;
-    v8SetReturnValue(info, result.release());
-}
-
-static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
-    TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
-    TestSVGV8Internal::getSVGDocumentMethod(info);
-    TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
 {
     TestSVG* imp = V8TestSVG::toNative(info.Holder());
@@ -251,7 +227,7 @@ static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
         return;
     }
     TestSVG* imp = V8TestSVG::toNative(info.Holder());
-    if (info.Length() > 0 && !info[0]->IsUndefined() && !V8SVGPoint::hasInstance(info[0], info.GetIsolate())) {
+    if (info.Length() > 0 && !V8SVGPoint::hasInstance(info[0], info.GetIsolate())) {
         exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
         exceptionState.throwIfNeeded();
         return;
@@ -280,7 +256,6 @@ static const V8DOMConfiguration::AttributeConfiguration V8TestSVGAttributes[] =
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestSVGMethods[] = {
-    {"getSVGDocument", TestSVGV8Internal::getSVGDocumentMethodCallback, 0, 0},
     {"mutablePointFunction", TestSVGV8Internal::mutablePointFunctionMethodCallback, 0, 0},
     {"immutablePointFunction", TestSVGV8Internal::immutablePointFunctionMethodCallback, 0, 0},
     {"immutablePointFunctionTypedef", TestSVGV8Internal::immutablePointFunctionTypedefMethodCallback, 0, 0},