Changeset 75975 in webkit
- Timestamp:
- Jan 17, 2011, 3:14:18 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r75973 r75975 1 2011-01-17 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Use of invalid hash map key in CSSFontFaceSource::getFontData() with 0-sized remote font 6 https://bugs.webkit.org/show_bug.cgi?id=52598 7 8 * fast/css/font-face-zero-hash-key-expected.txt: Added. 9 * fast/css/font-face-zero-hash-key.html: Added. 10 1 11 2011-01-17 Helder Correia <helder@sencha.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r75974 r75975 1 2011-01-17 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Use of invalid hash map key in CSSFontFaceSource::getFontData() with 0-sized remote font 6 https://bugs.webkit.org/show_bug.cgi?id=52598 7 8 Test: fast/css/font-face-zero-hash-key.html 9 10 * css/CSSFontFaceSource.cpp: 11 (WebCore::CSSFontFaceSource::getFontData): Add 1 to the font size to avoid a 0 hash key. 12 * css/CSSSegmentedFontFace.cpp: 13 (WebCore::CSSSegmentedFontFace::getFontData): Ditto. 14 1 15 2011-01-17 David Kilzer <ddkilzer@apple.com> 2 16 -
trunk/Source/WebCore/css/CSSFontFaceSource.cpp
r73258 r75975 116 116 117 117 // See if we have a mapping in our FontData cache. 118 unsigned hashKey = fontDescription.computedPixelSize() << 3 | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);118 unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 3 | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0); 119 119 if (SimpleFontData* cachedData = m_fontDataTable.get(hashKey)) 120 120 return cachedData; -
trunk/Source/WebCore/css/CSSSegmentedFontFace.cpp
r71970 r75975 89 89 90 90 FontTraitsMask desiredTraitsMask = fontDescription.traitsMask(); 91 unsigned hashKey = ( fontDescription.computedPixelSize() << (FontTraitsMaskWidth + 1)) | ((fontDescription.orientation() == Vertical ? 1 : 0) << FontTraitsMaskWidth) | desiredTraitsMask;91 unsigned hashKey = ((fontDescription.computedPixelSize() + 1) << (FontTraitsMaskWidth + 1)) | ((fontDescription.orientation() == Vertical ? 1 : 0) << FontTraitsMaskWidth) | desiredTraitsMask; 92 92 93 93 SegmentedFontData* fontData = m_fontDataTable.get(hashKey);
Note:
See TracChangeset
for help on using the changeset viewer.