Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: Source/bindings/tests/results/V8TestSVG.cpp

Issue 132233016: [SVG] SVGAnimatedPointList migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: set NeedsRebaseline Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestSVG.cpp
diff --git a/Source/bindings/tests/results/V8TestSVG.cpp b/Source/bindings/tests/results/V8TestSVG.cpp
index 6438e6881ece0e049f60293baf44694b392b696c..a04f0ec415d5488730bc145e7286704c49c72def 100644
--- a/Source/bindings/tests/results/V8TestSVG.cpp
+++ b/Source/bindings/tests/results/V8TestSVG.cpp
@@ -45,8 +45,6 @@
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/dom/custom/CustomElementCallbackDispatcher.h"
-#include "core/svg/properties/SVGPropertyTearOff.h"
-#include "core/svg/properties/SVGStaticPropertyTearOff.h"
#include "platform/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefPtr.h"
@@ -111,7 +109,7 @@ static void animatedReflectedAttributeAttributeSetterCallback(v8::Local<v8::Stri
static void mutablePointAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- v8SetReturnValueFast(info, WTF::getPtr(SVGStaticPropertyTearOff<TestSVG, SVGPoint>::create(imp, imp->mutablePoint(), &TestSVG::updateMutablePoint)), imp);
+ v8SetReturnValueFast(info, imp->mutablePoint(), imp);
}
static void mutablePointAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -123,15 +121,9 @@ static void mutablePointAttributeGetterCallback(v8::Local<v8::String>, const v8:
static void mutablePointAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- ExceptionState exceptionState(ExceptionState::SetterContext, "mutablePoint", "TestSVG", info.Holder(), info.GetIsolate());
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint::hasInstance(jsValue, info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
- if (!WTF::getPtr(cppValue)) {
- exceptionState.throwTypeError("The provided value is not of type 'SVGPoint'.");
- exceptionState.throwIfNeeded();
- return;
- }
- imp->setMutablePoint(WTF::getPtr(cppValue)->propertyReference());
+ V8TRYCATCH_VOID(SVGPointTearOff*, cppValue, V8SVGPoint::hasInstance(jsValue, info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
+ imp->setMutablePoint(WTF::getPtr(cppValue));
}
static void mutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
@@ -144,7 +136,7 @@ static void mutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Local
static void immutablePointAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- v8SetReturnValueFast(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->immutablePoint())), imp);
+ v8SetReturnValueFast(info, imp->immutablePoint(), imp);
}
static void immutablePointAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -156,15 +148,9 @@ static void immutablePointAttributeGetterCallback(v8::Local<v8::String>, const v
static void immutablePointAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- ExceptionState exceptionState(ExceptionState::SetterContext, "immutablePoint", "TestSVG", info.Holder(), info.GetIsolate());
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint::hasInstance(jsValue, info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
- if (!WTF::getPtr(cppValue)) {
- exceptionState.throwTypeError("The provided value is not of type 'SVGPoint'.");
- exceptionState.throwIfNeeded();
- return;
- }
- imp->setImmutablePoint(WTF::getPtr(cppValue)->propertyReference());
+ V8TRYCATCH_VOID(SVGPointTearOff*, cppValue, V8SVGPoint::hasInstance(jsValue, info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
+ imp->setImmutablePoint(WTF::getPtr(cppValue));
}
static void immutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
@@ -199,7 +185,7 @@ static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->mutablePointFunction())));
+ v8SetReturnValue(info, imp->mutablePointFunction());
}
static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -212,7 +198,7 @@ static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8
static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->immutablePointFunction())));
+ v8SetReturnValue(info, imp->immutablePointFunction());
}
static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -225,7 +211,7 @@ static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<
static void immutablePointFunctionTypedefMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->immutablePointFunctionTypedef())));
+ v8SetReturnValue(info, imp->immutablePointFunctionTypedef());
}
static void immutablePointFunctionTypedefMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -244,14 +230,9 @@ static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
return;
}
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::hasInstance(info[0], info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
+ V8TRYCATCH_VOID(SVGPointTearOff*, item, V8SVGPoint::hasInstance(info[0], info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState), exceptionState);
- if (!item) {
- exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
- exceptionState.throwIfNeeded();
- return;
- }
- v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->svgPointMethod(item->propertyReference(), index))));
+ v8SetReturnValue(info, imp->svgPointMethod(item, index));
}
static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -275,17 +256,12 @@ static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
exceptionState.throwIfNeeded();
return;
}
- V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::hasInstance(info[0], info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
+ V8TRYCATCH_VOID(SVGPointTearOff*, item, V8SVGPoint::hasInstance(info[0], info.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState), exceptionState);
- if (!item) {
- exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
- exceptionState.throwIfNeeded();
- return;
- }
- SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index, exceptionState);
+ RefPtr<SVGPointTearOff> result = imp->strictSVGPointMethod(item, index, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(result)));
+ v8SetReturnValue(info, result.release());
}
static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698