Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(839)

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutRubyRun.h

Issue 1433253003: [Line Layout API] Convert AbstractInlineTextBox to new line layout API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add constructors so we can assign nullptr to LineLayoutItem descendants Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698