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

Unified Diff: third_party/WebKit/Source/core/dom/DOMPointReadOnly.cpp

Issue 2586083002: Adding fromPoint to DOMPoint and DOMPointReadOnly interfaces following spec. (Closed)
Patch Set: Adding fromPoint to DOMPoint and DOMPointReadOnly interfaces following spec. Created 4 years 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/core/dom/DOMPointReadOnly.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMPointReadOnly.cpp b/third_party/WebKit/Source/core/dom/DOMPointReadOnly.cpp
index e62791e37598756a2fffdb02bcf8ad953ebd1ee7..3f993dd0951a1f1be47f8e85a21f2f985c211e29 100644
--- a/third_party/WebKit/Source/core/dom/DOMPointReadOnly.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMPointReadOnly.cpp
@@ -4,6 +4,8 @@
#include "core/dom/DOMPointReadOnly.h"
+#include "core/dom/DOMPointInit.h"
+
namespace blink {
DOMPointReadOnly* DOMPointReadOnly::create(double x,
@@ -13,6 +15,10 @@ DOMPointReadOnly* DOMPointReadOnly::create(double x,
return new DOMPointReadOnly(x, y, z, w);
}
+DOMPointReadOnly* DOMPointReadOnly::fromPoint(DOMPointInit& other) {
+ return new DOMPointReadOnly(other.x(), other.y(), other.z(), other.w());
+}
+
DOMPointReadOnly::DOMPointReadOnly(double x, double y, double z, double w)
: m_x(x), m_y(y), m_z(z), m_w(w) {}

Powered by Google App Engine
This is Rietveld 408576698