| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef RectangleShape_h | 30 #ifndef RectangleShape_h |
| 31 #define RectangleShape_h | 31 #define RectangleShape_h |
| 32 | 32 |
| 33 #include "core/layout/shapes/Shape.h" | 33 #include "core/layout/shapes/Shape.h" |
| 34 #include "platform/geometry/FloatPoint.h" | 34 #include "platform/geometry/FloatPoint.h" |
| 35 #include "platform/geometry/FloatRect.h" | 35 #include "platform/geometry/FloatRect.h" |
| 36 #include "platform/geometry/FloatSize.h" | 36 #include "platform/geometry/FloatSize.h" |
| 37 #include "wtf/Assertions.h" | 37 #include "platform/wtf/Assertions.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class RectangleShape final : public Shape { | 41 class RectangleShape final : public Shape { |
| 42 public: | 42 public: |
| 43 RectangleShape(const FloatRect& bounds, const FloatSize& radii) | 43 RectangleShape(const FloatRect& bounds, const FloatSize& radii) |
| 44 : Shape(), bounds_(bounds), radii_(radii) {} | 44 : Shape(), bounds_(bounds), radii_(radii) {} |
| 45 | 45 |
| 46 LayoutRect ShapeMarginLogicalBoundingBox() const override { | 46 LayoutRect ShapeMarginLogicalBoundingBox() const override { |
| 47 return static_cast<LayoutRect>(ShapeMarginBounds()); | 47 return static_cast<LayoutRect>(ShapeMarginBounds()); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 float Width() const { return bounds_.Width(); } | 61 float Width() const { return bounds_.Width(); } |
| 62 float Height() const { return bounds_.Height(); } | 62 float Height() const { return bounds_.Height(); } |
| 63 | 63 |
| 64 FloatRect bounds_; | 64 FloatRect bounds_; |
| 65 FloatSize radii_; | 65 FloatSize radii_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace blink | 68 } // namespace blink |
| 69 | 69 |
| 70 #endif // RectangleShape_h | 70 #endif // RectangleShape_h |
| OLD | NEW |