| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 chunkStyle |= SVGTextChunk::EndAnchor; | 122 chunkStyle |= SVGTextChunk::EndAnchor; |
| 123 break; | 123 break; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // Handle 'lengthAdjust' property. | 126 // Handle 'lengthAdjust' property. |
| 127 float desiredTextLength = 0; | 127 float desiredTextLength = 0; |
| 128 if (SVGTextContentElement* textContentElement = SVGTextContentElement::eleme
ntFromRenderer(textRenderer->parent())) { | 128 if (SVGTextContentElement* textContentElement = SVGTextContentElement::eleme
ntFromRenderer(textRenderer->parent())) { |
| 129 SVGLengthContext lengthContext(textContentElement); | 129 SVGLengthContext lengthContext(textContentElement); |
| 130 desiredTextLength = textContentElement->specifiedTextLength().value(leng
thContext); | 130 desiredTextLength = textContentElement->specifiedTextLength().value(leng
thContext); |
| 131 | 131 |
| 132 switch (textContentElement->lengthAdjust()) { | 132 switch (textContentElement->lengthAdjustCurrentValue()) { |
| 133 case SVGLengthAdjustUnknown: | 133 case SVGLengthAdjustUnknown: |
| 134 break; | 134 break; |
| 135 case SVGLengthAdjustSpacing: | 135 case SVGLengthAdjustSpacing: |
| 136 chunkStyle |= SVGTextChunk::LengthAdjustSpacing; | 136 chunkStyle |= SVGTextChunk::LengthAdjustSpacing; |
| 137 break; | 137 break; |
| 138 case SVGLengthAdjustSpacingAndGlyphs: | 138 case SVGLengthAdjustSpacingAndGlyphs: |
| 139 chunkStyle |= SVGTextChunk::LengthAdjustSpacingAndGlyphs; | 139 chunkStyle |= SVGTextChunk::LengthAdjustSpacingAndGlyphs; |
| 140 break; | 140 break; |
| 141 }; | 141 }; |
| 142 } | 142 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 if (isVerticalText) | 254 if (isVerticalText) |
| 255 spacingAndGlyphsTransform.scaleNonUniform(1, scale); | 255 spacingAndGlyphsTransform.scaleNonUniform(1, scale); |
| 256 else | 256 else |
| 257 spacingAndGlyphsTransform.scaleNonUniform(scale, 1); | 257 spacingAndGlyphsTransform.scaleNonUniform(scale, 1); |
| 258 | 258 |
| 259 spacingAndGlyphsTransform.translate(-fragment.x, -fragment.y); | 259 spacingAndGlyphsTransform.translate(-fragment.x, -fragment.y); |
| 260 } | 260 } |
| 261 | 261 |
| 262 } | 262 } |
| OLD | NEW |