| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the WebKit project. | 2 * This file is part of the WebKit project. |
| 3 * | 3 * |
| 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 5 * (C) 2006 Apple Computer Inc. | 5 * (C) 2006 Apple Computer Inc. |
| 6 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 6 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 (computedHeight <= 0.0f && chunk.isVerticalText)) | 813 (computedHeight <= 0.0f && chunk.isVerticalText)) |
| 814 return 0.0f; | 814 return 0.0f; |
| 815 | 815 |
| 816 if (chunk.isVerticalText) | 816 if (chunk.isVerticalText) |
| 817 computedLength = computedHeight; | 817 computedLength = computedHeight; |
| 818 else | 818 else |
| 819 computedLength = computedWidth; | 819 computedLength = computedWidth; |
| 820 | 820 |
| 821 if (lengthAdjust == SVGTextContentElement::LENGTHADJUST_SPACINGANDGLYPHS) { | 821 if (lengthAdjust == SVGTextContentElement::LENGTHADJUST_SPACINGANDGLYPHS) { |
| 822 if (chunk.isVerticalText) | 822 if (chunk.isVerticalText) |
| 823 chunk.ctm.scale(1.0f, chunk.textLength / computedLength); | 823 chunk.ctm.scaleNonUniform(1.0f, chunk.textLength / computedLength); |
| 824 else | 824 else |
| 825 chunk.ctm.scale(chunk.textLength / computedLength, 1.0f); | 825 chunk.ctm.scaleNonUniform(chunk.textLength / computedLength, 1.0f); |
| 826 | 826 |
| 827 return 0.0f; | 827 return 0.0f; |
| 828 } | 828 } |
| 829 | 829 |
| 830 return (chunk.textLength - computedLength) / float(chunk.end - chunk.start); | 830 return (chunk.textLength - computedLength) / float(chunk.end - chunk.start); |
| 831 } | 831 } |
| 832 | 832 |
| 833 static void applyTextLengthCorrectionToTextChunk(SVGTextChunk& chunk) | 833 static void applyTextLengthCorrectionToTextChunk(SVGTextChunk& chunk) |
| 834 { | 834 { |
| 835 // This method is not called for chunks containing chars aligned on a path. | 835 // This method is not called for chunks containing chars aligned on a path. |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 if (!textBox && startedFirstChunk) | 1712 if (!textBox && startedFirstChunk) |
| 1713 walker->end(lastNotifiedBox); | 1713 walker->end(lastNotifiedBox); |
| 1714 } | 1714 } |
| 1715 } | 1715 } |
| 1716 | 1716 |
| 1717 } // namespace WebCore | 1717 } // namespace WebCore |
| 1718 | 1718 |
| 1719 #endif // ENABLE(SVG) | 1719 #endif // ENABLE(SVG) |
| OLD | NEW |