Index: Source/core/dom/DOMPointReadOnly.js |
diff --git a/Source/core/dom/DOMPointReadOnly.js b/Source/core/dom/DOMPointReadOnly.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..10cdedb4870f2f7cc98a1ecbe82f5e3173b8982c |
--- /dev/null |
+++ b/Source/core/dom/DOMPointReadOnly.js |
@@ -0,0 +1,35 @@ |
+// Copyright 2014 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. |
+ |
+'use strict'; |
+ |
+installClass('DOMPointReadOnly', function(global) { |
+ |
+ var DOMPointReadOnlyPrototype = {}; |
+ |
+ DOMPointReadOnlyPrototype.initialize = function() { |
+ this.m_x = 0; |
+ this.m_y = 0; |
+ this.m_z = 0; |
+ this.m_w = 1; |
+ }; |
+ |
+ Object.defineProperty(DOMPointReadOnlyPrototype, "x", { |
+ get: function() { return this.m_x; }, |
+ }); |
+ |
+ Object.defineProperty(DOMPointReadOnlyPrototype, "y", { |
+ get: function() { return this.m_y; }, |
+ }); |
+ |
+ Object.defineProperty(DOMPointReadOnlyPrototype, "z", { |
+ get: function() { return this.m_z; }, |
+ }); |
+ |
+ Object.defineProperty(DOMPointReadOnlyPrototype, "w", { |
+ get: function() { return this.m_w; }, |
+ }); |
+ |
+ return DOMPointReadOnlyPrototype; |
+}); |