[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

gramps gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:39:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9211913e22a1778678513d25e9b53d2efae475e4
Author: gramps <gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Apr 29 02:09:53 2003 +0000

    WebFoundation:
    
            Reviewed by Maciej.
    
            * English.lproj/StringsNotToBeLocalized.txt:
    
    	Updated for recent changes.
    
    WebKit:
    
    	Fixed 3225050 -- Default font size should be 16px
    	Fixed 3241813 -- No longer spoof as WinIE for abcnews.go.com when
    	default font size becomes 16px
    
            Reviewed by Darin and Maciej.
    
            * English.lproj/StringsNotToBeLocalized.txt:
    
    	Updated.
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer initWithFont:usingPrinterFont:]):
    
    	We need to adjust Times, Helvetica, and Courier to closely match the
            vertical metrics of their Microsoft counterparts that are the de facto
            web standard.  The AppKit adjustment of 20% is too big and is
    	incorrectly added to line spacing, so we use a 15% adjustment instead
    	and add it to the ascent.
    
            * WebView.subproj/WebPreferences.m:
            (+[WebPreferences initialize]):
    
    	Changed default font size from 14 to 16 pixels and default fixed font
    	size from 14 to 13 pixels.  Changed standard font from Lucida Grande to
    	Times, serif font from Times New Roman to Times, and sans serif font
    	from Lucida Grande to Helvetica.  Also replaced some stray tabs with
    	spaces and made a few other anal-retentive formatting changes.
    
            * WebView.subproj/WebUserAgentSpoofTable.c:
            (hash):
            (_web_findSpoofTableEntry):
            * WebView.subproj/WebUserAgentSpoofTable.gperf:
    
    	No longer spoof as Windows MSIE for abcnews.go.com since we've also
    	changed the default font size.
    
    WebBrowser:
    
            Reviewed by Maciej.
    
            * English.lproj/StringsNotToBeLocalized.txt:
    
    	Updated for recent changes.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4203 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a4552be..fb2e448 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,41 @@
+2003-04-28  Don Melton  <gramps at apple.com>
+
+	Fixed 3225050 -- Default font size should be 16px
+	Fixed 3241813 -- No longer spoof as WinIE for abcnews.go.com when
+	default font size becomes 16px
+
+        Reviewed by Darin and Maciej.
+
+        * English.lproj/StringsNotToBeLocalized.txt:
+
+	Updated.
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer initWithFont:usingPrinterFont:]):
+
+	We need to adjust Times, Helvetica, and Courier to closely match the
+        vertical metrics of their Microsoft counterparts that are the de facto
+        web standard.  The AppKit adjustment of 20% is too big and is
+	incorrectly added to line spacing, so we use a 15% adjustment instead
+	and add it to the ascent.
+
+        * WebView.subproj/WebPreferences.m:
+        (+[WebPreferences initialize]):
+
+	Changed default font size from 14 to 16 pixels and default fixed font
+	size from 14 to 13 pixels.  Changed standard font from Lucida Grande to
+	Times, serif font from Times New Roman to Times, and sans serif font
+	from Lucida Grande to Helvetica.  Also replaced some stray tabs with
+	spaces and made a few other anal-retentive formatting changes.
+
+        * WebView.subproj/WebUserAgentSpoofTable.c:
+        (hash):
+        (_web_findSpoofTableEntry):
+        * WebView.subproj/WebUserAgentSpoofTable.gperf:
+
+	No longer spoof as Windows MSIE for abcnews.go.com since we've also
+	changed the default font size.
+
 2003-04-28  Richard Williamson  <rjw at apple.com>
 
         API changes from final review meeting.
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index f3d2554..7ef76c0 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -20,7 +20,8 @@
 "0x0"
 "1.00"
 "1000"
-"14"
+"13"
+"16"
 "4"
 "4096"
 "4194304"
@@ -66,7 +67,6 @@
 "Library/Caches/WebKit/Icons"
 "Library/Caches/com.apple.WebKit"
 "Library/Internet Plug-Ins"
-"Lucida Grande"
 "MP4 Audio"
 "MP4 Video"
 "Mozilla/4.0 (compatible; MSIE 5.2; Mac_PowerPC) AppleWebKit/%@ %@"
@@ -88,7 +88,7 @@
 "Papyrus"
 "QuickTime Plugin.plugin"
 "Set-Cookie"
-"Times New Roman"
+"Times"
 "WebActionButtonKey"
 "WebActionElementKey"
 "WebActionModifierFlagsKey"
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index f0faf31..e827382 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -117,18 +117,6 @@ struct UnicodeGlyphMap {
 }
 @end
 
- at interface NSCGSFont (WebPrivate)
--  (void)_resetLineHeightAdjustmentCache;
- at end
-
- at implementation NSCGSFont (WebPrivate)
--  (void)_resetLineHeightAdjustmentCache
-{
-    _faceInfo->fontFlags._checkedForceAscDelta = NO;
-    _faceInfo->fontFlags._forceAscDelta = NO;
-}
- at end
-
 static CFCharacterSetRef nonBaseChars = NULL;
 
 
@@ -493,22 +481,28 @@ static inline BOOL _fontContainsString (NSFont *font, NSString *string)
     float asc = (ScaleEmToUnits(metrics->ascent, unitsPerEm)*pointSize);
     float dsc = (-ScaleEmToUnits(metrics->descent, unitsPerEm)*pointSize);
     float lineGap = ScaleEmToUnits(metrics->lineGap, unitsPerEm)*pointSize;
-    float akiAdjustment;
+    float adjustment;
+
+    // We need to adjust Times, Helvetica, and Courier to closely match the
+    // vertical metrics of their Microsoft counterparts that are the de facto
+    // web standard.  The AppKit adjustment of 20% is too big and is
+    // incorrectly added to line spacing, so we use a 15% adjustment instead
+    // and add it to the ascent.
+    if ([[font familyName] isEqualToString:@"Times"] ||
+        [[font familyName] isEqualToString:@"Helvetica"] ||
+        [[font familyName] isEqualToString:@"Courier"]) {
+        adjustment = floor(((asc + dsc) * 0.15) + 0.5);
+    } else {
+        adjustment = 0.0;
+    }
 
-    ascent = ROUND_TO_INT(asc);
+    ascent = ROUND_TO_INT(asc + adjustment);
     descent = ROUND_TO_INT(dsc);
 
-    // FIXME.  Aki has determined that some fonts should have a size adjustment (20% of
-    // ascender and descender).  The check is performed by _forceAscenderDelta, but that
-    // method caches the result for the entire font family.  Here we reset the cache bit
-    // before calling the check method.
-    [((NSCGSFont *)f) _resetLineHeightAdjustmentCache];
-    akiAdjustment = ([font _forceAscenderDelta] ? floor(((asc + dsc) * 0.20) + 0.5) : 0.0);
-
-    lineSpacing =  ascent + descent + (int)(lineGap > 0.0 ? floor(lineGap + 0.5) : 0.0) + akiAdjustment;
+    lineSpacing =  ascent + descent + (int)(lineGap > 0.0 ? floor(lineGap + 0.5) : 0.0);
 
 #ifdef COMPARE_APPKIT_CG_METRICS
-    printf ("\nCG/Appkit metrics for font %s, %f, lineGap %f, akiAdjustment %f, _canDrawOutsideLineHeight %d, _isSystemFont %d\n", [[f displayName] cString], [f pointSize], lineGap, akiAdjustment, (int)[f _canDrawOutsideLineHeight], (int)[f _isSystemFont]);
+    printf ("\nCG/Appkit metrics for font %s, %f, lineGap %f, adjustment %f, _canDrawOutsideLineHeight %d, _isSystemFont %d\n", [[f displayName] cString], [f pointSize], lineGap, adjustment, (int)[f _canDrawOutsideLineHeight], (int)[f _isSystemFont]);
     if ((int)ROUND_TO_INT([f ascender]) != ascent ||
         (int)ROUND_TO_INT(-[f descender]) != descent ||
         (int)ROUND_TO_INT([font defaultLineHeightForFont]) != lineSpacing){
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index eae2939..76a0492 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -80,16 +80,16 @@ NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotificatio
 {
     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
         @"0x0",                         WebKitLogLevelPreferenceKey,
-        @"Lucida Grande",               WebKitStandardFontPreferenceKey,
+        @"Times",                       WebKitStandardFontPreferenceKey,
         @"Courier",                     WebKitFixedFontPreferenceKey,
-        @"Times New Roman",             WebKitSerifFontPreferenceKey,
-        @"Lucida Grande",               WebKitSansSerifFontPreferenceKey,
+        @"Times",                       WebKitSerifFontPreferenceKey,
+        @"Helvetica",                   WebKitSansSerifFontPreferenceKey,
         @"Apple Chancery",              WebKitCursiveFontPreferenceKey,
         @"Papyrus",                     WebKitFantasyFontPreferenceKey,
         @"9",                           WebKitMinimumFontSizePreferenceKey,
-        @"14",                          WebKitDefaultFontSizePreferenceKey,
-        @"14", 				WebKitDefaultFixedFontSizePreferenceKey,
-	@"latin1", 		        WebKitDefaultTextEncodingNamePreferenceKey,
+        @"16",                          WebKitDefaultFontSizePreferenceKey,
+        @"13",                          WebKitDefaultFixedFontSizePreferenceKey,
+        @"latin1",                      WebKitDefaultTextEncodingNamePreferenceKey,
         @"1.00",                        WebKitInitialTimedLayoutDelayPreferenceKey,
         @"4096",                        WebKitInitialTimedLayoutSizePreferenceKey,
         @"1.00",                        WebKitResourceTimedLayoutDelayPreferenceKey,
@@ -98,14 +98,14 @@ NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotificatio
         [NSNumber numberWithBool:YES],  WebKitInitialTimedLayoutEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitResourceTimedLayoutEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitUserStyleSheetEnabledPreferenceKey,
-        @"",                    	WebKitUserStyleSheetLocationPreferenceKey,
+        @"",                            WebKitUserStyleSheetLocationPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitJavaEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitJavaScriptEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitPluginsEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitAllowAnimatedImagesPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitAllowAnimatedImageLoopingPreferenceKey,
-        [NSNumber numberWithBool:YES],	WebKitDisplayImagesKey,
+        [NSNumber numberWithBool:YES],  WebKitDisplayImagesKey,
         nil];
 
     [[NSUserDefaults standardUserDefaults] registerDefaults:dict];
diff --git a/WebKit/WebView.subproj/WebUserAgentSpoofTable.c b/WebKit/WebView.subproj/WebUserAgentSpoofTable.c
index f18b1e6..7538e58 100644
--- a/WebKit/WebView.subproj/WebUserAgentSpoofTable.c
+++ b/WebKit/WebView.subproj/WebUserAgentSpoofTable.c
@@ -1,7 +1,7 @@
 /* ANSI-C code produced by gperf version 2.7.2 */
 /* Command-line: gperf -CEot -L ANSI-C -k '*' -N _web_findSpoofTableEntry -F ,0 WebView.subproj/WebUserAgentSpoofTable.gperf  */
 struct UserAgentSpoofTableEntry { const char *name; UserAgentStringType type; };
-/* maximum key range = 21, duplicates = 0 */
+/* maximum key range = 26, duplicates = 0 */
 
 #ifdef __GNUC__
 __inline
@@ -15,32 +15,32 @@ hash (register const char *str, register unsigned int len)
 {
   static const unsigned char asso_values[] =
     {
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27,  0,  0, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27,  0, 10,  0,
-       0,  0,  0,  0,  0,  0,  0, 27,  0,  0,
-       0,  0,  0, 27,  0,  0, 10,  0,  0,  0,
-      27,  5,  0, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-      27, 27, 27, 27, 27, 27
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32,  5,  0, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32,  0, 10,  0,
+       0,  0,  0,  0,  0,  0,  0, 32,  0,  0,
+       0,  0,  0, 32,  0,  0, 10,  0,  0,  0,
+      32,  5,  0, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+      32, 32, 32, 32, 32, 32
     };
   register int hval = len;
 
@@ -100,11 +100,11 @@ _web_findSpoofTableEntry (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 15,
+      TOTAL_KEYWORDS = 14,
       MIN_WORD_LENGTH = 6,
       MAX_WORD_LENGTH = 20,
       MIN_HASH_VALUE = 6,
-      MAX_HASH_VALUE = 26
+      MAX_HASH_VALUE = 31
     };
 
   static const struct UserAgentSpoofTableEntry wordlist[] =
@@ -126,8 +126,9 @@ _web_findSpoofTableEntry (register const char *str, register unsigned int len)
       {"freebsd.org", MacIE},
       {"firstusa.com", MacIE},
       {"microsoft.com", MacIE},
-      {"abcnews.go.com", WinIE},
+      {"",0},
       {"wap.sonyericsson.com", MacIE},
+      {"",0}, {"",0}, {"",0}, {"",0}, {"",0},
       {"bang-olufsen.com", MacIE}
     };
 
diff --git a/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf b/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf
index bc9d42a..309a6c7 100644
--- a/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf
+++ b/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf
@@ -26,6 +26,3 @@ olympic.org, MacIE
 #
 # pretend to be Mac IE to avoid gzipped HTML which we don't support yet
 freebsd.org, MacIE
-#
-# pretend to be Win IE to get the smaller font sizes the site gives for Windows
-abcnews.go.com, WinIE

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list