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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutSVGInlineText.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 LineLayoutSVGInlineText_h 5 #ifndef LineLayoutSVGInlineText_h
6 #define LineLayoutSVGInlineText_h 6 #define LineLayoutSVGInlineText_h
7 7
8 #include "core/layout/api/LineLayoutText.h" 8 #include "core/layout/api/LineLayoutText.h"
9 #include "core/layout/svg/LayoutSVGInlineText.h" 9 #include "core/layout/svg/LayoutSVGInlineText.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LineLayoutSVGInlineText : public LineLayoutText { 13 class LineLayoutSVGInlineText : public LineLayoutText {
14 public: 14 public:
15 explicit LineLayoutSVGInlineText(LayoutSVGInlineText* layoutSVGInlineText) 15 explicit LineLayoutSVGInlineText(LayoutSVGInlineText* layoutSVGInlineText)
16 : LineLayoutText(layoutSVGInlineText) 16 : LineLayoutText(layoutSVGInlineText)
17 { 17 {
18 } 18 }
19 19
20 explicit LineLayoutSVGInlineText(const LineLayoutItem& item) 20 explicit LineLayoutSVGInlineText(const LineLayoutItem& item)
21 : LineLayoutText(item) 21 : LineLayoutText(item)
22 { 22 {
23 ASSERT(!item || item.isSVGInlineText()); 23 ASSERT(!item || item.isSVGInlineText());
24 } 24 }
25 25
26 LineLayoutSVGInlineText(std::nullptr_t) : LineLayoutText(nullptr) { }
27
26 LineLayoutSVGInlineText() { } 28 LineLayoutSVGInlineText() { }
27 29
28 SVGTextLayoutAttributes* layoutAttributes() const 30 SVGTextLayoutAttributes* layoutAttributes() const
29 { 31 {
30 return const_cast<SVGTextLayoutAttributes*>(toSVGInlineText()->layoutAtt ributes()); 32 return const_cast<SVGTextLayoutAttributes*>(toSVGInlineText()->layoutAtt ributes());
31 } 33 }
32 34
33 bool characterStartsNewTextChunk(int position) const 35 bool characterStartsNewTextChunk(int position) const
34 { 36 {
35 return toSVGInlineText()->characterStartsNewTextChunk(position); 37 return toSVGInlineText()->characterStartsNewTextChunk(position);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 109 }
108 110
109 LineLayoutSVGInlineText* m_textLineLayout; 111 LineLayoutSVGInlineText* m_textLineLayout;
110 unsigned m_metricsListOffset; 112 unsigned m_metricsListOffset;
111 unsigned m_characterOffset; 113 unsigned m_characterOffset;
112 }; 114 };
113 115
114 } // namespace blink 116 } // namespace blink
115 117
116 #endif // LineLayoutSVGInlineText_h 118 #endif // LineLayoutSVGInlineText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698