Changeset 197435 in webkit
- Timestamp:
- Mar 1, 2016 6:50:25 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r197426 r197435 1 2016-03-01 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Small-caps non-BMP characters are garbled in the complex text codepath 4 https://bugs.webkit.org/show_bug.cgi?id=154875 5 6 Reviewed by Michael Saboff. 7 8 * fast/text/complex-small-caps-non-bmp-capitalize-expected.html: Added. 9 * fast/text/complex-small-caps-non-bmp-capitalize.html: Added. 10 * fast/text/regress-154875-expected.txt: Deleted 11 * fast/text/regress-154875.html: Deleted 12 1 13 2016-03-01 Michael Saboff <msaboff@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r197434 r197435 1 2016-03-01 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Small-caps non-BMP characters are garbled in the complex text codepath 4 https://bugs.webkit.org/show_bug.cgi?id=154875 5 6 Reviewed by Michael Saboff. 7 8 We were assuming that all characters able to be capitalized are in BMP. This is not true. 9 10 Test: fast/text/complex-small-caps-non-bmp-capitalize.html 11 12 * platform/graphics/mac/ComplexTextController.cpp: 13 (WebCore::capitalized): 14 (WebCore::ComplexTextController::collectComplexTextRuns): 15 1 16 2016-03-01 Myles C. Maxfield <mmaxfield@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
r197423 r197435 351 351 synthesizedFont = &nextFont->noSynthesizableFeaturesFont(); 352 352 smallSynthesizedFont = synthesizedFont->smallCapsFont(m_font.fontDescription()); 353 m_smallCapsBuffer[0] = capitalizedBase ? capitalizedBase.value() : cp[0]; 354 for (unsigned i = 1; cp + i < curr; ++i) 353 UChar32 characterToWrite = capitalizedBase ? capitalizedBase.value() : cp[0]; 354 unsigned characterIndex = 0; 355 U16_APPEND_UNSAFE(m_smallCapsBuffer, characterIndex, characterToWrite); 356 for (unsigned i = characterIndex; cp + i < curr; ++i) 355 357 m_smallCapsBuffer[i] = cp[i]; 356 358 nextIsSmallCaps = true; … … 367 369 if (synthesizedFont) { 368 370 if (auto capitalizedBase = capitalized(baseCharacter)) { 369 m_smallCapsBuffer[index] = capitalizedBase.value(); 371 unsigned characterIndex = index; 372 U16_APPEND_UNSAFE(m_smallCapsBuffer, characterIndex, capitalizedBase.value()); 370 373 for (unsigned i = 0; i < markCount; ++i) 371 m_smallCapsBuffer[i ndex + i + 1] = cp[index + i + 1];374 m_smallCapsBuffer[i + characterIndex] = cp[i + characterIndex]; 372 375 nextIsSmallCaps = true; 373 376 } else {
Note: See TracChangeset
for help on using the changeset viewer.