Changeset 159076 in webkit
- Timestamp:
- Nov 11, 2013 3:31:17 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159071 r159076 1 2013-11-11 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Mac] Characters too close together in complex Arabic text 4 https://bugs.webkit.org/show_bug.cgi?id=124057 5 6 Reviewed by Darin Adler. 7 8 complex-grapheme-cluster-with-initial-advance adds a span around a word in some 9 complex Arabic text, and expects that the word spacing is the same as without the 10 span. 11 12 selection-in-initial-advance-region simulates a mouse drag across a complex text run 13 with an initial advance. This makes sure that ComplexTextController::offsetForPosition 14 doesn't crash when there is an initial advance. 15 16 * fast/text/complex-grapheme-cluster-with-initial-advance-expected.html: Added. 17 * fast/text/complex-grapheme-cluster-with-initial-advance.html: Added. 18 * fast/text/selection-in-initial-advance-region-expected.txt: added 19 * fast/text/selection-in-initial-advance-region.html: added 20 1 21 2013-11-11 Antti Koivisto <antti@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r159072 r159076 1 2013-11-11 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Mac] Characters too close together in complex Arabic text 4 https://bugs.webkit.org/show_bug.cgi?id=124057 5 6 Reviewed by Darin Adler. 7 8 We weren't updating our total width variable with run's initial 9 advance information, leading to widths that were too narrow. 10 11 In addition, while initial advances for runs that aren't the first 12 run are accounted for by baking in the initial advances into the 13 previous character's advance, the initial advance for the first run 14 has to be accounted for in ComplexTextController::offsetForPosition. 15 16 Test: fast/text/complex-grapheme-cluster-with-initial-advance.html 17 Test: fast/text/selection-in-initial-advance-region.html 18 19 * platform/graphics/mac/ComplexTextController.cpp: 20 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Update 21 total width variable 22 (WebCore::ComplexTextController::offsetOfPosition): Account for 23 the first run's initial advance. 24 1 25 2013-11-11 Brady Eidson <beidson@apple.com> 2 26 -
trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
r159027 r159076 189 189 const ComplexTextRun& complexTextRun = *m_complexTextRuns[r]; 190 190 for (unsigned j = 0; j < complexTextRun.glyphCount(); ++j) { 191 CGFloat adjustedAdvance = m_adjustedAdvances[offsetIntoAdjustedGlyphs + j].width; 191 size_t index = offsetIntoAdjustedGlyphs + j; 192 CGFloat adjustedAdvance = m_adjustedAdvances[index].width; 193 if (!index) 194 adjustedAdvance += complexTextRun.initialAdvance().width; 192 195 if (x < adjustedAdvance) { 193 196 CFIndex hitGlyphStart = complexTextRun.indexAt(j); … … 579 582 m_adjustedAdvances[m_adjustedAdvances.size() - 1] = previousAdvance; 580 583 } 584 widthSinceLastCommit += complexTextRun.initialAdvance().width; 581 585 582 586 if (!complexTextRun.isLTR())
Note: See TracChangeset
for help on using the changeset viewer.