OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "config.h" | |
6 #include "core/dom/DOMPoint.h" | |
7 | |
8 namespace WebCore { | |
9 | |
10 DOMPoint* DOMPoint::create(const Dictionary& point) | |
11 { | |
12 double x, y, z, w; | |
haraken
2014/07/21 14:03:55
I'd guess this will cause uninitialized error in s
zino
2014/07/21 15:12:42
Done.
| |
13 | |
14 if (!DictionaryHelper::get(point, "x", x)) | |
15 x = 0; | |
16 if (!DictionaryHelper::get(point, "y", y)) | |
17 y = 0; | |
18 if (!DictionaryHelper::get(point, "z", z)) | |
19 z = 0; | |
20 if (!DictionaryHelper::get(point, "w", w)) | |
21 w = 1; | |
22 | |
23 return new DOMPoint(x, y, z, w); | |
24 } | |
25 | |
26 DOMPoint* DOMPoint::create(double x, double y, double z, double w) | |
27 { | |
28 return new DOMPoint(x, y, z, w); | |
29 } | |
30 | |
31 DOMPoint::DOMPoint(double x, double y, double z, double w) | |
32 : DOMPointReadOnly(x, y, z, w) | |
33 { | |
34 } | |
35 | |
36 } // namespace WebCore | |
OLD | NEW |