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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp

Issue 1701283002: Implement DOMPoint using v8 extras. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
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..ae21063fb14e3c211b8fda5b1ee80ca8318bf1bf
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp
@@ -0,0 +1,26 @@
+// 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/V8ObjectBuilder.h"
+#include "bindings/core/v8/V8ScriptRunner.h"
+
+namespace blink {
+
+ScriptValue GeometryInterfaces::createDOMPoint(ScriptState* scriptState, double x, double y, double z, double w)
+{
+ ScriptState::Scope scope(scriptState);
+
+ V8ObjectBuilder initializer(scriptState);
+ initializer.addNumber("x", x);
+ initializer.addNumber("y", y);
+ initializer.addNumber("z", z);
+ initializer.addNumber("w", w);
+
+ v8::Local<v8::Value> args[] = { initializer.v8Value() };
+ return ScriptValue(scriptState, V8ScriptRunner::callExtra(scriptState, "createDOMPoint", args));
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.h ('k') | third_party/WebKit/Source/bindings/core/v8/v8.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698