[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
mitz at apple.com
mitz at apple.com
Thu Oct 29 20:34:41 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit e91eb57e3fa1a98b97eb465f0f2a324508d6e779
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Sep 26 06:43:25 2009 +0000
REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
to crash on launch
https://bugs.webkit.org/show_bug.cgi?id=29759
Reviewed by Sam Weinig.
* platform/graphics/win/FontDatabase.cpp:
(WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
property list at the root of FontList.plist, but with an additional
key for the last value of the Fonts registry key.
(WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
to populatFontDatabaseFromPlist.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2c2c4b8..4465c73 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-09-25 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
+ to crash on launch
+ https://bugs.webkit.org/show_bug.cgi?id=29759
+
+ * platform/graphics/win/FontDatabase.cpp:
+ (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
+ property list at the root of FontList.plist, but with an additional
+ key for the last value of the Fonts registry key.
+ (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
+ to populatFontDatabaseFromPlist.
+
2009-09-25 Kevin Ollivier <kevino at theolliviers.com>
Build fix. Adding missing header files.
diff --git a/WebCore/platform/graphics/win/FontDatabase.cpp b/WebCore/platform/graphics/win/FontDatabase.cpp
index e787106..d0773ea 100644
--- a/WebCore/platform/graphics/win/FontDatabase.cpp
+++ b/WebCore/platform/graphics/win/FontDatabase.cpp
@@ -124,22 +124,21 @@ static CFStringRef fontFilenamesFromRegistryKey()
return key;
}
-static CFStringRef cgFontDBKey()
-{
- static CFStringRef key = CFSTR("WebKitCGFontDB");
- return key;
-}
-
static void writeFontDatabaseToPlist(CFPropertyListRef cgFontDBPropertyList, CFPropertyListRef filenamesFromRegistry)
{
- RetainPtr<CFMutableDictionaryRef> dictionary(AdoptCF, CFDictionaryCreateMutable(kCFAllocatorDefault, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+ if (!cgFontDBPropertyList)
+ return;
+
+ RetainPtr<CFDataRef> data;
- if (cgFontDBPropertyList)
- CFDictionarySetValue(dictionary.get(), cgFontDBKey(), cgFontDBPropertyList);
- if (filenamesFromRegistry)
+ if (!filenamesFromRegistry || CFGetTypeID(cgFontDBPropertyList) != CFDictionaryGetTypeID())
+ data.adoptCF(CFPropertyListCreateXMLData(kCFAllocatorDefault, cgFontDBPropertyList));
+ else {
+ RetainPtr<CFMutableDictionaryRef> dictionary(AdoptCF, CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 2, static_cast<CFDictionaryRef>(cgFontDBPropertyList)));
CFDictionarySetValue(dictionary.get(), fontFilenamesFromRegistryKey(), filenamesFromRegistry);
+ data.adoptCF(CFPropertyListCreateXMLData(kCFAllocatorDefault, dictionary.get()));
+ }
- RetainPtr<CFDataRef> data(AdoptCF, CFPropertyListCreateXMLData(kCFAllocatorDefault, dictionary.get()));
if (!data)
return;
@@ -201,18 +200,7 @@ void populateFontDatabase()
bool registryChanged = !lastFilenamesFromRegistry || !CFEqual(lastFilenamesFromRegistry.get(), currentFilenamesFromRegistry.get());
if (!registryChanged && !systemHasFontsNewerThanFontsPlist()) {
- RetainPtr<CFPropertyListRef> cgFontDBPropertyList;
- if (propertyList) {
- if (CFGetTypeID(propertyList.get()) == CFDictionaryGetTypeID()) {
- CFDictionaryRef dictionary = static_cast<CFDictionaryRef>(propertyList.get());
- cgFontDBPropertyList = static_cast<CFArrayRef>(CFDictionaryGetValue(dictionary, cgFontDBKey()));
- }
- // Older versions of WebKit stored the CG font DB property list at the root of the property list.
- if (!cgFontDBPropertyList)
- cgFontDBPropertyList = propertyList;
- }
-
- if (populateFontDatabaseFromPlist(cgFontDBPropertyList.get()))
+ if (populateFontDatabaseFromPlist(propertyList.get()))
return;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list