| Index: third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp b/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..da2d445d9f21f15fe2b001094f45c536b6d15dc1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "bindings/core/v8/GeometryInterfaces.h"
|
| +
|
| +#include "bindings/core/v8/V8ScriptRunner.h"
|
| +
|
| +namespace blink {
|
| +
|
| +ScriptValue GeometryInterfaces::createDOMPoint(double x, double y, double z, double w)
|
| +{
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + v8::HandleScope scope(isolate);
|
| +
|
| + v8::Local<v8::Value> args[] = {
|
| + v8::Number::New(isolate, x),
|
| + v8::Number::New(isolate, y),
|
| + v8::Number::New(isolate, z),
|
| + v8::Number::New(isolate, w)
|
| + };
|
| + ScriptState* scriptState = ScriptState::current(isolate);
|
| + return ScriptValue(scriptState, V8ScriptRunner::callExtraOrCrash(scriptState, "createDOMPoint", args));
|
| +}
|
| +
|
| +void GeometryInterfaces::updateDOMPoint(ScriptValue& scriptValue, double x, double y, double z, double w)
|
| +{
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + v8::HandleScope scope(isolate);
|
| +
|
| + v8::Local<v8::Value> args[] = {
|
| + scriptValue.v8Value(),
|
| + v8::Number::New(isolate, x),
|
| + v8::Number::New(isolate, y),
|
| + v8::Number::New(isolate, z),
|
| + v8::Number::New(isolate, w)
|
| + };
|
| + ScriptState* scriptState = ScriptState::current(isolate);
|
| + V8ScriptRunner::callExtraOrCrash(scriptState, "updateDOMPoint", args);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|