| 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 LineLayoutRubyText_h | 5 #ifndef LineLayoutRubyText_h |
| 6 #define LineLayoutRubyText_h | 6 #define LineLayoutRubyText_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutRubyText.h" | 8 #include "core/layout/LayoutRubyText.h" |
| 9 #include "core/layout/api/LineLayoutBlockFlow.h" | 9 #include "core/layout/api/LineLayoutBlockFlow.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class LineLayoutRubyText : public LineLayoutBlockFlow { | 13 class LineLayoutRubyText : public LineLayoutBlockFlow { |
| 14 public: | 14 public: |
| 15 explicit LineLayoutRubyText(LayoutRubyText* layoutRubyText) | 15 explicit LineLayoutRubyText(LayoutRubyText* layoutRubyText) |
| 16 : LineLayoutBlockFlow(layoutRubyText) {} | 16 : LineLayoutBlockFlow(layoutRubyText) {} |
| 17 | 17 |
| 18 explicit LineLayoutRubyText(const LineLayoutItem& item) | 18 explicit LineLayoutRubyText(const LineLayoutItem& item) |
| 19 : LineLayoutBlockFlow(item) { | 19 : LineLayoutBlockFlow(item) { |
| 20 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isRubyText()); | 20 SECURITY_DCHECK(!item || item.isRubyText()); |
| 21 } | 21 } |
| 22 | 22 |
| 23 explicit LineLayoutRubyText(std::nullptr_t) : LineLayoutBlockFlow(nullptr) {} | 23 explicit LineLayoutRubyText(std::nullptr_t) : LineLayoutBlockFlow(nullptr) {} |
| 24 | 24 |
| 25 LineLayoutRubyText() {} | 25 LineLayoutRubyText() {} |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 LayoutRubyText* toRubyText() { return toLayoutRubyText(layoutObject()); } | 28 LayoutRubyText* toRubyText() { return toLayoutRubyText(layoutObject()); } |
| 29 | 29 |
| 30 const LayoutRubyText* toRubyText() const { | 30 const LayoutRubyText* toRubyText() const { |
| 31 return toLayoutRubyText(layoutObject()); | 31 return toLayoutRubyText(layoutObject()); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace blink | 35 } // namespace blink |
| 36 | 36 |
| 37 #endif // LineLayoutRubyText_h | 37 #endif // LineLayoutRubyText_h |
| OLD | NEW |