Changeset 149880 in webkit
- Timestamp:
- May 10, 2013 9:18:31 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r149879 r149880 1 2013-05-09 Dean Jackson <dino@apple.com> 2 3 Don't trust character widths for internal OS X fonts in form controls 4 https://bugs.webkit.org/show_bug.cgi?id=115883 5 <rdar://problem/13817757> 6 7 Reviewed by Darin Adler. 8 9 We ignore the character width for a bunch of fonts when predicting 10 the width of a form control. Some of the internal fonts in OS X are 11 not in the ignored list. Rather than add them, simply test for 12 fonts whose family begins with a period character ".". 13 14 * rendering/RenderTextControl.cpp: 15 (WebCore::RenderTextControl::hasValidAvgCharWidth): Return false for 16 any family that starts with "." 17 1 18 2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r147135 r149880 219 219 bool RenderTextControl::hasValidAvgCharWidth(AtomicString family) 220 220 { 221 static HashSet<AtomicString>* fontFamiliesWithInvalidCharWidthMap = 0;222 223 221 if (family.isEmpty()) 224 222 return false; 225 223 224 // Internal fonts on OS X also have an invalid entry in the table for avgCharWidth. 225 // They are hidden by having a name that begins with a period, so simply search 226 // for that here rather than try to keep the list up to date. 227 if (family.startsWith('.')) 228 return false; 229 230 static HashSet<AtomicString>* fontFamiliesWithInvalidCharWidthMap = 0; 231 226 232 if (!fontFamiliesWithInvalidCharWidthMap) { 227 233 fontFamiliesWithInvalidCharWidthMap = new HashSet<AtomicString>;
Note: See TracChangeset
for help on using the changeset viewer.