| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 FloatRect floatLinesBoundingBox() const; | 49 FloatRect floatLinesBoundingBox() const; |
| 50 | 50 |
| 51 PassRefPtr<StringImpl> originalText() const override; | 51 PassRefPtr<StringImpl> originalText() const override; |
| 52 | 52 |
| 53 const char* name() const override { return "LayoutSVGInlineText"; } | 53 const char* name() const override { return "LayoutSVGInlineText"; } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 void setTextInternal(PassRefPtr<StringImpl>) override; | 56 void setTextInternal(PassRefPtr<StringImpl>) override; |
| 57 void styleDidChange(StyleDifference, const ComputedStyle*) override; | 57 void styleDidChange(StyleDifference, const ComputedStyle*) override; |
| 58 | 58 |
| 59 void addMetricsFromRun(const TextRun&, bool& lastCharacterWasWhiteSpace); |
| 60 |
| 59 FloatRect objectBoundingBox() const override { return floatLinesBoundingBox(
); } | 61 FloatRect objectBoundingBox() const override { return floatLinesBoundingBox(
); } |
| 60 | 62 |
| 61 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectSVG || type == LayoutObjectSVGInlineText || LayoutText::isOfType(type); } | 63 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectSVG || type == LayoutObjectSVGInlineText || LayoutText::isOfType(type); } |
| 62 | 64 |
| 63 PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 65 PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
| 64 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt
hToEndOfLine = nullptr) override; | 66 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt
hToEndOfLine = nullptr) override; |
| 65 IntRect linesBoundingBox() const override; | 67 IntRect linesBoundingBox() const override; |
| 66 InlineTextBox* createTextBox(int start, unsigned short length) override; | 68 InlineTextBox* createTextBox(int start, unsigned short length) override; |
| 67 | 69 |
| 68 LayoutRect absoluteClippedOverflowRect() const final; | 70 LayoutRect absoluteClippedOverflowRect() const final; |
| 69 FloatRect paintInvalidationRectInLocalSVGCoordinates() const final; | 71 FloatRect paintInvalidationRectInLocalSVGCoordinates() const final; |
| 70 | 72 |
| 71 float m_scalingFactor; | 73 float m_scalingFactor; |
| 72 Font m_scaledFont; | 74 Font m_scaledFont; |
| 73 SVGTextLayoutAttributes m_layoutAttributes; | 75 SVGTextLayoutAttributes m_layoutAttributes; |
| 74 Vector<SVGTextMetrics> m_metrics; | 76 Vector<SVGTextMetrics> m_metrics; |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); | 79 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); |
| 78 | 80 |
| 79 } // namespace blink | 81 } // namespace blink |
| 80 | 82 |
| 81 #endif // LayoutSVGInlineText_h | 83 #endif // LayoutSVGInlineText_h |
| OLD | NEW |