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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMPointReadOnly.cpp

Issue 2587743002: The DOMPointReadOnly interface requires serializer. (Closed)
Patch Set: The DOMPointReadOnly interface requires serializer. Created 3 years, 12 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 unified diff | Download patch
OLDNEW
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 #include "bindings/core/v8/ScriptValue.h"
8 #include "bindings/core/v8/V8ObjectBuilder.h"
9
7 namespace blink { 10 namespace blink {
8 11
9 DOMPointReadOnly* DOMPointReadOnly::create(double x, 12 DOMPointReadOnly* DOMPointReadOnly::create(double x,
10 double y, 13 double y,
11 double z, 14 double z,
12 double w) { 15 double w) {
13 return new DOMPointReadOnly(x, y, z, w); 16 return new DOMPointReadOnly(x, y, z, w);
14 } 17 }
15 18
19 ScriptValue DOMPointReadOnly::toJSONForBinding(
20 ScriptState* scriptState) const {
21 V8ObjectBuilder result(scriptState);
22 result.addNumber("x", x());
23 result.addNumber("y", y());
24 result.addNumber("z", z());
25 result.addNumber("w", w());
26 return result.scriptValue();
27 }
28
16 DOMPointReadOnly::DOMPointReadOnly(double x, double y, double z, double w) 29 DOMPointReadOnly::DOMPointReadOnly(double x, double y, double z, double w)
17 : m_x(x), m_y(y), m_z(z), m_w(w) {} 30 : m_x(x), m_y(y), m_z(z), m_w(w) {}
18 31
19 } // namespace blink 32 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMPointReadOnly.h ('k') | third_party/WebKit/Source/core/dom/DOMPointReadOnly.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698