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

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

Issue 404803002: Implement DOMPoint of geometry interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed comments Created 6 years, 5 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698