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

Side by Side Diff: Source/core/dom/DOMPoint.cpp

Issue 534133002: [WIP] bindings: Introduce PropertyBag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/dom/DOMPoint.h" 6 #include "core/dom/DOMPoint.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 DOMPoint* DOMPoint::create(const Dictionary& point) 10 DOMPoint* DOMPoint::create(const Dictionary& point)
11 { 11 {
12 double x = 0; 12 double x = 0;
13 double y = 0; 13 double y = 0;
14 double z = 0; 14 double z = 0;
15 double w = 0; 15 double w = 0;
16 16
17 if (!DictionaryHelper::get(point, "x", x)) 17 if (!point.get("x", x))
18 x = 0; 18 x = 0;
19 if (!DictionaryHelper::get(point, "y", y)) 19 if (!point.get("y", y))
20 y = 0; 20 y = 0;
21 if (!DictionaryHelper::get(point, "z", z)) 21 if (!point.get("z", z))
22 z = 0; 22 z = 0;
23 if (!DictionaryHelper::get(point, "w", w)) 23 if (!point.get("w", w))
24 w = 1; 24 w = 1;
25 25
26 return new DOMPoint(x, y, z, w); 26 return new DOMPoint(x, y, z, w);
27 } 27 }
28 28
29 DOMPoint* DOMPoint::create(double x, double y, double z, double w) 29 DOMPoint* DOMPoint::create(double x, double y, double z, double w)
30 { 30 {
31 return new DOMPoint(x, y, z, w); 31 return new DOMPoint(x, y, z, w);
32 } 32 }
33 33
34 DOMPoint::DOMPoint(double x, double y, double z, double w) 34 DOMPoint::DOMPoint(double x, double y, double z, double w)
35 : DOMPointReadOnly(x, y, z, w) 35 : DOMPointReadOnly(x, y, z, w)
36 { 36 {
37 } 37 }
38 38
39 } // namespace blink 39 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698