[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 08:21:24 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 535246c612420f6be903bb505af5a13a45666c2a
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 8 23:36:45 2004 +0000

    	Fixed 3524430.  This was a regression introduced when we added '-' and '?' to the word boundary detection.
    
    	Also backed out workaround for 3521759 as it's no longer needed with correct argument passing to ATSUPositionToOffset.
    
            Reviewed by Hyatt.
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:]):
            (widthForNextCharacter):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5873 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 04076f2..0b617e0 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2004-01-08  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3524430.  This was a regression introduced when we added '-' and '?' to the word boundary detection.
+
+	Also backed out workaround for 3521759 as it's no longer needed with correct argument passing to ATSUPositionToOffset.
+
+        Reviewed by Hyatt.
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:]):
+        (widthForNextCharacter):
+
 2004-01-08  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3522900>: REGRESSION (100-117): Java plug-in description is garbled when displaying Plug-ins.html
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index b7453f9..eb924b9 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -1588,29 +1588,9 @@ static WebCoreTextRun reverseCharactersInRun(const WebCoreTextRun *run)
         aRun = &swappedRun;
     }
 
-    // Work-around for bug (352175) in ATSUPositionToOffset().  ATSUPositionToOffset will
-    // always return a zero offset if a ATSUTextLayout is created with a non-zero
-    // starting character offset.
-    // The work-around creates a 'sub' run from the run with a starting position
-    // of 0 and creates a ATSUTextLayout with that 'sub' run.
-#define WORKAROUND_3521759 1
-#if WORKAROUND_3521759
-    WebCoreTextRun subRun;
-    if (run->from != 0) {
-        subRun.length = (aRun->length - aRun->from);
-        subRun.from = 0;
-        subRun.to = aRun->to - aRun->from;
-        subRun.characters = (UniChar *)malloc(sizeof(UniChar) * subRun.length);
-        memcpy ((void *)subRun.characters, &aRun->characters[aRun->from], sizeof(UniChar) * subRun.length);
-        aRun = &subRun;
-    }
-    else {
-        subRun.characters = 0;
-    }
-#endif
-    
     layout = [self _createATSUTextLayoutForRun:aRun];
 
+    primaryOffset = aRun->from;
     status = ATSUPositionToOffset(layout, FloatToFixed(x), FloatToFixed(-1), &primaryOffset, &isLeading, &secondaryOffset);
     if (status == noErr){
         offset = (unsigned)primaryOffset;
@@ -1623,12 +1603,7 @@ static WebCoreTextRun reverseCharactersInRun(const WebCoreTextRun *run)
         free ((void *)swappedRun.characters);
     }
 
-#if WORKAROUND_3521759
-    if (subRun.characters != run->characters)
-        free ((void *)subRun.characters);
-#endif
-
-    return offset;
+    return offset - aRun->from;
 }
 
 - (int)_CG_pointToOffset:(const WebCoreTextRun *)run style:(const WebCoreTextStyle *)style position:(int)x reversed:(BOOL)reversed
@@ -1971,6 +1946,12 @@ static float widthForNextCharacter(CharacterWidthIterator *iterator, ATSGlyphRef
     if (!*fontUsed)
         *fontUsed = renderer->font;
 
+    // Force characters that are used to determine word boundaries for the rounding hack
+    // to be integer width, so following words will start on an integer boundary.
+    if (isRoundingHackCharacter(c)) {
+        width = CEIL_TO_INT(width);
+    }
+    
     // Account for letter-spacing
     if (width > 0)
         width += iterator->style->letterSpacing;
@@ -1997,12 +1978,6 @@ static float widthForNextCharacter(CharacterWidthIterator *iterator, ATSGlyphRef
             width += iterator->style->wordSpacing;
     }
 
-    // Force characters that are used to determine word boundaries for the rounding hack
-    // to be integer width, so following words will start on an integer boundary.
-    if (isRoundingHackCharacter(c)) {
-        width = CEIL_TO_INT(width);
-    }
-    
     iterator->runWidthSoFar += width;
 
     // Advance past the character we just dealt with.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list