| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 LayoutBoxModel_h | 5 #ifndef LayoutBoxModel_h |
| 6 #define LayoutBoxModel_h | 6 #define LayoutBoxModel_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/layout/api/LayoutItem.h" | 9 #include "core/layout/api/LayoutItem.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 explicit LayoutBoxModel(std::nullptr_t) : LayoutItem(nullptr) {} | 24 explicit LayoutBoxModel(std::nullptr_t) : LayoutItem(nullptr) {} |
| 25 | 25 |
| 26 LayoutBoxModel() {} | 26 LayoutBoxModel() {} |
| 27 | 27 |
| 28 PaintLayer* layer() const { return toBoxModel()->layer(); } | 28 PaintLayer* layer() const { return toBoxModel()->layer(); } |
| 29 | 29 |
| 30 PaintLayerScrollableArea* getScrollableArea() const { | 30 PaintLayerScrollableArea* getScrollableArea() const { |
| 31 return toBoxModel()->getScrollableArea(); | 31 return toBoxModel()->getScrollableArea(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 int borderTop() const { return toBoxModel()->borderTop(); } | 34 LayoutUnit borderTop() const { return toBoxModel()->borderTop(); } |
| 35 | 35 |
| 36 int borderLeft() const { return toBoxModel()->borderLeft(); } | 36 LayoutUnit borderLeft() const { return toBoxModel()->borderLeft(); } |
| 37 | 37 |
| 38 LayoutUnit paddingTop() const { return toBoxModel()->paddingTop(); } | 38 LayoutUnit paddingTop() const { return toBoxModel()->paddingTop(); } |
| 39 | 39 |
| 40 LayoutUnit paddingLeft() const { return toBoxModel()->paddingLeft(); } | 40 LayoutUnit paddingLeft() const { return toBoxModel()->paddingLeft(); } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 LayoutBoxModelObject* toBoxModel() { | 43 LayoutBoxModelObject* toBoxModel() { |
| 44 return toLayoutBoxModelObject(layoutObject()); | 44 return toLayoutBoxModelObject(layoutObject()); |
| 45 } | 45 } |
| 46 const LayoutBoxModelObject* toBoxModel() const { | 46 const LayoutBoxModelObject* toBoxModel() const { |
| 47 return toLayoutBoxModelObject(layoutObject()); | 47 return toLayoutBoxModelObject(layoutObject()); |
| 48 } | 48 } |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace blink | 51 } // namespace blink |
| 52 | 52 |
| 53 #endif // LayoutBoxModel_h | 53 #endif // LayoutBoxModel_h |
| OLD | NEW |