OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "bindings/core/v8/GeometryInterfaces.h" |
| 6 |
| 7 #include "bindings/core/v8/V8ObjectBuilder.h" |
| 8 #include "bindings/core/v8/V8ScriptRunner.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 ScriptValue GeometryInterfaces::createDOMPoint(ScriptState* scriptState, double
x, double y, double z, double w) |
| 13 { |
| 14 ScriptState::Scope scope(scriptState); |
| 15 |
| 16 V8ObjectBuilder initializer(scriptState); |
| 17 initializer.addNumber("x", x); |
| 18 initializer.addNumber("y", y); |
| 19 initializer.addNumber("z", z); |
| 20 initializer.addNumber("w", w); |
| 21 |
| 22 v8::Local<v8::Value> args[] = { initializer.v8Value() }; |
| 23 return ScriptValue(scriptState, V8ScriptRunner::callExtra(scriptState, "crea
teDOMPoint", args)); |
| 24 } |
| 25 |
| 26 } // namespace blink |
OLD | NEW |