Changeset 132178 in webkit
- Timestamp:
- Oct 22, 2012, 10:11:29 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/Font.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r132177 r132178 1 2012-10-22 Dan Bernstein <mitz@apple.com> 2 3 Font’s fast code path is used for partial runs with kerning and ligatures, but shouldn’t be 4 https://bugs.webkit.org/show_bug.cgi?id=100068 5 6 Reviewed by Sam Weinig. 7 8 As described in <http://webkit.org/b/100050>, the fast code path doesn’t handle partial runs 9 correctly when kerning or ligatures are enabled. Since the partial-run case is uncommon, 10 for now just use the complex code path in this case. 11 12 * platform/graphics/Font.cpp: 13 (WebCore::Font::drawText): Changed to use the complex path for partial runs if there are any 14 typesetting features. 15 (WebCore::Font::drawEmphasisMarks): Ditto. 16 (WebCore::Font::selectionRectForText): Ditto. 17 (WebCore::Font::offsetForPosition): Changed to use the complex path if there are any 18 typesetting features. 19 1 20 2012-10-22 Peter Wang <peter.wang@torchmobile.com.cn> 2 21 -
trunk/Source/WebCore/platform/graphics/Font.cpp
r131410 r132178 160 160 161 161 CodePath codePathToUse = codePath(run); 162 // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 163 if (codePathToUse != Complex && typesettingFeatures() && (from || to != run.length())) 164 codePathToUse = Complex; 162 165 163 166 if (codePathToUse != Complex) … … 175 178 to = run.length(); 176 179 177 if (codePath(run) != Complex) 180 CodePath codePathToUse = codePath(run); 181 // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 182 if (codePathToUse != Complex && typesettingFeatures() && (from || to != run.length())) 183 codePathToUse = Complex; 184 185 if (codePathToUse != Complex) 178 186 drawEmphasisMarksForSimpleText(context, run, mark, point, from, to); 179 187 else … … 233 241 to = (to == -1 ? run.length() : to); 234 242 235 if (codePath(run) != Complex) 243 CodePath codePathToUse = codePath(run); 244 // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 245 if (codePathToUse != Complex && typesettingFeatures() && (from || to != run.length())) 246 codePathToUse = Complex; 247 248 if (codePathToUse != Complex) 236 249 return selectionRectForSimpleText(run, point, h, from, to); 237 250 … … 241 254 int Font::offsetForPosition(const TextRun& run, float x, bool includePartialGlyphs) const 242 255 { 243 if (codePath(run) != Complex) 256 // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 257 if (codePath(run) != Complex && !typesettingFeatures()) 244 258 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); 245 259
Note:
See TracChangeset
for help on using the changeset viewer.