| 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 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() { } | 26 LineLayoutSVGInlineText() { } |
| 27 | 27 |
| 28 SVGTextLayoutAttributes* layoutAttributes() const |
| 29 { |
| 30 return const_cast<SVGTextLayoutAttributes*>(toSVGInlineText()->layoutAtt
ributes()); |
| 31 } |
| 32 |
| 28 bool characterStartsNewTextChunk(int position) const | 33 bool characterStartsNewTextChunk(int position) const |
| 29 { | 34 { |
| 30 return toSVGInlineText()->characterStartsNewTextChunk(position); | 35 return toSVGInlineText()->characterStartsNewTextChunk(position); |
| 31 } | 36 } |
| 32 | 37 |
| 33 float scalingFactor() const | 38 float scalingFactor() const |
| 34 { | 39 { |
| 35 return toSVGInlineText()->scalingFactor(); | 40 return toSVGInlineText()->scalingFactor(); |
| 36 } | 41 } |
| 37 | 42 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 49 | 54 |
| 50 const LayoutSVGInlineText* toSVGInlineText() const | 55 const LayoutSVGInlineText* toSVGInlineText() const |
| 51 { | 56 { |
| 52 return toLayoutSVGInlineText(layoutObject()); | 57 return toLayoutSVGInlineText(layoutObject()); |
| 53 } | 58 } |
| 54 }; | 59 }; |
| 55 | 60 |
| 56 } // namespace blink | 61 } // namespace blink |
| 57 | 62 |
| 58 #endif // LineLayoutSVGInlineText_h | 63 #endif // LineLayoutSVGInlineText_h |
| OLD | NEW |