| 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 LayoutViewItem_h | 6 #ifndef LayoutViewItem_h |
| 7 #define LayoutViewItem_h | 7 #define LayoutViewItem_h |
| 8 | 8 |
| 9 #include "core/layout/LayoutView.h" | 9 #include "core/layout/LayoutView.h" |
| 10 #include "core/layout/api/LayoutBlockItem.h" | 10 #include "core/layout/api/LayoutBlockItem.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class PaintLayerCompositor; | 14 class PaintLayerCompositor; |
| 15 | 15 |
| 16 class LayoutViewItem : public LayoutBlockItem { | 16 class LayoutViewItem : public LayoutBlockItem { |
| 17 public: | 17 public: |
| 18 explicit LayoutViewItem(LayoutView* layoutView) | 18 explicit LayoutViewItem(LayoutView* layoutView) |
| 19 : LayoutBlockItem(layoutView) {} | 19 : LayoutBlockItem(layoutView) {} |
| 20 | 20 |
| 21 explicit LayoutViewItem(const LayoutBlockItem& item) : LayoutBlockItem(item) { | 21 explicit LayoutViewItem(const LayoutBlockItem& item) : LayoutBlockItem(item) { |
| 22 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isLayoutView()); | 22 SECURITY_DCHECK(!item || item.isLayoutView()); |
| 23 } | 23 } |
| 24 | 24 |
| 25 explicit LayoutViewItem(std::nullptr_t) : LayoutBlockItem(nullptr) {} | 25 explicit LayoutViewItem(std::nullptr_t) : LayoutBlockItem(nullptr) {} |
| 26 | 26 |
| 27 LayoutViewItem() {} | 27 LayoutViewItem() {} |
| 28 | 28 |
| 29 bool usesCompositing() const { return toView()->usesCompositing(); } | 29 bool usesCompositing() const { return toView()->usesCompositing(); } |
| 30 | 30 |
| 31 PaintLayerCompositor* compositor() { return toView()->compositor(); } | 31 PaintLayerCompositor* compositor() { return toView()->compositor(); } |
| 32 | 32 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 const LayoutView* toView() const { return toLayoutView(layoutObject()); } | 95 const LayoutView* toView() const { return toLayoutView(layoutObject()); } |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 inline LayoutViewItem LayoutItem::view() const { | 98 inline LayoutViewItem LayoutItem::view() const { |
| 99 return LayoutViewItem(m_layoutObject->view()); | 99 return LayoutViewItem(m_layoutObject->view()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // namespace blink | 102 } // namespace blink |
| 103 | 103 |
| 104 #endif // LayoutViewItem_h | 104 #endif // LayoutViewItem_h |
| OLD | NEW |