| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2016 The Chromium Authors. All rights reserved. | 2 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #ifndef LayoutBlockItem_h | 6 #ifndef LayoutBlockItem_h |
| 7 #define LayoutBlockItem_h | 7 #define LayoutBlockItem_h |
| 8 | 8 |
| 9 #include "core/layout/LayoutBlock.h" | 9 #include "core/layout/LayoutBlock.h" |
| 10 #include "core/layout/api/LayoutBoxItem.h" | 10 #include "core/layout/api/LayoutBoxItem.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 explicit LayoutBlockItem(const LayoutBoxItem& item) | 21 explicit LayoutBlockItem(const LayoutBoxItem& item) |
| 22 : LayoutBoxItem(item) | 22 : LayoutBoxItem(item) |
| 23 { | 23 { |
| 24 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isLayoutBlock()); | 24 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isLayoutBlock()); |
| 25 } | 25 } |
| 26 | 26 |
| 27 explicit LayoutBlockItem(std::nullptr_t) : LayoutBoxItem(nullptr) { } | 27 explicit LayoutBlockItem(std::nullptr_t) : LayoutBoxItem(nullptr) { } |
| 28 | 28 |
| 29 LayoutBlockItem() { } | 29 LayoutBlockItem() { } |
| 30 | 30 |
| 31 void invalidatePaintRectangle(const LayoutRect& layoutRect) const | 31 void invalidatePaintRectangle(const LayoutRect& layoutRect) |
| 32 { | 32 { |
| 33 toBlock()->invalidatePaintRectangle(layoutRect); | 33 toBlock()->invalidatePaintRectangle(layoutRect); |
| 34 } | 34 } |
| 35 | 35 |
| 36 bool recalcOverflowAfterStyleChange() | 36 bool recalcOverflowAfterStyleChange() |
| 37 { | 37 { |
| 38 return toBlock()->recalcOverflowAfterStyleChange(); | 38 return toBlock()->recalcOverflowAfterStyleChange(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 LayoutBlock* toBlock() { return toLayoutBlock(layoutObject()); } | 42 LayoutBlock* toBlock() { return toLayoutBlock(layoutObject()); } |
| 43 const LayoutBlock* toBlock() const { return toLayoutBlock(layoutObject()); } | 43 const LayoutBlock* toBlock() const { return toLayoutBlock(layoutObject()); } |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace blink | 46 } // namespace blink |
| 47 | 47 |
| 48 #endif // LayoutBlockItem_h | 48 #endif // LayoutBlockItem_h |
| OLD | NEW |