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

Side by Side Diff: Source/bindings/tests/results/V8TestSVG.cpp

Issue 151043002: Remove SVGDocument from bindings generator and test cases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/idls/TestSVG.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32 32
33 #include "config.h" 33 #include "config.h"
34 #include "V8TestSVG.h" 34 #include "V8TestSVG.h"
35 35
36 #include "HTMLNames.h" 36 #include "HTMLNames.h"
37 #include "RuntimeEnabledFeatures.h" 37 #include "RuntimeEnabledFeatures.h"
38 #include "V8SVGAnimatedString.h" 38 #include "V8SVGAnimatedString.h"
39 #include "V8SVGDocument.h"
40 #include "V8SVGPoint.h" 39 #include "V8SVGPoint.h"
41 #include "bindings/v8/BindingSecurity.h"
42 #include "bindings/v8/ExceptionState.h" 40 #include "bindings/v8/ExceptionState.h"
43 #include "bindings/v8/V8DOMConfiguration.h" 41 #include "bindings/v8/V8DOMConfiguration.h"
44 #include "bindings/v8/V8ObjectConstructor.h" 42 #include "bindings/v8/V8ObjectConstructor.h"
45 #include "core/dom/ContextFeatures.h" 43 #include "core/dom/ContextFeatures.h"
46 #include "core/dom/Document.h" 44 #include "core/dom/Document.h"
47 #include "core/dom/custom/CustomElementCallbackDispatcher.h" 45 #include "core/dom/custom/CustomElementCallbackDispatcher.h"
48 #include "platform/TraceEvent.h" 46 #include "platform/TraceEvent.h"
49 #include "wtf/GetPtr.h" 47 #include "wtf/GetPtr.h"
50 #include "wtf/RefPtr.h" 48 #include "wtf/RefPtr.h"
51 49
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 imp->setImmutablePoint(WTF::getPtr(cppValue)); 151 imp->setImmutablePoint(WTF::getPtr(cppValue));
154 } 152 }
155 153
156 static void immutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 154 static void immutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
157 { 155 {
158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
159 TestSVGV8Internal::immutablePointAttributeSetter(jsValue, info); 157 TestSVGV8Internal::immutablePointAttributeSetter(jsValue, info);
160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
161 } 159 }
162 160
163 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
164 {
165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "getSVGDocum ent", "TestSVG", info.Holder(), info.GetIsolate());
166 TestSVG* imp = V8TestSVG::toNative(info.Holder());
167 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(exceptionS tate), exceptionState)) {
168 v8SetReturnValueNull(info);
169 exceptionState.throwIfNeeded();
170 return;
171 }
172 RefPtr<SVGDocument> result = imp->getSVGDocument(exceptionState);
173 if (exceptionState.throwIfNeeded())
174 return;
175 v8SetReturnValue(info, result.release());
176 }
177
178 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
179 {
180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
181 TestSVGV8Internal::getSVGDocumentMethod(info);
182 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
183 }
184
185 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 161 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
186 { 162 {
187 TestSVG* imp = V8TestSVG::toNative(info.Holder()); 163 TestSVG* imp = V8TestSVG::toNative(info.Holder());
188 v8SetReturnValue(info, imp->mutablePointFunction()); 164 v8SetReturnValue(info, imp->mutablePointFunction());
189 } 165 }
190 166
191 static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 167 static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
192 { 168 {
193 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 169 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
194 TestSVGV8Internal::mutablePointFunctionMethod(info); 170 TestSVGV8Internal::mutablePointFunctionMethod(info);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 249
274 } // namespace TestSVGV8Internal 250 } // namespace TestSVGV8Internal
275 251
276 static const V8DOMConfiguration::AttributeConfiguration V8TestSVGAttributes[] = { 252 static const V8DOMConfiguration::AttributeConfiguration V8TestSVGAttributes[] = {
277 {"animatedReflectedAttribute", TestSVGV8Internal::animatedReflectedAttribute AttributeGetterCallback, TestSVGV8Internal::animatedReflectedAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 253 {"animatedReflectedAttribute", TestSVGV8Internal::animatedReflectedAttribute AttributeGetterCallback, TestSVGV8Internal::animatedReflectedAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */},
278 {"mutablePoint", TestSVGV8Internal::mutablePointAttributeGetterCallback, Tes tSVGV8Internal::mutablePointAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 254 {"mutablePoint", TestSVGV8Internal::mutablePointAttributeGetterCallback, Tes tSVGV8Internal::mutablePointAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
279 {"immutablePoint", TestSVGV8Internal::immutablePointAttributeGetterCallback, TestSVGV8Internal::immutablePointAttributeSetterCallback, 0, 0, 0, static_cast< v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 255 {"immutablePoint", TestSVGV8Internal::immutablePointAttributeGetterCallback, TestSVGV8Internal::immutablePointAttributeSetterCallback, 0, 0, 0, static_cast< v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
280 }; 256 };
281 257
282 static const V8DOMConfiguration::MethodConfiguration V8TestSVGMethods[] = { 258 static const V8DOMConfiguration::MethodConfiguration V8TestSVGMethods[] = {
283 {"getSVGDocument", TestSVGV8Internal::getSVGDocumentMethodCallback, 0, 0},
284 {"mutablePointFunction", TestSVGV8Internal::mutablePointFunctionMethodCallba ck, 0, 0}, 259 {"mutablePointFunction", TestSVGV8Internal::mutablePointFunctionMethodCallba ck, 0, 0},
285 {"immutablePointFunction", TestSVGV8Internal::immutablePointFunctionMethodCa llback, 0, 0}, 260 {"immutablePointFunction", TestSVGV8Internal::immutablePointFunctionMethodCa llback, 0, 0},
286 {"immutablePointFunctionTypedef", TestSVGV8Internal::immutablePointFunctionT ypedefMethodCallback, 0, 0}, 261 {"immutablePointFunctionTypedef", TestSVGV8Internal::immutablePointFunctionT ypedefMethodCallback, 0, 0},
287 {"svgPointMethod", TestSVGV8Internal::svgPointMethodMethodCallback, 0, 2}, 262 {"svgPointMethod", TestSVGV8Internal::svgPointMethodMethodCallback, 0, 2},
288 {"strictSVGPointMethod", TestSVGV8Internal::strictSVGPointMethodMethodCallba ck, 0, 2}, 263 {"strictSVGPointMethod", TestSVGV8Internal::strictSVGPointMethodMethodCallba ck, 0, 2},
289 }; 264 };
290 265
291 static void configureV8TestSVGTemplate(v8::Handle<v8::FunctionTemplate> function Template, v8::Isolate* isolate, WrapperWorldType currentWorldType) 266 static void configureV8TestSVGTemplate(v8::Handle<v8::FunctionTemplate> function Template, v8::Isolate* isolate, WrapperWorldType currentWorldType)
292 { 267 {
293 functionTemplate->ReadOnlyPrototype(); 268 functionTemplate->ReadOnlyPrototype();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 fromInternalPointer(object)->deref(); 326 fromInternalPointer(object)->deref();
352 } 327 }
353 328
354 template<> 329 template<>
355 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 330 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
356 { 331 {
357 return toV8(impl, creationContext, isolate); 332 return toV8(impl, creationContext, isolate);
358 } 333 }
359 334
360 } // namespace WebCore 335 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestSVG.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698