[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mitz at apple.com
mitz at apple.com
Wed Dec 22 15:45:16 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 54540e6b67d89fecccf730d46a718aa65d1fa44e
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 11 20:57:29 2010 +0000
<rdar://problem/8113511> Enable auto-hyphenation
Reviewed by Adam Roben.
* WebCore.vcproj/WebCore.vcproj: Included HyphenationCF.cpp instead of Hyphenation.cpp.
* platform/text/cf/HyphenationCF.cpp: Added functions and definitions for Windows to look up CFStringGetHyphenationLocationBeforeIndex
and CFStringIsHyphenationAvailableForLocale at runtime.
(wkCFStringGetHyphenationLocationBeforeIndex):
(wkCFStringIsHyphenationAvailableForLocale):
(WebCore::lastHyphenLocation): Added a cast.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 40d8c80..d8595c3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-11 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/8113511> Enable auto-hyphenation
+
+ * WebCore.vcproj/WebCore.vcproj: Included HyphenationCF.cpp instead of Hyphenation.cpp.
+ * platform/text/cf/HyphenationCF.cpp: Added functions and definitions for Windows to look up CFStringGetHyphenationLocationBeforeIndex
+ and CFStringIsHyphenationAvailableForLocale at runtime.
+ (wkCFStringGetHyphenationLocationBeforeIndex):
+ (wkCFStringIsHyphenationAvailableForLocale):
+ (WebCore::lastHyphenLocation): Added a cast.
+
2010-11-11 Eric Carlson <eric.carlson at apple.com>
Reviewed by Eric Seidel.
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index b56d76a..2280dc5 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -29139,10 +29139,6 @@
>
</File>
<File
- RelativePath="..\platform\text\Hyphenation.cpp"
- >
- </File>
- <File
RelativePath="..\platform\text\Hyphenation.h"
>
</File>
@@ -29366,6 +29362,10 @@
Name="cf"
>
<File
+ RelativePath="..\platform\text\cf\HyphenationCF.cpp"
+ >
+ </File>
+ <File
RelativePath="..\platform\text\cf\StringCF.cpp"
>
</File>
diff --git a/WebCore/platform/text/cf/HyphenationCF.cpp b/WebCore/platform/text/cf/HyphenationCF.cpp
index b265c56..dbc11ae 100644
--- a/WebCore/platform/text/cf/HyphenationCF.cpp
+++ b/WebCore/platform/text/cf/HyphenationCF.cpp
@@ -33,6 +33,38 @@
#include <wtf/ListHashSet.h>
#include <wtf/RetainPtr.h>
+#if PLATFORM(WIN)
+
+#include "SoftLinking.h"
+
+#ifdef DEBUG_ALL
+SOFT_LINK_DEBUG_LIBRARY(CoreFoundation)
+#else
+SOFT_LINK_LIBRARY(CoreFoundation)
+#endif
+
+SOFT_LINK_OPTIONAL(CoreFoundation, CFStringGetHyphenationLocationBeforeIndex, CFIndex, , (CFStringRef string, CFIndex location, CFRange limitRange, CFOptionFlags options, CFLocaleRef locale, UTF32Char *character))
+SOFT_LINK_OPTIONAL(CoreFoundation, CFStringIsHyphenationAvailableForLocale, Boolean, , (CFLocaleRef locale))
+
+static CFIndex wkCFStringGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex location, CFRange limitRange, CFOptionFlags options, CFLocaleRef locale, UTF32Char *character)
+{
+ static CFStringGetHyphenationLocationBeforeIndexPtrType cfStringGetHyphenationLocationBeforeIndex = CFStringGetHyphenationLocationBeforeIndexPtr();
+ if (!cfStringGetHyphenationLocationBeforeIndex)
+ return kCFNotFound;
+ return cfStringGetHyphenationLocationBeforeIndex(string, location, limitRange, options, locale, character);
+}
+
+static Boolean wkCFStringIsHyphenationAvailableForLocale(CFLocaleRef locale)
+{
+ static CFStringIsHyphenationAvailableForLocalePtrType cfStringIsHyphenationAvailableForLocale = CFStringIsHyphenationAvailableForLocalePtr();
+ return cfStringIsHyphenationAvailableForLocale && cfStringIsHyphenationAvailableForLocale(locale);
+}
+
+#define CFStringGetHyphenationLocationBeforeIndex wkCFStringGetHyphenationLocationBeforeIndex
+#define CFStringIsHyphenationAvailableForLocale wkCFStringIsHyphenationAvailableForLocale
+
+#endif // PLATFORM(WIN)
+
namespace WebCore {
template<>
@@ -65,7 +97,7 @@ bool canHyphenate(const AtomicString& localeIdentifier)
size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier)
{
- RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, characters, length, kCFAllocatorNull));
+ RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, reinterpret_cast<const UniChar*>(characters), length, kCFAllocatorNull));
RetainPtr<CFLocaleRef> locale = cfLocaleCache().get(localeIdentifier);
ASSERT(locale);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list