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

Side by Side Diff: third_party/WebKit/Source/core/geometry/DOMRect.h

Issue 2869803003: Change from ClientRect to DOMRect.
Patch Set: Change from ClientRect to DOMRect. Created 3 years, 6 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 #ifndef DOMRect_h 5 #ifndef DOMRect_h
6 #define DOMRect_h 6 #define DOMRect_h
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/geometry/DOMRectReadOnly.h" 10 #include "core/geometry/DOMRectReadOnly.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class DOMRect; 14 class DOMRect;
15 class DOMRectInit; 15 class DOMRectInit;
16 class FloatRect;
17 class IntRect;
16 18
17 class CORE_EXPORT DOMRect final : public DOMRectReadOnly { 19 class CORE_EXPORT DOMRect final : public DOMRectReadOnly {
18 DEFINE_WRAPPERTYPEINFO(); 20 DEFINE_WRAPPERTYPEINFO();
19 21
20 public: 22 public:
21 static DOMRect* Create(double x = 0, 23 static DOMRect* Create(double x = 0,
22 double y = 0, 24 double y = 0,
23 double width = 0, 25 double width = 0,
24 double height = 0); 26 double height = 0);
27 static DOMRect* Create(const IntRect& rect) { return new DOMRect(rect); }
28 static DOMRect* Create(const FloatRect& rect) { return new DOMRect(rect); }
25 static DOMRect* fromRect(const DOMRectInit&); 29 static DOMRect* fromRect(const DOMRectInit&);
26 30
27 void setX(double x) { x_ = x; } 31 void setX(double x) { x_ = x; }
28 void setY(double y) { y_ = y; } 32 void setY(double y) { y_ = y; }
29 void setWidth(double width) { width_ = width; } 33 void setWidth(double width) { width_ = width; }
30 void setHeight(double height) { height_ = height; } 34 void setHeight(double height) { height_ = height; }
31 35
32 protected: 36 protected:
33 DOMRect(double x, double y, double z, double w); 37 DOMRect(double x, double y, double z, double w);
38 explicit DOMRect(const IntRect&);
39 explicit DOMRect(const FloatRect&);
34 }; 40 };
35 41
36 } // namespace blink 42 } // namespace blink
37 43
38 #endif 44 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ResizeObserverEntry.idl ('k') | third_party/WebKit/Source/core/geometry/DOMRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698