| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/DOMPointReadOnly.h" | 5 #include "core/dom/DOMPointReadOnly.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 DOMPointReadOnly* DOMPointReadOnly::create(double x, | 9 DOMPointReadOnly* DOMPointReadOnly::create(double x, |
| 10 double y, | 10 double y, |
| 11 double z, | 11 double z, |
| 12 double w) { | 12 double w) { |
| 13 return new DOMPointReadOnly(x, y, z, w); | 13 return new DOMPointReadOnly(x, y, z, w); |
| 14 } | 14 } |
| 15 | 15 |
| 16 ScriptValue DOMPointReadOnly::toJSONForBinding( |
| 17 ScriptState* scriptState) const { |
| 18 V8ObjectBuilder result(scriptState); |
| 19 result.addNumber("x", x()); |
| 20 result.addNumber("y", y()); |
| 21 result.addNumber("z", z()); |
| 22 result.addNumber("w", w()); |
| 23 return result.scriptValue(); |
| 24 } |
| 25 |
| 16 DOMPointReadOnly::DOMPointReadOnly(double x, double y, double z, double w) | 26 DOMPointReadOnly::DOMPointReadOnly(double x, double y, double z, double w) |
| 17 : m_x(x), m_y(y), m_z(z), m_w(w) {} | 27 : m_x(x), m_y(y), m_z(z), m_w(w) {} |
| 18 | 28 |
| 19 } // namespace blink | 29 } // namespace blink |
| OLD | NEW |