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 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 FloatRect LayoutSVGInlineText::floatLinesBoundingBox() const | 118 FloatRect LayoutSVGInlineText::floatLinesBoundingBox() const |
119 { | 119 { |
120 FloatRect boundingBox; | 120 FloatRect boundingBox; |
121 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) | 121 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) |
122 boundingBox.unite(FloatRect(box->calculateBoundaries())); | 122 boundingBox.unite(FloatRect(box->calculateBoundaries())); |
123 return boundingBox; | 123 return boundingBox; |
124 } | 124 } |
125 | 125 |
126 IntRect LayoutSVGInlineText::linesBoundingBox() const | 126 LayoutRect LayoutSVGInlineText::linesBoundingBox() const |
127 { | 127 { |
128 return enclosingIntRect(floatLinesBoundingBox()); | 128 return enclosingLayoutRect(floatLinesBoundingBox()); |
129 } | 129 } |
130 | 130 |
131 bool LayoutSVGInlineText::characterStartsNewTextChunk(int position) const | 131 bool LayoutSVGInlineText::characterStartsNewTextChunk(int position) const |
132 { | 132 { |
133 ASSERT(position >= 0); | 133 ASSERT(position >= 0); |
134 ASSERT(position < static_cast<int>(textLength())); | 134 ASSERT(position < static_cast<int>(textLength())); |
135 | 135 |
136 // Each <textPath> element starts a new text chunk, regardless of any x/y va
lues. | 136 // Each <textPath> element starts a new text chunk, regardless of any x/y va
lues. |
137 if (!position && parent()->isSVGTextPath() && !previousSibling()) | 137 if (!position && parent()->isSVGTextPath() && !previousSibling()) |
138 return true; | 138 return true; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 379 |
380 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const | 380 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const |
381 { | 381 { |
382 RefPtr<StringImpl> result = LayoutText::originalText(); | 382 RefPtr<StringImpl> result = LayoutText::originalText(); |
383 if (!result) | 383 if (!result) |
384 return nullptr; | 384 return nullptr; |
385 return normalizeWhitespace(result); | 385 return normalizeWhitespace(result); |
386 } | 386 } |
387 | 387 |
388 } // namespace blink | 388 } // namespace blink |
OLD | NEW |