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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:33:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 656f7eb2244e83996e88981e8c4e48f3a50d3c9f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 20 19:51:26 2002 +0000

    	- fixed 3023076 -- Strange font chosen, widths screwed up, when text includes 007F characters
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer convertCharacters:length:toGlyphs:skipControlCharacters:]):
            (-[WebTextRenderer _drawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withTextColor:backgroundColor:]):
            (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
    	Treat 007F as a control character, skipping it just as we do other control characters.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e199bff..8d6fdd0 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,15 @@
 2002-08-20  Darin Adler  <darin at apple.com>
 
+	- fixed 3023076 -- Strange font chosen, widths screwed up, when text includes 007F characters
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer convertCharacters:length:toGlyphs:skipControlCharacters:]):
+        (-[WebTextRenderer _drawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withTextColor:backgroundColor:]):
+        (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
+	Treat 007F as a control character, skipping it just as we do other control characters.
+
+2002-08-20  Darin Adler  <darin at apple.com>
+
         * WebView.subproj/WebController.m:
         (-[WebController setApplicationNameForUserAgent:]):
 	Lock in here, in anticipation of actually using the name in the
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e199bff..8d6fdd0 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,15 @@
 2002-08-20  Darin Adler  <darin at apple.com>
 
+	- fixed 3023076 -- Strange font chosen, widths screwed up, when text includes 007F characters
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer convertCharacters:length:toGlyphs:skipControlCharacters:]):
+        (-[WebTextRenderer _drawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withTextColor:backgroundColor:]):
+        (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
+	Treat 007F as a control character, skipping it just as we do other control characters.
+
+2002-08-20  Darin Adler  <darin at apple.com>
+
         * WebView.subproj/WebController.m:
         (-[WebController setApplicationNameForUserAgent:]):
 	Lock in here, in anticipation of actually using the name in the
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index b8ead75..e30660f 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -16,8 +16,10 @@
 
 #import <QD/ATSUnicodePriv.h>
 
-#define NON_BREAKING_SPACE 0xA0
-#define SPACE 0x20
+#define NON_BREAKING_SPACE 0x00A0
+#define SPACE 0x0020
+
+#define IS_CONTROL_CHARACTER(c) ((c) < 0x0020 || (c) == 0x007F)
 
 #define ROUND_TO_INT(x) (unsigned int)((x)+.5)
 
@@ -256,7 +258,8 @@ static BOOL bufferTextDrawing = NO;
     OSStatus status;
     
     for (i = 0; i < numCharacters; i++) {
-        if ((skipControlCharacters && characters[i] < 0x0020) || characters[i] == NON_BREAKING_SPACE) {
+        UniChar c = characters[i];
+        if ((skipControlCharacters && IS_CONTROL_CHARACTER(c)) || c == NON_BREAKING_SPACE) {
             break;
         }
     }
@@ -268,9 +271,10 @@ static BOOL bufferTextDrawing = NO;
         
         numCharactersInBuffer = 0;
         for (i = 0; i < numCharacters; i++) {
-            if (characters[i] == NON_BREAKING_SPACE) {
+            UniChar c = characters[i];
+            if (c == NON_BREAKING_SPACE) {
                 buffer[numCharactersInBuffer++] = SPACE;
-            } else if (!(skipControlCharacters && characters[i] < 0x0020)) {
+            } else if (!(skipControlCharacters && IS_CONTROL_CHARACTER(c))) {
                 buffer[numCharactersInBuffer++] = characters[i];
             }
         }
@@ -589,7 +593,7 @@ typedef enum {
         UniChar c = characters[i];
         
         // Skip control characters.
-        if (c < 0x0020) {
+        if (IS_CONTROL_CHARACTER(c)) {
             continue;
         }
 
@@ -777,7 +781,7 @@ cleanup:
         UniChar c = characters[i];
         
         // Skip control characters.
-        if (c < 0x0020) {
+        if (IS_CONTROL_CHARACTER(c)) {
             continue;
         }
         

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list