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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:52:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 1941c6e2ac4ed666b1041390a7183bf58a0a4322
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 19 00:09:34 2003 +0000

    	Fixed 3140065.  Bidi neutrals in RTL runs are now handled correctly.  Still have
    	problem with bidi neutrals at directional boundaries 3382926.
    
            Reviewed by Maciej.
    
            * Misc.subproj/WebUnicode.h:
            * Misc.subproj/WebUnicode.m:
            (shapedString):
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startGlyph:endGlyph:numGlyphs:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 304c4b4..f9996a4 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2003-08-18  Richard Williamson  <rjw at apple.com>
+
+	Fixed 3140065.  Bidi neutrals in RTL runs are now handled correctly.  Still have
+	problem with bidi neutrals at directional boundaries 3382926.
+
+        Reviewed by Maciej.
+
+        * Misc.subproj/WebUnicode.h:
+        * Misc.subproj/WebUnicode.m:
+        (shapedString):
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startGlyph:endGlyph:numGlyphs:]):
+
 2003-08-18  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebKit/Misc.subproj/WebUnicode.h b/WebKit/Misc.subproj/WebUnicode.h
index a3d5adf..9d61261 100644
--- a/WebKit/Misc.subproj/WebUnicode.h
+++ b/WebKit/Misc.subproj/WebUnicode.h
@@ -22,7 +22,7 @@ extern int symmetricPairsSize;
 extern const unsigned short * const case_info[];
 extern const unsigned short * const ligature_info[];
 extern const unsigned short ligature_map[];
-extern UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut);
+extern UniChar *shapedString(const WebCoreTextRun *run, int *lengthOut);
 
 #ifdef __cplusplus
 }
diff --git a/WebKit/Misc.subproj/WebUnicode.m b/WebKit/Misc.subproj/WebUnicode.m
index 02dc4e2..93b8b4f 100644
--- a/WebKit/Misc.subproj/WebUnicode.m
+++ b/WebKit/Misc.subproj/WebUnicode.m
@@ -621,7 +621,7 @@ bool initializeCharacterShapeIterator (CharacterShapeIterator *iterator, const W
     return true;
 }
 
-UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut)
+UniChar *shapedString(const WebCoreTextRun *run, int *lengthOut)
 {
     int len = run->to - run->from;
     int from = run->from;
@@ -634,9 +634,11 @@ UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut)
 	return 0;
     }
 
+    // Early out.  Only shape hebrew and arabic.  Hebrew is included
+    // for shaping mirror characters.
     int i;
     for (i = from; i < from+len; i++){
-        if (uc[i] >= 0x600 && uc[i] <= 0x700)
+        if (uc[i] >= 0x591 && uc[i] <= 0x700)
             break;
     }
     if (i == from+len)
@@ -668,8 +670,6 @@ UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut)
 
     int lenOut = 0;
     UniChar *data = shapeBuffer;
-    if ( dir == RTL )
-	ch += len - 1;
 
     for (i = 0; i < len; i++ ) {
 	UniChar r = WK_ROW(*ch);
@@ -684,7 +684,7 @@ UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut)
 			break;
 		}
 	    }
-	    if ( dir == RTL && _unicodeMirrored(*ch) )
+	    if ( _unicodeMirrored(*ch) )
 		*data = _unicodeMirroredChar(*ch);
 	    else
 		*data = *ch;
@@ -692,8 +692,6 @@ UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut)
 	    lenOut++;
 	} else {
 	    int pos = i + from;
-	    if ( dir == RTL )
-		pos = from + len - 1 - i;
 	    int shape = glyphVariantLogical( uc, stringLength, pos );
 	    ushort map;
 	    switch ( c ) {
@@ -730,41 +728,7 @@ UniChar *shapedString(const WebCoreTextRun *run, int dir, int *lengthOut)
 	    lenOut++;
 	}
     skip:
-	if ( dir == RTL )
-	    ch--;
-	else
-	    ch++;
-    }
-
-    if ( dir == RTL ) {
-	UniChar *s = shapeBuffer;
-	int i = 0;
-	while ( i < lenOut ) {
-	    if ( _unicodeCombiningClass(*s) != 0 ) {
-		int clen = 1;
-		UniChar *ch = s;
-		do {
-		    ch++;
-		    clen++;
-		} while ( _unicodeCombiningClass(*ch) != 0 );
-
-		int j = 0;
-		UniChar *cp = s;
-		while ( j < clen/2 ) {
-		    UniChar tmp = *cp;
-		    *cp = *ch;
-		    *ch = tmp;
-		    cp++;
-		    ch--;
-		    j++;
-		}
-		s += clen;
-		i += clen;
-	    } else {
-		s++;
-		i++;
-	    }
-	}
+        ch++;
     }
 
     *lengthOut = lenOut;
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index 0529587..0b6990b 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -1290,7 +1290,7 @@ static const char *joiningNames[] = {
         int lengthOut;
 
         // FIXME:  Change to use the new CharacterShapeIterator internal API.
-        shaped = shapedString (run, 0, &lengthOut);        
+        shaped = shapedString (run, &lengthOut);        
         if (shaped){
              if (run->length < LOCAL_BUFFER_SIZE)
                  munged = &_localMunged[0];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list