Title: [92287] trunk/Source/WebCore
- Revision
- 92287
- Author
- [email protected]
- Date
- 2011-08-03 09:46:13 -0700 (Wed, 03 Aug 2011)
Log Message
FontCache::getFontData() does not set the familyIndex to cAllFamiliesScanned if the last font is a custom font
https://bugs.webkit.org/show_bug.cgi?id=65597
Reviewed by Simon Fraser.
No test added because behavior is unchanged, but this saves a call to getFontData().
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getFontData): Eliminated early return inside the loop, allowing execution
to continue and familyIndex to be set.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92286 => 92287)
--- trunk/Source/WebCore/ChangeLog 2011-08-03 16:27:35 UTC (rev 92286)
+++ trunk/Source/WebCore/ChangeLog 2011-08-03 16:46:13 UTC (rev 92287)
@@ -1,3 +1,16 @@
+2011-08-03 Dan Bernstein <[email protected]>
+
+ FontCache::getFontData() does not set the familyIndex to cAllFamiliesScanned if the last font is a custom font
+ https://bugs.webkit.org/show_bug.cgi?id=65597
+
+ Reviewed by Simon Fraser.
+
+ No test added because behavior is unchanged, but this saves a call to getFontData().
+
+ * platform/graphics/FontCache.cpp:
+ (WebCore::FontCache::getFontData): Eliminated early return inside the loop, allowing execution
+ to continue and familyIndex to be set.
+
2011-08-03 Ryosuke Niwa <[email protected]>
Add RenderedPosition
Modified: trunk/Source/WebCore/platform/graphics/FontCache.cpp (92286 => 92287)
--- trunk/Source/WebCore/platform/graphics/FontCache.cpp 2011-08-03 16:27:35 UTC (rev 92286)
+++ trunk/Source/WebCore/platform/graphics/FontCache.cpp 2011-08-03 16:46:13 UTC (rev 92287)
@@ -394,7 +394,7 @@
const FontData* FontCache::getFontData(const Font& font, int& familyIndex, FontSelector* fontSelector)
{
- SimpleFontData* result = 0;
+ FontData* result = 0;
int startIndex = familyIndex;
const FontFamily* startFamily = &font.fontDescription().family();
@@ -404,12 +404,11 @@
while (currFamily && !result) {
familyIndex++;
if (currFamily->family().length()) {
- if (fontSelector) {
- FontData* data = "" currFamily->family());
- if (data)
- return data;
- }
- result = getCachedFontData(font.fontDescription(), currFamily->family());
+ if (fontSelector)
+ result = fontSelector->getFontData(font.fontDescription(), currFamily->family());
+
+ if (!result)
+ result = getCachedFontData(font.fontDescription(), currFamily->family());
}
currFamily = currFamily->next();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes