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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutInline.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 LineLayoutInline_h 5 #ifndef LineLayoutInline_h
6 #define LineLayoutInline_h 6 #define LineLayoutInline_h
7 7
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/api/LineLayoutBoxModel.h" 9 #include "core/layout/api/LineLayoutBoxModel.h"
10 #include "platform/LayoutUnit.h" 10 #include "platform/LayoutUnit.h"
(...skipping 10 matching lines...) Expand all
21 : LineLayoutBoxModel(layoutInline) 21 : LineLayoutBoxModel(layoutInline)
22 { 22 {
23 } 23 }
24 24
25 explicit LineLayoutInline(const LineLayoutItem& item) 25 explicit LineLayoutInline(const LineLayoutItem& item)
26 : LineLayoutBoxModel(item) 26 : LineLayoutBoxModel(item)
27 { 27 {
28 ASSERT(!item || item.isLayoutInline()); 28 ASSERT(!item || item.isLayoutInline());
29 } 29 }
30 30
31 LineLayoutInline(std::nullptr_t) : LineLayoutBoxModel(nullptr) { }
32
31 LineLayoutInline() { } 33 LineLayoutInline() { }
32 34
33 LineLayoutItem firstChild() const 35 LineLayoutItem firstChild() const
34 { 36 {
35 return LineLayoutItem(toInline()->firstChild()); 37 return LineLayoutItem(toInline()->firstChild());
36 } 38 }
37 39
38 LineLayoutItem lastChild() const 40 LineLayoutItem lastChild() const
39 { 41 {
40 return LineLayoutItem(toInline()->lastChild()); 42 return LineLayoutItem(toInline()->lastChild());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 const LayoutInline* toInline() const 96 const LayoutInline* toInline() const
95 { 97 {
96 return toLayoutInline(layoutObject()); 98 return toLayoutInline(layoutObject());
97 } 99 }
98 100
99 }; 101 };
100 102
101 } // namespace blink 103 } // namespace blink
102 104
103 #endif // LineLayoutInline_h 105 #endif // LineLayoutInline_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698