Reviewed by Anders Carlsson.
Replace use of WKPathFromFont with implementation in terms of public API.
* WebCore.base.exp: Remove unused symbol.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::initFontData):
(WebCore::pathFromFont): Implement pathFromFont in terms of public API.
(WebCore::SimpleFontData::platformInit):
* platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
2008-02-29 Mark Rowe <mrowe@apple.com>
Reviewed by Anders Carlsson.
Replace use of WKPathFromFont with implementation in terms of public API.
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface): Remove unused symbol.
2008-02-29 Mark Rowe <mrowe@apple.com>
Reviewed by Anders Carlsson.
Replace use of WKPathFromFont with implementation in terms of public API.
* WebKitSystemInterface.h: Remove unused symbol.
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceTiger.a:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30672
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Replace use of WKPathFromFont with implementation in terms of public API.
+
+ * WebCore.base.exp: Remove unused symbol.
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::initFontData):
+ (WebCore::pathFromFont): Implement pathFromFont in terms of public API.
+ (WebCore::SimpleFontData::platformInit):
+ * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
+ * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
2008-02-29 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
_wkGetPreferredExtensionForMIMEType
_wkGetWheelEventDeltas
_wkInitializeGlyphVector
-_wkPathFromFont
_wkPopupMenu
_wkQTMovieDataRate
_wkQTMovieMaxTimeLoaded
ATSUStyle fontStyle;
if (ATSUCreateStyle(&fontStyle) != noErr)
return false;
-
+
ATSUFontID fontId = fontData->m_font.m_atsuFontID;
if (!fontId) {
ATSUDisposeStyle(fontStyle);
return webFallbackFontFamily.get();
}
+static NSString* pathFromFont(NSFont *font)
+{
+ ATSFontRef atsFont = FMGetATSFontRefFromFont(wkGetNSFontATSUFontId(font));
+ FSRef fileRef;
+
+#ifndef BUILDING_ON_TIGER
+ OSStatus status = ATSFontGetFileReference(atsFont, &fileRef);
+ if (status != noErr)
+ return nil;
+#else
+ FSSpec oFile;
+ OSStatus status = ATSFontGetFileSpecification(atsFont, &oFile);
+ if (status != noErr)
+ return nil;
+
+ status = FSpMakeFSRef(&oFile, &fileRef);
+ if (status != noErr)
+ return nil;
+#endif
+
+ UInt8 filePathBuffer[PATH_MAX];
+ status = FSRefMakePath(&fileRef, filePathBuffer, PATH_MAX);
+ if (status == noErr)
+ return [NSString stringWithUTF8String:(const char*)filePathBuffer];
+
+ return nil;
+}
+
+
void SimpleFontData::platformInit()
{
m_styleGroup = 0;
#endif
m_font.setFont([[NSFontManager sharedFontManager] convertFont:m_font.font() toFamily:fallbackFontFamily]);
#if !ERROR_DISABLED
- NSString *filePath = wkPathFromFont(initialFont.get());
+ NSString *filePath = pathFromFont(initialFont.get());
if (!filePath)
filePath = @"not known";
#endif
extern BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
extern OSStatus (*wkInitializeGlyphVector)(int count, void* glyphs);
-extern NSString* (*wkPathFromFont)(NSFont*);
extern void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
extern int (*wkQTMovieDataRate)(QTMovie*);
extern float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
OSStatus (*wkInitializeGlyphVector)(int count, void* glyphs);
-NSString* (*wkPathFromFont)(NSFont*);
void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
int (*wkQTMovieDataRate)(QTMovie*);
float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Replace use of WKPathFromFont with implementation in terms of public API.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Remove unused symbol.
+
2008-02-29 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
INIT(GetPreferredExtensionForMIMEType);
INIT(GetWheelEventDeltas);
INIT(InitializeGlyphVector);
- INIT(PathFromFont);
INIT(PopupMenu);
INIT(ReleaseStyleGroup);
INIT(SetCGFontRenderingMode);
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Replace use of WKPathFromFont with implementation in terms of public API.
+
+ * WebKitSystemInterface.h: Remove unused symbol.
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceTiger.a:
+
2008-02-29 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
BOOL WKSupportsMultipartXMixedReplace(NSMutableURLRequest *request);
#endif
-NSString* WKPathFromFont(NSFont *font);
-
BOOL WKCGContextIsBitmapContext(CGContextRef context);
void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);