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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutTextCombine.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 LineLayoutTextCombine_h 5 #ifndef LineLayoutTextCombine_h
6 #define LineLayoutTextCombine_h 6 #define LineLayoutTextCombine_h
7 7
8 #include "core/layout/LayoutTextCombine.h" 8 #include "core/layout/LayoutTextCombine.h"
9 #include "core/layout/api/LineLayoutText.h" 9 #include "core/layout/api/LineLayoutText.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LineLayoutTextCombine : public LineLayoutText { 13 class LineLayoutTextCombine : public LineLayoutText {
14 public: 14 public:
15 explicit LineLayoutTextCombine(LayoutTextCombine* layoutTextCombine) 15 explicit LineLayoutTextCombine(LayoutTextCombine* layoutTextCombine)
16 : LineLayoutText(layoutTextCombine) 16 : LineLayoutText(layoutTextCombine)
17 { 17 {
18 } 18 }
19 19
20 explicit LineLayoutTextCombine(const LineLayoutItem& item) 20 explicit LineLayoutTextCombine(const LineLayoutItem& item)
21 : LineLayoutText(item) 21 : LineLayoutText(item)
22 { 22 {
23 ASSERT(!item || item.isCombineText()); 23 ASSERT(!item || item.isCombineText());
24 } 24 }
25 25
26 LineLayoutTextCombine(std::nullptr_t) : LineLayoutText(nullptr) { }
27
26 LineLayoutTextCombine() { } 28 LineLayoutTextCombine() { }
27 29
28 bool isCombined() const 30 bool isCombined() const
29 { 31 {
30 return toTextCombine()->isCombined(); 32 return toTextCombine()->isCombined();
31 } 33 }
32 34
33 private: 35 private:
34 LayoutTextCombine* toTextCombine() 36 LayoutTextCombine* toTextCombine()
35 { 37 {
36 return toLayoutTextCombine(layoutObject()); 38 return toLayoutTextCombine(layoutObject());
37 } 39 }
38 40
39 const LayoutTextCombine* toTextCombine() const 41 const LayoutTextCombine* toTextCombine() const
40 { 42 {
41 return toLayoutTextCombine(layoutObject()); 43 return toLayoutTextCombine(layoutObject());
42 } 44 }
43 }; 45 };
44 46
45 } // namespace blink 47 } // namespace blink
46 48
47 #endif // LineLayoutTextCombine_h 49 #endif // LineLayoutTextCombine_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698