Diff
Modified: trunk/Source/WebCore/ChangeLog (91934 => 91935)
--- trunk/Source/WebCore/ChangeLog 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebCore/ChangeLog 2011-07-28 16:33:33 UTC (rev 91935)
@@ -1,3 +1,16 @@
+2011-07-28 Dan Bernstein <m...@apple.com>
+
+ <rdar://problem/9589433> Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds
+
+ Reviewed by Darin Adler.
+
+ * WebCore.exp.in: Exported wkGetVerticalGlyphsForCharacters.
+ * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
+ (WebCore::GlyphPage::fill): Use wkGetVerticalGlyphsForCharacters. If it returns false, proceed
+ with the existing, slower method of getting vertical glyphs.
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
2011-07-28 Brady Eidson <beid...@apple.com>
<rdar://problem/9714337> and https://bugs.webkit.org/show_bug.cgi?id=65306
Modified: trunk/Source/WebCore/WebCore.exp.in (91934 => 91935)
--- trunk/Source/WebCore/WebCore.exp.in 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-07-28 16:33:33 UTC (rev 91935)
@@ -1384,6 +1384,7 @@
_wkGetNSURLResponseMustRevalidate
_wkGetPreferredExtensionForMIMEType
_wkGetUserToBaseCTM
+_wkGetVerticalGlyphsForCharacters
_wkGetWheelEventDeltas
_wkHTTPCookiesForURL
_wkHitTestMediaUIPart
Modified: trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp (91934 => 91935)
--- trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp 2011-07-28 16:33:33 UTC (rev 91935)
@@ -53,8 +53,8 @@
{
bool haveGlyphs = false;
+ Vector<CGGlyph, 512> glyphs(bufferLength);
if (!shouldUseCoreText(buffer, bufferLength, fontData)) {
- Vector<CGGlyph, 512> glyphs(bufferLength);
wkGetGlyphsForCharacters(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
for (unsigned i = 0; i < length; ++i) {
if (!glyphs[i])
@@ -64,6 +64,15 @@
haveGlyphs = true;
}
}
+ } else if (wkGetVerticalGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength)) {
+ for (unsigned i = 0; i < length; ++i) {
+ if (!glyphs[i])
+ setGlyphDataForIndex(offset + i, 0, 0);
+ else {
+ setGlyphDataForIndex(offset + i, glyphs[i], fontData);
+ haveGlyphs = true;
+ }
+ }
} else {
// We ask CoreText for possible vertical variant glyphs
RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buffer, bufferLength, kCFAllocatorNull));
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (91934 => 91935)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2011-07-28 16:33:33 UTC (rev 91935)
@@ -46,6 +46,7 @@
typedef struct __CFHTTPMessage *CFHTTPMessageRef;
typedef struct _CFURLResponse *CFURLResponseRef;
typedef const struct _CFURLRequest *CFURLRequestRef;
+typedef const struct __CTFont * CTFontRef;
typedef const struct __CTLine * CTLineRef;
typedef const struct __CTTypesetter * CTTypesetterRef;
typedef const struct __AXUIElement *AXUIElementRef;
@@ -221,6 +222,7 @@
extern CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL);
extern void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
+extern bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
extern BOOL (*wkUseSharedMediaUI)();
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (91934 => 91935)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2011-07-28 16:33:33 UTC (rev 91935)
@@ -117,6 +117,7 @@
#endif
void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
+bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
void* wkGetHyphenationLocationBeforeIndex;
Modified: trunk/Source/WebKit/mac/ChangeLog (91934 => 91935)
--- trunk/Source/WebKit/mac/ChangeLog 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-07-28 16:33:33 UTC (rev 91935)
@@ -1,3 +1,12 @@
+2011-07-28 Dan Bernstein <m...@apple.com>
+
+ <rdar://problem/9589433> Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Initialize wkGetVerticalGlyphsForCharacters.
+
2011-07-28 Brady Eidson <beid...@apple.com>
<rdar://problem/9714337> and https://bugs.webkit.org/show_bug.cgi?id=65306
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (91934 => 91935)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2011-07-28 16:33:33 UTC (rev 91935)
@@ -109,6 +109,7 @@
INIT(QTClearMediaDownloadCache);
INIT(GetGlyphsForCharacters);
+ INIT(GetVerticalGlyphsForCharacters);
#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
INIT(GetHyphenationLocationBeforeIndex);
Modified: trunk/Source/WebKit2/ChangeLog (91934 => 91935)
--- trunk/Source/WebKit2/ChangeLog 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-28 16:33:33 UTC (rev 91935)
@@ -1,3 +1,12 @@
+2011-07-28 Dan Bernstein <m...@apple.com>
+
+ <rdar://problem/9589433> Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds
+
+ Reviewed by Darin Adler.
+
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Initialize wkGetVerticalGlyphsForCharacters.
+
2011-07-28 Brady Eidson <beid...@apple.com>
<rdar://problem/9714337> and https://bugs.webkit.org/show_bug.cgi?id=65306
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (91934 => 91935)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2011-07-28 16:33:33 UTC (rev 91935)
@@ -56,6 +56,7 @@
INIT(GetFontInLanguageForRange);
INIT(GetGlyphTransformedAdvances);
INIT(GetGlyphsForCharacters);
+ INIT(GetVerticalGlyphsForCharacters);
INIT(GetHTTPPipeliningPriority);
INIT(GetMIMETypeForExtension);
INIT(GetNSURLResponseLastModifiedDate);
Modified: trunk/WebKitLibraries/ChangeLog (91934 => 91935)
--- trunk/WebKitLibraries/ChangeLog 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/WebKitLibraries/ChangeLog 2011-07-28 16:33:33 UTC (rev 91935)
@@ -1,3 +1,15 @@
+2011-07-28 Dan Bernstein <m...@apple.com>
+
+ WebKitSystemInterface support for
+ <rdar://problem/9589433> Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds
+
+ Reviewed by Darin Adler.
+
+ * WebKitSystemInterface.h: Added WKGetVerticalGlyphsForCharacters().
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceLion.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+
2011-07-22 Jessie Berlin <jber...@apple.com>
[WebKit2] Changing the cookie accept policy in Private Browsing doesn’t work.
Modified: trunk/WebKitLibraries/WebKitSystemInterface.h (91934 => 91935)
--- trunk/WebKitLibraries/WebKitSystemInterface.h 2011-07-28 16:30:01 UTC (rev 91934)
+++ trunk/WebKitLibraries/WebKitSystemInterface.h 2011-07-28 16:33:33 UTC (rev 91935)
@@ -153,6 +153,7 @@
CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
+bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
(Binary files differ)
Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceLion.a
(Binary files differ)
Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
(Binary files differ)