Reviewed by Dave Hyatt.
Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
* DerivedSources.make: Add Tiger-only symbols to the export file when running on Tiger.
* WebCore.Tiger.exp: Added. Move Tiger-only symbol here from WebCore.base.exp.
* WebCore.base.exp:
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit): Use Leopard APIs when building on Leopard.
* platform/mac/WebCoreSystemInterface.h: Don't declare wkGetFontMetrics on Leopard as it is unused.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
2008-02-28 Mark Rowe <mrowe@apple.com>
Reviewed by Dave Hyatt.
Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
* WebKitSystemInterface.h: Only declare WKGetFontMetrics on Tiger.
* libWebKitSystemInterfaceLeopard.a: Update for removal of WKGetFontMetrics.
2008-02-28 Mark Rowe <mrowe@apple.com>
Reviewed by Dave Hyatt.
Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface): Only initialize wkGetFontMetrics on Tiger.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30656
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-02-28 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
+
+ * DerivedSources.make: Add Tiger-only symbols to the export file when running on Tiger.
+ * WebCore.Tiger.exp: Added. Move Tiger-only symbol here from WebCore.base.exp.
+ * WebCore.base.exp:
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::platformInit): Use Leopard APIs when building on Leopard.
+ * platform/mac/WebCoreSystemInterface.h: Don't declare wkGetFontMetrics on Leopard as it is unused.
+ * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
2008-02-28 Matt Lilek <webkit@mattlilek.com>
Reviewed by Tim Hatcher.
perl $< --attrs $(WebCore)/xml/xmlattrs.in \
--namespace XML --cppNamespace WebCore --namespaceURI "http://www.w3.org/XML/1998/namespace" --output .
+
+ifeq ($(findstring 10.4,$(MACOSX_DEPLOYMENT_TARGET)), 10.4)
+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Tiger.exp
+endif
+
ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
-WEBCORE_EXPORT_DEPENDENCIES := WebCore.SVG.exp
+WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.exp
ifeq ($(findstring ENABLE_SVG_USE,$(FEATURE_DEFINES)), ENABLE_SVG_USE)
SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_USE=1
endif
ifeq ($(findstring ENABLE_SVG_FOREIGN_OBJECT,$(FEATURE_DEFINES)), ENABLE_SVG_FOREIGN_OBJECT)
- SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FOREIGN_OBJECT=1
- WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.ForeignObject.exp
+ SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FOREIGN_OBJECT=1
+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.ForeignObject.exp
endif
# SVG tag and attribute names (need to pass an extra flag if svg experimental features are enabled)
perl $< --attrs $(WebCore)/svg/xlinkattrs.in \
--namespace XLink --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xlink" --output .
-# Add SVG Symbols to the WebCore exported symbols file
-WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
- cat $^ > $@
-
else
SVGElementFactory.cpp :
XLinkNames.cpp :
echo > $@
-WebCore.exp : WebCore.base.exp
- cat $^ > $@
-
endif
+# Add any conditionally-included symbols to the WebCore exported symbols file
+WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
+ cat $^ > $@
+
# new-style Objective-C bindings
OBJC_BINDINGS_SCRIPTS = \
--- /dev/null
+_wkGetFontMetrics
_wkGetExtensionsForMIMEType
_wkGetFontInLanguageForCharacter
_wkGetFontInLanguageForRange
-_wkGetFontMetrics
_wkGetGlyphTransformedAdvances
_wkGetGlyphVectorFirstRecord
_wkGetGlyphVectorNumGlyphs
int iAscent;
int iDescent;
int iLineGap;
- wkGetFontMetrics(m_font.m_cgFont, &iAscent, &iDescent, &iLineGap, &m_unitsPerEm);
+#ifdef BUILDING_ON_TIGER
+ wkGetFontMetrics(m_font.m_cgFont, &iAscent, &iDescent, &iLineGap, &m_unitsPerEm);
+#else
+ iAscent = CGFontGetAscent(m_font.m_cgFont);
+ iDescent = CGFontGetDescent(m_font.m_cgFont);
+ iLineGap = CGFontGetLeading(m_font.m_cgFont);
+ m_unitsPerEm = CGFontGetUnitsPerEm(m_font.m_cgFont);
+#endif
+
float pointSize = m_font.m_size;
float fAscent = scaleEmToUnits(iAscent, m_unitsPerEm) * pointSize;
float fDescent = -scaleEmToUnits(iDescent, m_unitsPerEm) * pointSize;
extern CGFontRef (*wkGetCGFontFromNSFont)(NSFont*);
extern NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
extern NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
-extern void (*wkGetFontMetrics)(CGFontRef, int* ascent, int* descent, int* lineGap, unsigned* unitsPerEm);
extern BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
extern ATSLayoutRecord* (*wkGetGlyphVectorFirstRecord)(void* glyphVector);
extern int (*wkGetGlyphVectorNumGlyphs)(void* glyphVector);
extern void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
extern BOOL (*wkSupportsMultipartXMixedReplace)(NSMutableURLRequest *);
extern float (*wkSecondsSinceLastInputEvent)(void);
+
+#ifdef BUILDING_ON_TIGER
+extern void (*wkGetFontMetrics)(CGFontRef, int* ascent, int* descent, int* lineGap, unsigned* unitsPerEm);
+#endif
+
#ifdef __cplusplus
}
#endif
CGFontRef (*wkGetCGFontFromNSFont)(NSFont*);
NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
-void (*wkGetFontMetrics)(CGFontRef, int* ascent, int* descent, int* lineGap, unsigned* unitsPerEm);
BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
ATSLayoutRecord* (*wkGetGlyphVectorFirstRecord)(void* glyphVector);
int (*wkGetGlyphVectorNumGlyphs)(void* glyphVector);
id (*wkCreateNSURLConnectionDelegateProxy)(void);
BOOL (*wkSupportsMultipartXMixedReplace)(NSMutableURLRequest *);
float (*wkSecondsSinceLastInputEvent)(void);
+
+#ifdef BUILDING_ON_TIGER
+void (*wkGetFontMetrics)(CGFontRef, int* ascent, int* descent, int* lineGap, unsigned* unitsPerEm);
+#endif
+2008-02-28 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Only initialize wkGetFontMetrics on Tiger.
+
2008-02-27 Brady Eidson <beidson@apple.com>
Reviewed by Mark Rowe (code) and Darin (concept)
INIT(GetExtensionsForMIMEType);
INIT(GetFontInLanguageForCharacter);
INIT(GetFontInLanguageForRange);
- INIT(GetFontMetrics);
INIT(GetGlyphTransformedAdvances);
INIT(GetGlyphVectorFirstRecord);
INIT(GetGlyphVectorNumGlyphs);
INIT(QTMovieMaxTimeLoaded);
INIT(QTMovieViewSetDrawSynchronously);
-
+#ifdef BUILDING_ON_TIGER
+ INIT(GetFontMetrics);
+#endif
+
didInit = true;
}
+2008-02-28 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
+
+ * WebKitSystemInterface.h: Only declare WKGetFontMetrics on Tiger.
+ * libWebKitSystemInterfaceLeopard.a: Update for removal of WKGetFontMetrics.
+
2008-02-27 Brady Eidson <beidson@apple.com>
Tiger build fix
/*
WebKitSystemInterface.h
- Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
Public header file.
*/
void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
void WKSendUserChangeNotifications(void);
-#ifndef __LP64__
+#ifndef __LP64__
BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
void WKSendKeyEventToTSM(NSEvent *theEvent);
void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
CGFontRef WKGetCGFontFromNSFont(NSFont *font);
-void WKGetFontMetrics(CGFontRef font, int *ascent, int *descent, int *lineGap, unsigned *unitsPerEm);
NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
void WKReleaseStyleGroup(void *group);
BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
+#ifdef BUILDING_ON_TIGER
+// CGFontGetAscent, CGFontGetDescent, CGFontGetLeading and CGFontGetUnitsPerEm were not available until Leopard
+void WKGetFontMetrics(CGFontRef font, int *ascent, int *descent, int *lineGap, unsigned *unitsPerEm);
+#endif
+
void WKSetPatternBaseCTM(CGContextRef, CGAffineTransform);
void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);