Reviewed by Don.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jun 2005 02:21:19 +0000 (02:21 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jun 2005 02:21:19 +0000 (02:21 +0000)
- remove more SPI usage
- fix <rdar://problem/3446192> CoreTranslation SPI is going away

        * History.subproj/WebHistoryItem.m:
        (+[WebHistoryItem _releasePageCache:]):
        * Misc.subproj/WebNSPasteboardExtras.m:
        (+[NSPasteboard initialize]):
        * WebCoreSupport.subproj/WebTextRenderer.h:
        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _setupFont]):
        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences _systemCFStringEncoding]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/History.subproj/WebHistoryItem.m
WebKit/Misc.subproj/WebNSPasteboardExtras.m
WebKit/WebCoreSupport.subproj/WebTextRenderer.h
WebKit/WebCoreSupport.subproj/WebTextRenderer.m
WebKit/WebView.subproj/WebPreferences.m

index e1654987ed26f3f1ac19ea659378df868bbd735a..2db0a77960e630ec21097df55d4528f2fb8b414c 100644 (file)
@@ -1,3 +1,20 @@
+2005-06-05  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Don.
+
+       - remove more SPI usage
+       - fix <rdar://problem/3446192> CoreTranslation SPI is going away
+       
+        * History.subproj/WebHistoryItem.m:
+        (+[WebHistoryItem _releasePageCache:]):
+        * Misc.subproj/WebNSPasteboardExtras.m:
+        (+[NSPasteboard initialize]):
+        * WebCoreSupport.subproj/WebTextRenderer.h:
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer _setupFont]):
+        * WebView.subproj/WebPreferences.m:
+        (+[WebPreferences _systemCFStringEncoding]):
+
 2005-06-05  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
index 46f45fe8402df3c04451732fcc1463025cef0479..6be249beb677c8a607fe2af977443c3d0431e6f5 100644 (file)
@@ -42,8 +42,7 @@
 #import <WebKit/WebNSURLRequestExtras.h>
 #import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebPluginController.h>
-
-#import <CoreGraphics/CoreGraphicsPrivate.h>
+#import <WebKitSystemInterface.h>
 
 // Private keys used in the WebHistoryItem's dictionary representation.
 // see 3245793 for explanation of "lastVisitedDate"
@@ -720,11 +719,11 @@ static NSTimer *_pageCacheReleaseTimer = nil;
 
 + (void)_releasePageCache: (NSTimer *)timer
 {
-    CGSRealTimeDelta userDelta;
+    float userDelta;
     CFAbsoluteTime loadDelta;
     
     loadDelta = CFAbsoluteTimeGetCurrent()-[WebFrame _timeOfLastCompletedLoad];
-    userDelta = CGSSecondsSinceLastInputEvent(kCGSAnyInputEventType);
+    userDelta = WKSecondsSinceLastInputEvent();
 
     [_pageCacheReleaseTimer release];
     _pageCacheReleaseTimer = nil;
index f607199a9540dbfb4bcc2ddbed8166047b34ba26..4067de8389b36291ea7c6f48970a5baf5ec2581c 100644 (file)
@@ -52,8 +52,6 @@ NSString *WebURLNamePboardType = nil;
 
 + (void)initialize
 {
-    // FIXME  The code below addresses 3446192.  However we can't enable until 3446669 has been fixed.
-#ifdef UTI_PB_API
     CFStringRef osTypeString = UTCreateStringForOSType('url ');
     CFStringRef utiTypeString = UTTypeCreatePreferredIdentifierForTag( kUTTagClassOSType, osTypeString, NULL );
     WebURLPboardType = (NSString *)UTTypeCopyPreferredTagWithClass( kUTTagClassNSPboardType, utiTypeString );
@@ -61,10 +59,6 @@ NSString *WebURLNamePboardType = nil;
     osTypeString = UTCreateStringForOSType('urln');
     utiTypeString = UTTypeCreatePreferredIdentifierForTag( kUTTagClassOSType, osTypeString, NULL );
     WebURLNamePboardType = (NSString *)UTTypeCopyPreferredTagWithClass( kUTTagClassNSPboardType, utiTypeString );
-#else
-    CreatePasteboardFlavorTypeName('url ', (CFStringRef*)&WebURLPboardType);
-    CreatePasteboardFlavorTypeName('urln', (CFStringRef*)&WebURLNamePboardType);
-#endif
 }
 
 + (NSArray *)_web_writableTypesForURL
index 682629fca2b9f3b838be3f921eed8301fa045b65..3c02d4c72373e01414b9822f455658cc7475590a 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 #import <WebCore/WebCoreTextRenderer.h>
-#import <QD/ATSUnicodePriv.h>
 
 typedef struct WidthMap WidthMap;
 typedef struct WidthEntry WidthEntry;
@@ -47,7 +46,7 @@ typedef struct CharacterWidthIterator CharacterWidthIterator;
     int lineSpacing;
     int lineGap;
     
-    ATSStyleGroupPtr styleGroup;
+    void *styleGroup;
     
 @public
     NSFont *font;
index 14f702d4d32de63b414fcc5aafff41c6d50eba35..3f423bfa10a5a0e5398d58ee3ea07256ccbdf09c 100644 (file)
@@ -909,7 +909,7 @@ static inline BOOL fontContainsString(NSFont *font, NSString *string)
         return NO;
     }
 
-    if (ATSUGetStyleGroup(fontStyle, &styleGroup) != noErr) {
+    if (ATSUGetStyleGroup(fontStyle, (ATSStyleGroupPtr *)&styleGroup) != noErr) {
         ATSUDisposeStyle(fontStyle);
         return NO;
     }
index 5a5fbb00b7577aa0347a13acd71f53591bac521f..c3951b86be797cbbbde2cb483e749c76347e63a6 100644 (file)
 #import <WebKit/WebKitNSStringExtras.h>
 #import <WebKit/WebNSDictionaryExtras.h>
 #import <WebKit/WebNSURLExtras.h>
+#import <WebKitSystemInterface.h>
 
 #import <WebCore/WebCoreSettings.h>
 
-#import <Carbon/Carbon.h>                           // For TEC
-#import <CoreFoundation/CFStringDefaultEncoding.h>  // For __CFStringGetUserDefaultEncoding
-
 NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
 
 #define KEY(x) (_private->identifier ? [_private->identifier stringByAppendingString:(x)] : (x))
@@ -674,20 +672,9 @@ static NSMutableDictionary *webPreferencesInstances = nil;
 
     // We must not use any encoding that has no IANA character set name.
     if (CFStringConvertEncodingToIANACharSetName(encoding) == NULL)
-        return kCFStringEncodingISOLatin1;
-#else
-    UInt32 script = 0;
-    UInt32 region = 0;
-    TextEncoding encoding;
-    OSErr err;
-    ItemCount dontcare;
-
-    // We can't use the Script Manager as it will not return things that use
-    // a script that is not supported on Mac OS X.
-    __CFStringGetUserDefaultEncoding(&script, &region);
-    err = TECGetWebTextEncodings(region, &encoding, 1, &dontcare);
-    if (err != noErr)
         encoding = kCFStringEncodingISOLatin1;
+#else
+       CFStringEncoding encoding = WKGetWebDefaultCFStringEncoding();
 #endif
 
     return encoding;