| 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 LineLayoutRubyRun_h | 5 #ifndef LineLayoutRubyRun_h |
| 6 #define LineLayoutRubyRun_h | 6 #define LineLayoutRubyRun_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutRubyRun.h" | 8 #include "core/layout/LayoutRubyRun.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 LineLayoutRubyRun : public LineLayoutBlockFlow { | 13 class LineLayoutRubyRun : public LineLayoutBlockFlow { |
| 14 public: | 14 public: |
| 15 explicit LineLayoutRubyRun(LayoutRubyRun* layoutRubyRun) | 15 explicit LineLayoutRubyRun(LayoutRubyRun* layoutRubyRun) |
| 16 : LineLayoutBlockFlow(layoutRubyRun) | 16 : LineLayoutBlockFlow(layoutRubyRun) |
| 17 { | 17 { |
| 18 } | 18 } |
| 19 | 19 |
| 20 explicit LineLayoutRubyRun(const LineLayoutItem& item) | 20 explicit LineLayoutRubyRun(const LineLayoutItem& item) |
| 21 : LineLayoutBlockFlow(item) | 21 : LineLayoutBlockFlow(item) |
| 22 { | 22 { |
| 23 ASSERT(!item || item.isRubyRun()); | 23 ASSERT(!item || item.isRubyRun()); |
| 24 } | 24 } |
| 25 | 25 |
| 26 LineLayoutRubyRun(std::nullptr_t) : LineLayoutBlockFlow(nullptr) { } |
| 27 |
| 26 LineLayoutRubyRun() { } | 28 LineLayoutRubyRun() { } |
| 27 | 29 |
| 28 void getOverhang(bool firstLine, LineLayoutItem startLayoutItem, LineLayoutI
tem endLayoutItem, int& startOverhang, int& endOverhang) const | 30 void getOverhang(bool firstLine, LineLayoutItem startLayoutItem, LineLayoutI
tem endLayoutItem, int& startOverhang, int& endOverhang) const |
| 29 { | 31 { |
| 30 toRubyRun()->getOverhang(firstLine, startLayoutItem, endLayoutItem, star
tOverhang, endOverhang); | 32 toRubyRun()->getOverhang(firstLine, startLayoutItem, endLayoutItem, star
tOverhang, endOverhang); |
| 31 } | 33 } |
| 32 | 34 |
| 33 LayoutRubyText* rubyText() const | 35 LayoutRubyText* rubyText() const |
| 34 { | 36 { |
| 35 return toRubyRun()->rubyText(); | 37 return toRubyRun()->rubyText(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 48 | 50 |
| 49 const LayoutRubyRun* toRubyRun() const | 51 const LayoutRubyRun* toRubyRun() const |
| 50 { | 52 { |
| 51 return toLayoutRubyRun(layoutObject()); | 53 return toLayoutRubyRun(layoutObject()); |
| 52 } | 54 } |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 } // namespace blink | 57 } // namespace blink |
| 56 | 58 |
| 57 #endif // LineLayoutRubyRun_h | 59 #endif // LineLayoutRubyRun_h |
| OLD | NEW |