| 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 LineLayoutRubyBase_h | 5 #ifndef LineLayoutRubyBase_h |
| 6 #define LineLayoutRubyBase_h | 6 #define LineLayoutRubyBase_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutRubyBase.h" | 8 #include "core/layout/LayoutRubyBase.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 LineLayoutRubyBase : public LineLayoutBlockFlow { | 13 class LineLayoutRubyBase : public LineLayoutBlockFlow { |
| 14 public: | 14 public: |
| 15 explicit LineLayoutRubyBase(LayoutRubyBase* layoutRubyBase) | 15 explicit LineLayoutRubyBase(LayoutRubyBase* layoutRubyBase) |
| 16 : LineLayoutBlockFlow(layoutRubyBase) {} | 16 : LineLayoutBlockFlow(layoutRubyBase) {} |
| 17 | 17 |
| 18 explicit LineLayoutRubyBase(const LineLayoutItem& item) | 18 explicit LineLayoutRubyBase(const LineLayoutItem& item) |
| 19 : LineLayoutBlockFlow(item) { | 19 : LineLayoutBlockFlow(item) { |
| 20 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isRubyBase()); | 20 SECURITY_DCHECK(!item || item.isRubyBase()); |
| 21 } | 21 } |
| 22 | 22 |
| 23 explicit LineLayoutRubyBase(std::nullptr_t) : LineLayoutBlockFlow(nullptr) {} | 23 explicit LineLayoutRubyBase(std::nullptr_t) : LineLayoutBlockFlow(nullptr) {} |
| 24 | 24 |
| 25 LineLayoutRubyBase() {} | 25 LineLayoutRubyBase() {} |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 LayoutRubyBase* toRubyBase() { return toLayoutRubyBase(layoutObject()); } | 28 LayoutRubyBase* toRubyBase() { return toLayoutRubyBase(layoutObject()); } |
| 29 | 29 |
| 30 const LayoutRubyBase* toRubyBase() const { | 30 const LayoutRubyBase* toRubyBase() const { |
| 31 return toLayoutRubyBase(layoutObject()); | 31 return toLayoutRubyBase(layoutObject()); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace blink | 35 } // namespace blink |
| 36 | 36 |
| 37 #endif // LineLayoutRubyBase_h | 37 #endif // LineLayoutRubyBase_h |
| OLD | NEW |