| OLD | NEW |
| 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/dom/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 | 16 |
| 17 class CORE_EXPORT DOMRect final : public DOMRectReadOnly { | 17 class CORE_EXPORT DOMRect final : public DOMRectReadOnly { |
| 18 DEFINE_WRAPPERTYPEINFO(); | 18 DEFINE_WRAPPERTYPEINFO(); |
| 19 | 19 |
| 20 public: | 20 public: |
| 21 static DOMRect* create(double x = 0, | 21 static DOMRect* create(double x = 0, |
| 22 double y = 0, | 22 double y = 0, |
| 23 double width = 0, | 23 double width = 0, |
| 24 double height = 0); | 24 double height = 0); |
| 25 static DOMRect* fromRect(const DOMRectInit&); | 25 static DOMRect* fromRect(const DOMRectInit&); |
| 26 | 26 |
| 27 void setX(double x) { m_x = x; } | 27 void setX(double x) { m_x = x; } |
| 28 void setY(double y) { m_y = y; } | 28 void setY(double y) { m_y = y; } |
| 29 void setWidth(double width) { m_width = width; } | 29 void setWidth(double width) { m_width = width; } |
| 30 void setHeight(double height) { m_height = height; } | 30 void setHeight(double height) { m_height = height; } |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 DOMRect(double x, double y, double z, double w); | 33 DOMRect(double x, double y, double z, double w); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace blink | 36 } // namespace blink |
| 37 | 37 |
| 38 #endif | 38 #endif |
| OLD | NEW |