Changeset 101537 in webkit
- Timestamp:
- Nov 30, 2011 11:30:08 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101522 r101537 1 2011-11-30 Tim Horton <timothy_horton@apple.com> 2 3 dx causes non-BMP characters to fail to render 4 https://bugs.webkit.org/show_bug.cgi?id=18039 5 <rdar://problem/10422142> 6 7 Reviewed by Simon Fraser. 8 9 Add a test combining non-BMP characters and positioning lists. 10 11 * platform/mac/svg/text/non-bmp-positioning-lists-expected.png: Added. 12 * platform/mac/svg/text/non-bmp-positioning-lists-expected.txt: Added. 13 * svg/text/non-bmp-positioning-lists.svg: Added. 14 1 15 2011-11-30 Philippe Normand <pnormand@igalia.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r101535 r101537 1 2011-11-30 Tim Horton <timothy_horton@apple.com> 2 3 dx causes non-BMP characters to fail to render 4 https://bugs.webkit.org/show_bug.cgi?id=18039 5 <rdar://problem/10422142> 6 7 Reviewed by Simon Fraser. 8 9 Don't split the surrogate pairs of non-BMP characters across 10 elements of <text> positioning lists. 11 12 Test: svg/text/non-bmp-positioning-lists.svg 13 14 * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: 15 (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes): 16 1 17 2011-11-29 Robin Dunn <robin@alldunn.com> 2 18 -
trunk/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
r100075 r101537 204 204 const UChar& currentCharacter = characters[textPosition]; 205 205 206 SVGTextMetrics startToCurrentMetrics = SVGTextMetrics::measureCharacterRange(text, 0, textPosition + 1); 207 SVGTextMetrics currentMetrics = SVGTextMetrics::measureCharacterRange(text, textPosition, 1); 208 metricsLength = currentMetrics.length(); 209 210 // Eventually handle surrogate pairs here. 211 if (!metricsLength) { 212 if (textPosition + 1 == textLength) 213 break; 214 206 SVGTextMetrics startToCurrentMetrics; 207 SVGTextMetrics currentMetrics; 208 unsigned valueListAdvance = 0; 209 210 if (U16_IS_LEAD(currentCharacter) && (textPosition + 1) < textLength && U16_IS_TRAIL(characters[textPosition + 1])) { 211 // Handle surrogate pairs. 215 212 startToCurrentMetrics = SVGTextMetrics::measureCharacterRange(text, 0, textPosition + 2); 216 213 currentMetrics = SVGTextMetrics::measureCharacterRange(text, textPosition, 2); 217 214 metricsLength = currentMetrics.length(); 215 valueListAdvance = 1; 216 } else { 217 // Handle BMP characters. 218 startToCurrentMetrics = SVGTextMetrics::measureCharacterRange(text, 0, textPosition + 1); 219 currentMetrics = SVGTextMetrics::measureCharacterRange(text, textPosition, 1); 220 metricsLength = currentMetrics.length(); 221 valueListAdvance = metricsLength; 218 222 } 219 223 … … 248 252 249 253 lastCharacter = currentCharacter; 250 valueListPosition += metricsLength;254 valueListPosition += valueListAdvance; 251 255 } 252 256
Note: See TracChangeset
for help on using the changeset viewer.