| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 LineLayoutBoxModel_h | 5 #ifndef LineLayoutBoxModel_h |
| 6 #define LineLayoutBoxModel_h | 6 #define LineLayoutBoxModel_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/layout/api/LineLayoutItem.h" | 9 #include "core/layout/api/LineLayoutItem.h" |
| 10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class LayoutBoxModelObject; | 14 class LayoutBoxModelObject; |
| 15 | 15 |
| 16 class LineLayoutBoxModel : public LineLayoutItem { | 16 class LineLayoutBoxModel : public LineLayoutItem { |
| 17 public: | 17 public: |
| 18 explicit LineLayoutBoxModel(LayoutBoxModelObject* layoutBox) | 18 explicit LineLayoutBoxModel(LayoutBoxModelObject* layoutBox) |
| 19 : LineLayoutItem(layoutBox) | 19 : LineLayoutItem(layoutBox) |
| 20 { | 20 { |
| 21 } | 21 } |
| 22 | 22 |
| 23 explicit LineLayoutBoxModel(const LineLayoutItem& item) | 23 explicit LineLayoutBoxModel(const LineLayoutItem& item) |
| 24 : LineLayoutItem(item) | 24 : LineLayoutItem(item) |
| 25 { | 25 { |
| 26 ASSERT(!item || item.isBoxModelObject()); | 26 ASSERT(!item || item.isBoxModelObject()); |
| 27 } | 27 } |
| 28 | 28 |
| 29 LineLayoutBoxModel(std::nullptr_t) : LineLayoutItem(nullptr) { } |
| 30 |
| 29 LineLayoutBoxModel() { } | 31 LineLayoutBoxModel() { } |
| 30 | 32 |
| 31 PaintLayer* layer() const | 33 PaintLayer* layer() const |
| 32 { | 34 { |
| 33 return toBoxModel()->layer(); | 35 return toBoxModel()->layer(); |
| 34 } | 36 } |
| 35 | 37 |
| 36 LayoutUnit lineHeight(bool firstLine, LineDirectionMode lineDirectionMode, L
inePositionMode linePositionMode = PositionOnContainingLine) const | 38 LayoutUnit lineHeight(bool firstLine, LineDirectionMode lineDirectionMode, L
inePositionMode linePositionMode = PositionOnContainingLine) const |
| 37 { | 39 { |
| 38 return toBoxModel()->lineHeight(firstLine, lineDirectionMode, linePositi
onMode); | 40 return toBoxModel()->lineHeight(firstLine, lineDirectionMode, linePositi
onMode); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 }; | 191 }; |
| 190 | 192 |
| 191 inline LineLayoutBoxModel LineLayoutItem::enclosingBoxModelObject() const | 193 inline LineLayoutBoxModel LineLayoutItem::enclosingBoxModelObject() const |
| 192 { | 194 { |
| 193 return LineLayoutBoxModel(layoutObject()->enclosingBoxModelObject()); | 195 return LineLayoutBoxModel(layoutObject()->enclosingBoxModelObject()); |
| 194 } | 196 } |
| 195 | 197 |
| 196 } // namespace blink | 198 } // namespace blink |
| 197 | 199 |
| 198 #endif // LineLayoutBoxModel_h | 200 #endif // LineLayoutBoxModel_h |
| OLD | NEW |