[webkit-changes] cvs commit: WebCore/layout-tests/fast/text/international bidi-CS-after-AN-expected.checksum bidi-CS-after-AN-expected.png bidi-CS-after-AN-expected.txt bidi-explicit-embedding-expected.checksum bidi-explicit-embedding-expected.png bidi-explicit-embedding-expected.txt bidi-fallback-font-weight-expected.checksum bidi-fallback-font-weight-expected.png bidi-fallback-font-weight-expected.txt bidi-override-expected.checksum bidi-override-expected.png bidi-override-expected.txt

Darin darin at opensource.apple.com
Sat Sep 24 06:18:56 PDT 2005


darin       05/09/24 06:18:55

  Modified:    .        ChangeLog
               WebCoreSupport.subproj WebTextRenderer.m
               .        ChangeLog
               layout-tests/css1/text_properties
                        text-transCapitalize-expected.checksum
                        text-transCapitalize-expected.png
                        text-transCapitalize-expected.txt
               layout-tests/fast/text/international
                        bidi-CS-after-AN-expected.checksum
                        bidi-CS-after-AN-expected.png
                        bidi-CS-after-AN-expected.txt
                        bidi-explicit-embedding-expected.checksum
                        bidi-explicit-embedding-expected.png
                        bidi-explicit-embedding-expected.txt
                        bidi-fallback-font-weight-expected.checksum
                        bidi-fallback-font-weight-expected.png
                        bidi-fallback-font-weight-expected.txt
                        bidi-override-expected.checksum
                        bidi-override-expected.png
                        bidi-override-expected.txt
  Added:       layout-tests/editing/pasteboard 3976872-expected.checksum
                        3976872-expected.png
               layout-tests/fast/text cg-vs-atsui-expected.checksum
                        cg-vs-atsui-expected.png cg-vs-atsui-expected.txt
                        cg-vs-atsui.html
  Log:
  WebCore:
  
          - added tests and updated results for WebKit ATSU text measurement change
  
          * layout-tests/fast/text/cg-vs-atsui.html: Added.
          * layout-tests/fast/text/cg-vs-atsui-expected.checksum: Added.
          * layout-tests/fast/text/cg-vs-atsui-expected.png: Added.
          * layout-tests/fast/text/cg-vs-atsui-expected.txt: Added.
  
          * layout-tests/css1/text_properties/text-transCapitalize-expected.checksum: Updated.
          * layout-tests/css1/text_properties/text-transCapitalize-expected.png: Updated.
          * layout-tests/css1/text_properties/text-transCapitalize-expected.txt: Updated.
          * layout-tests/fast/text/international/bidi-CS-after-AN-expected.checksum: Updated.
          * layout-tests/fast/text/international/bidi-CS-after-AN-expected.png: Updated.
          * layout-tests/fast/text/international/bidi-CS-after-AN-expected.txt: Updated.
          * layout-tests/fast/text/international/bidi-explicit-embedding-expected.checksum: Updated.
          * layout-tests/fast/text/international/bidi-explicit-embedding-expected.png: Updated.
          * layout-tests/fast/text/international/bidi-explicit-embedding-expected.txt: Updated.
          * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.checksum: Updated.
          * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.png: Updated.
          * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.txt: Updated.
          * layout-tests/fast/text/international/bidi-override-expected.checksum: Updated.
          * layout-tests/fast/text/international/bidi-override-expected.png: Updated.
          * layout-tests/fast/text/international/bidi-override-expected.txt: Updated.
  
          - added pixel results for this test
  
          * layout-tests/editing/pasteboard/3976872-expected.checksum: Added.
          * layout-tests/editing/pasteboard/3976872-expected.png: Added.
  
  WebKit:
  
          Reviewed, tweaked a tiny bit, and landed by Darin.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4940
            CG and ATSUI give different width to the same text
  
          * WebCoreSupport.subproj/WebTextRenderer.m:
          (overrideLayoutOperation): Added. ATSU callback to do the rounding.
          (-[WebTextRenderer _trapezoidForRun:style:atPoint:]): Use the new createATSULayoutParameters
          function instead of calling _createATSUTextLayoutForRun.
          (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Use createATSULayoutParameters,
          and also compute the width in a way that works for any direction combination.
          (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use createATSULayoutParameters.
          (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
          Use createATSULayoutParameters. Also put in code that seems to work around an ATSU bug.
          (createATSULayoutParameters): Added.
          (disposeATSULayoutParameters): Added.
  
  Revision  Changes    Path
  1.3331    +19 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3330
  retrieving revision 1.3331
  diff -u -r1.3330 -r1.3331
  --- ChangeLog	24 Sep 2005 12:05:15 -0000	1.3330
  +++ ChangeLog	24 Sep 2005 13:18:41 -0000	1.3331
  @@ -1,5 +1,24 @@
   2005-09-24  Mitz Pettel  <opendarwin.org at mitzpettel.com>
   
  +        Reviewed, tweaked a tiny bit, and landed by Darin.
  +
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4940
  +          CG and ATSUI give different width to the same text
  +
  +        * WebCoreSupport.subproj/WebTextRenderer.m:
  +        (overrideLayoutOperation): Added. ATSU callback to do the rounding.
  +        (-[WebTextRenderer _trapezoidForRun:style:atPoint:]): Use the new createATSULayoutParameters
  +        function instead of calling _createATSUTextLayoutForRun.
  +        (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Use createATSULayoutParameters,
  +        and also compute the width in a way that works for any direction combination.
  +        (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use createATSULayoutParameters.
  +        (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
  +        Use createATSULayoutParameters. Also put in code that seems to work around an ATSU bug.
  +        (createATSULayoutParameters): Added.
  +        (disposeATSULayoutParameters): Added.
  +
  +2005-09-24  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
           Reviewed by Dave.
           Landed by Darin.
   
  
  
  
  1.191     +147 -86   WebKit/WebCoreSupport.subproj/WebTextRenderer.m
  
  Index: WebTextRenderer.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
  retrieving revision 1.190
  retrieving revision 1.191
  diff -u -r1.190 -r1.191
  --- WebTextRenderer.m	24 Sep 2005 12:05:22 -0000	1.190
  +++ WebTextRenderer.m	24 Sep 2005 13:18:49 -0000	1.191
  @@ -133,6 +133,14 @@
       float padPerSpace;
   };
   
  +typedef struct
  +{
  +    WebTextRenderer *renderer;
  +    const WebCoreTextRun *run;
  +    const WebCoreTextStyle *style;
  +    ATSUTextLayout layout;
  +} ATSULayoutParameters;
  +
   // Internal API
   @interface WebTextRenderer (WebInternal)
   
  @@ -163,6 +171,8 @@
   
   - (BOOL)_setupFont;
   
  +- (ATSUTextLayout)_createATSUTextLayoutForRun:(const WebCoreTextRun *)run style:(const WebCoreTextStyle *)style;
  +
   // Small caps
   - (void)_setIsSmallCapsRenderer:(BOOL)flag;
   - (BOOL)_isSmallCapsRenderer;
  @@ -258,6 +268,66 @@
       return widthFromMap (renderer, map, glyph, font);
   }
   
  +static OSStatus overrideLayoutOperation(ATSULayoutOperationSelector iCurrentOperation, ATSULineRef iLineRef, UInt32 iRefCon, void *iOperationCallbackParameterPtr, ATSULayoutOperationCallbackStatus *oCallbackStatus)
  +{
  +    ATSULayoutParameters *params = (ATSULayoutParameters *)iRefCon;
  +    OSStatus status;
  +    ItemCount count;
  +    ATSLayoutRecord *layoutRecords;
  +    const WebCoreTextStyle *style = params->style;
  +
  +    if (style->applyWordRounding) {
  +        status = ATSUDirectGetLayoutDataArrayPtrFromLineRef(iLineRef, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, true, (void **)&layoutRecords, &count);
  +        if (status != noErr) {
  +            *oCallbackStatus = kATSULayoutOperationCallbackStatusContinue;
  +            return status;
  +        }
  +        
  +        // The CoreGraphics interpretation of NSFontAntialiasedIntegerAdvancementsRenderingMode seems
  +        // to be "round each glyph's width to the nearest integer". This is not the same as ATSUI
  +        // does in any of its device-metrics modes.
  +        Boolean roundEachGlyph = [params->renderer->font renderingMode] == NSFontAntialiasedIntegerAdvancementsRenderingMode;
  +        Fixed lastNativePos = 0;
  +        float lastAdjustedPos = 0;
  +        const WebCoreTextRun *run = params->run;
  +        const UniChar *characters = run->characters;
  +        WebTextRenderer *renderer = params->renderer;
  +        UniChar ch, nextCh;
  +        nextCh = *(UniChar *)(((char *)characters)+layoutRecords[0].originalOffset);
  +        // In the CoreGraphics code path, the rounding hack is applied in logical order.
  +        // Here it is applied in visual left-to-right order, which may be better.
  +        ItemCount i;
  +        for (i = 1; i < count; i++) {
  +            BOOL isLastChar = i == count - 1;
  +            ch = nextCh;
  +
  +            // Use space for nextCh at the end of the loop so that we get inside the rounding hack code.
  +            // We won't actually round unless the other conditions are satisfied.
  +            nextCh = isLastChar ? ' ' : *(UniChar *)(((char *)characters)+layoutRecords[i].originalOffset);
  +
  +            float width = FixedToFloat(layoutRecords[i].realPos - lastNativePos);
  +            lastNativePos = layoutRecords[i].realPos;
  +            if (roundEachGlyph)
  +                width = roundf(width);
  +            if (renderer->treatAsFixedPitch ? width == renderer->spaceWidth : (layoutRecords[i-1].flags & kATSGlyphInfoIsWhiteSpace))
  +                width = renderer->adjustedSpaceWidth;
  +            if (isRoundingHackCharacter(ch))
  +                width = ceilf(width);
  +            lastAdjustedPos = lastAdjustedPos + width;
  +            if (isRoundingHackCharacter(nextCh))
  +                if (!isLastChar
  +                        || (style->applyRunRounding && (run->length == 1 || run->to - run->from > 1))
  +                        || (run->to < (int)run->length && isRoundingHackCharacter(characters[run->to])))
  +                    lastAdjustedPos = ceilf(lastAdjustedPos);
  +            layoutRecords[i].realPos = FloatToFixed(lastAdjustedPos);
  +        }
  +        
  +        status = ATSUDirectReleaseLayoutDataArrayPtr(iLineRef, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, (void **)&layoutRecords);
  +    }
  +    *oCallbackStatus = kATSULayoutOperationCallbackStatusHandled;
  +    return noErr;
  +}
  +
   // Iterator functions
   static void initializeCharacterWidthIterator (CharacterWidthIterator *iterator, WebTextRenderer *renderer, const WebCoreTextRun *run , const WebCoreTextStyle *style);
   static float widthForNextCharacter (CharacterWidthIterator *iterator, ATSGlyphRef *glyphUsed, NSFont **fontUsed);
  @@ -267,6 +337,8 @@
   static BOOL fillStyleWithAttributes(ATSUStyle style, NSFont *theFont);
   static BOOL shouldUseATSU(const WebCoreTextRun *run);
   static NSString *pathFromFont(NSFont *font);
  +static void createATSULayoutParameters(ATSULayoutParameters *params, WebTextRenderer *renderer, const WebCoreTextRun *run , const WebCoreTextStyle *style);
  +static void disposeATSULayoutParameters(ATSULayoutParameters *params);
   
   
   // Globals
  @@ -1093,42 +1165,6 @@
       }
   }
   
  -#ifdef DEBUG_COMBINING
  -static const char *directionNames[] = {
  -        "DirectionL", 	// Left Letter 
  -        "DirectionR",	// Right Letter
  -        "DirectionEN",	// European Number
  -        "DirectionES",	// European Separator
  -        "DirectionET",	// European Terminator (post/prefix e.g. $ and %)
  -        "DirectionAN",	// Arabic Number
  -        "DirectionCS",	// Common Separator 
  -        "DirectionB", 	// Paragraph Separator (aka as PS)
  -        "DirectionS", 	// Segment Separator (TAB)
  -        "DirectionWS", 	// White space
  -        "DirectionON",	// Other Neutral
  -
  -	// types for explicit controls
  -        "DirectionLRE", 
  -        "DirectionLRO", 
  -
  -        "DirectionAL", 	// Arabic Letter (Right-to-left)
  -
  -        "DirectionRLE", 
  -        "DirectionRLO", 
  -        "DirectionPDF", 
  -
  -        "DirectionNSM", 	// Non-spacing Mark
  -        "DirectionBN"	// Boundary neutral (type of RLE etc after explicit levels)
  -};
  -
  -static const char *joiningNames[] = {
  -        "JoiningOther",
  -        "JoiningDual",
  -        "JoiningRight",
  -        "JoiningCausing"
  -};
  -#endif
  -
   - (float)_floatWidthForRun:(const WebCoreTextRun *)run style:(const WebCoreTextStyle *)style widths:(float *)widthBuffer fonts:(NSFont **)fontBuffer glyphs:(CGGlyph *)glyphBuffer startPosition:(float *)startPosition numGlyphs:(int *)_numGlyphs
   {
       if (shouldUseATSU(run))
  @@ -1450,6 +1486,7 @@
       UniCharArrayOffset substituteOffset;
       UniCharCount substituteLength;
       OSStatus status;
  +    ATSULayoutOperationOverrideSpecifier overrideSpecifier;
       
       [self _initializeATSUStyle];
       
  @@ -1471,14 +1508,15 @@
           FATAL_ALWAYS ("ATSUCreateTextLayoutWithTextPtr failed(%d)", status);
   
       CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
  -    ATSLineLayoutOptions lineLayoutOptions = (kATSLineFractDisable | kATSLineDisableAutoAdjustDisplayPos | kATSLineUseDeviceMetrics |
  -                                              kATSLineKeepSpacesOutOfMargin | kATSLineHasNoHangers);
  +    ATSLineLayoutOptions lineLayoutOptions = kATSLineKeepSpacesOutOfMargin | kATSLineHasNoHangers;
       Boolean rtl = style->rtl;
  -    ATSUAttributeTag tags[] = { kATSUCGContextTag, kATSULineLayoutOptionsTag, kATSULineDirectionTag };
  -    ByteCount sizes[] = { sizeof(CGContextRef), sizeof(ATSLineLayoutOptions), sizeof(Boolean)  };
  -    ATSUAttributeValuePtr values[] = { &cgContext, &lineLayoutOptions, &rtl };
  +    overrideSpecifier.operationSelector = kATSULayoutOperationPostLayoutAdjustment;
  +    overrideSpecifier.overrideUPP = overrideLayoutOperation;
  +    ATSUAttributeTag tags[] = { kATSUCGContextTag, kATSULineLayoutOptionsTag, kATSULineDirectionTag, kATSULayoutOperationOverrideTag };
  +    ByteCount sizes[] = { sizeof(CGContextRef), sizeof(ATSLineLayoutOptions), sizeof(Boolean), sizeof(ATSULayoutOperationOverrideSpecifier) };
  +    ATSUAttributeValuePtr values[] = { &cgContext, &lineLayoutOptions, &rtl, &overrideSpecifier };
       
  -    status = ATSUSetLayoutControls(layout, 3, tags, sizes, values);
  +    status = ATSUSetLayoutControls(layout, (style->applyWordRounding ? 4 : 3), tags, sizes, values);
       if(status != noErr)
           FATAL_ALWAYS ("ATSUSetLayoutControls failed(%d)", status);
   
  @@ -1516,18 +1554,19 @@
           return nilTrapezoid;
       }
           
  -    ATSUTextLayout layout = [self _createATSUTextLayoutForRun:run style:style];
  +    ATSULayoutParameters params;
  +    createATSULayoutParameters(&params, self, run, style);
   
       ATSTrapezoid firstGlyphBounds;
       ItemCount actualNumBounds;
  -    status = ATSUGetGlyphBounds (layout, FloatToFixed(p.x), FloatToFixed(p.y), run->from, run->to - run->from, kATSUseDeviceOrigins, 1, &firstGlyphBounds, &actualNumBounds);    
  +    status = ATSUGetGlyphBounds (params.layout, FloatToFixed(p.x), FloatToFixed(p.y), run->from, run->to - run->from, kATSUseFractionalOrigins, 1, &firstGlyphBounds, &actualNumBounds);    
       if(status != noErr)
           FATAL_ALWAYS ("ATSUGetGlyphBounds() failed(%d)", status);
       
       if (actualNumBounds != 1)
           FATAL_ALWAYS ("unexpected result from ATSUGetGlyphBounds():  actualNumBounds(%d) != 1", actualNumBounds);
   
  -    ATSUDisposeTextLayout (layout); // Ignore the error.  Nothing we can do anyway.
  +    disposeATSULayoutParameters(&params);
               
       return firstGlyphBounds;
   }
  @@ -1588,7 +1627,6 @@
       // plus the self calls to _createATSUTextLayoutForRun: and
       // _trapezoidForRun:. These are all exception-safe.
   
  -    ATSUTextLayout layout;
       int from, to;
       float selectedLeftX;
       const WebCoreTextRun *aRun = run;
  @@ -1617,43 +1655,40 @@
           return;
       }
   
  -    layout = [self _createATSUTextLayoutForRun:aRun style:style];
  -
  -    WebCoreTextRun leadingRun = *aRun;
  -    leadingRun.from = 0;
  -    leadingRun.to = run->from;
  -    
  -    // ATSU provides the bounds of the glyphs for the run with an origin of
  -    // (0,0), so we need to find the width of the glyphs immediately before
  -    // the actually selected glyphs.
  -    ATSTrapezoid leadingTrapezoid = [self _trapezoidForRun:&leadingRun style:style atPoint:geometry->point];
  -    ATSTrapezoid selectedTrapezoid = [self _trapezoidForRun:run style:style atPoint:geometry->point];
  -
  -    float backgroundWidth = 
  -            MAX(FixedToFloat(selectedTrapezoid.upperRight.x), FixedToFloat(selectedTrapezoid.lowerRight.x)) - 
  -            MIN(FixedToFloat(selectedTrapezoid.upperLeft.x), FixedToFloat(selectedTrapezoid.lowerLeft.x));
  +    WebCoreTextRun completeRun = *aRun;
  +    completeRun.from = 0;
  +    completeRun.to = aRun->length;
  +    ATSULayoutParameters params;
  +    createATSULayoutParameters(&params, self, &completeRun, style);
  +    ItemCount count;
  +    ATSLayoutRecord *layoutRecords;
  +    OSStatus status = ATSUDirectGetLayoutDataArrayPtrFromTextLayout(params.layout, 0, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, (void **)&layoutRecords, &count);
  +    if (status != noErr)
  +        FATAL_ALWAYS ("ATSUDirectGetLayoutDataArrayPtrFromTextLayout failed(%d)", status);
  +    ItemCount i = 0;
  +    if (!style->rtl)
  +        while (i < count && layoutRecords[i].originalOffset < sizeof(UniChar) * aRun->from)
  +            i++;
  +    else while (i < count && layoutRecords[i].originalOffset >= sizeof(UniChar) * aRun->to)
  +            i++;
  +    ItemCount j = i;
  +    if (!style->rtl)
  +        while (j < count - 1 && layoutRecords[j].originalOffset < sizeof(UniChar) * aRun->to)
  +            j++;
  +    else while (j < count - 1 && layoutRecords[j].originalOffset >= sizeof(UniChar) * aRun->from)
  +            j++;
  +    
  +    float backgroundWidth = FixedToFloat(layoutRecords[j].realPos - layoutRecords[i].realPos);
   
  -    if (run->from == 0)
  -        selectedLeftX = geometry->point.x;
  -    else
  -        selectedLeftX = MIN(FixedToFloat(leadingTrapezoid.upperRight.x), FixedToFloat(leadingTrapezoid.lowerRight.x));
  +    selectedLeftX = geometry->point.x + FixedToFloat(layoutRecords[i].realPos);
       
       [style->backgroundColor set];
   
       float yPos = geometry->useFontMetricsForSelectionYAndHeight ? geometry->point.y - [self ascent] : geometry->selectionY;
       float height = geometry->useFontMetricsForSelectionYAndHeight ? [self lineSpacing] : geometry->selectionHeight;
  -    if (style->rtl || style->directionalOverride){
  -        WebCoreTextRun completeRun = *aRun;
  -        completeRun.from = 0;
  -        completeRun.to = aRun->length;
  -        float completeRunWidth = [self floatWidthForRun:&completeRun style:style widths:0];
  -        [NSBezierPath fillRect:NSMakeRect(geometry->point.x + completeRunWidth - (selectedLeftX-geometry->point.x) - backgroundWidth, yPos, backgroundWidth, height)];
  -    }
  -    else {
  -        [NSBezierPath fillRect:NSMakeRect(selectedLeftX, yPos, backgroundWidth, height)];
  -    }
  +    [NSBezierPath fillRect:NSMakeRect(selectedLeftX, yPos, backgroundWidth, height)];
   
  -    ATSUDisposeTextLayout (layout); // Ignore the error.  Nothing we can do anyway.
  +    disposeATSULayoutParameters(&params);
   
       if (style->directionalOverride || (style->rtl && !ATSUMirrors))
           free ((void *)swappedRun.characters);
  @@ -1666,7 +1701,6 @@
       // calls to _createATSUTextLayoutForRun: and
       // _ATSU_drawHighlightForRun:. These are all exception-safe.
   
  -    ATSUTextLayout layout;
       OSStatus status;
       int from, to;
       const WebCoreTextRun *aRun = run;
  @@ -1691,7 +1725,11 @@
       if (runLength <= 0)
           return;
   
  -    layout = [self _createATSUTextLayoutForRun:aRun style:style];
  +    WebCoreTextRun completeRun = *aRun;
  +    completeRun.from = 0;
  +    completeRun.to = aRun->length;
  +    ATSULayoutParameters params;
  +    createATSULayoutParameters(&params, self, &completeRun, style);
   
       if (style->backgroundColor != nil)
           [self _ATSU_drawHighlightForRun:run style:style geometry:geometry];
  @@ -1701,7 +1739,7 @@
       // ATSUI can't draw beyond -32768 to +32767 so we translate the CTM and tell ATSUI to draw at (0, 0).
       CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
       CGContextTranslateCTM(context, geometry->point.x, geometry->point.y);
  -    status = ATSUDrawText(layout, aRun->from, runLength, 0, 0);
  +    status = ATSUDrawText(params.layout, aRun->from, runLength, 0, 0);
       CGContextTranslateCTM(context, -geometry->point.x, -geometry->point.y);
   
       if (status != noErr){
  @@ -1709,7 +1747,7 @@
           ERROR ("ATSUDrawText() failed(%d)", status);
       }
   
  -    ATSUDisposeTextLayout (layout); // Ignore the error.  Nothing we can do anyway.
  +    disposeATSULayoutParameters(&params);
       
       if (style->directionalOverride || (style->rtl && !ATSUMirrors))
           free ((void *)swappedRun.characters);
  @@ -1721,7 +1759,6 @@
       // _createATSUTextLayoutForRun:. This is exception-safe.
   
       unsigned offset = 0;
  -    ATSUTextLayout layout;
       UniCharArrayOffset primaryOffset = 0;
       UniCharArrayOffset secondaryOffset = 0;
       OSStatus status;
  @@ -1729,22 +1766,32 @@
       const WebCoreTextRun *aRun = run;
       WebCoreTextRun swappedRun;
       
  +    if (style->rtl && !style->directionalOverride) {
  +        // Work around ATSUPositionToOffset problem with e.g. Lucida Grande 14
  +        swappedRun = *run;
  +        swappedRun.characters += run->from;
  +        swappedRun.from = 0;
  +        swappedRun.to -= run->from;
  +        swappedRun.length -= run->from;
  +        aRun = &swappedRun;
  +    }
       // Enclose in LRO/RLO - PDF to force ATSU to render visually.
       if (style->directionalOverride) {
  -        swappedRun = addDirectionalOverride(run, style->rtl);
  +        swappedRun = addDirectionalOverride(aRun, style->rtl);
           aRun = &swappedRun;
       } else if (style->rtl && !ATSUMirrors) {
  -        swappedRun = applyMirroringToRun(run);
  +        swappedRun = applyMirroringToRun(aRun);
           aRun = &swappedRun;
       }
   
  -    layout = [self _createATSUTextLayoutForRun:aRun style:style];
  +    ATSULayoutParameters params;
  +    createATSULayoutParameters(&params, self, aRun, style);
   
       primaryOffset = aRun->from;
       
       // FIXME: No idea how to avoid including partial glyphs.   Not even sure if that's the behavior
       // this yields now.
  -    status = ATSUPositionToOffset(layout, FloatToFixed(x), FloatToFixed(-1), &primaryOffset, &isLeading, &secondaryOffset);
  +    status = ATSUPositionToOffset(params.layout, FloatToFixed(x), FloatToFixed(-1), &primaryOffset, &isLeading, &secondaryOffset);
       if (status == noErr){
           offset = (unsigned)primaryOffset;
       }
  @@ -1752,7 +1799,7 @@
           // Failed to find offset!  Return 0 offset.
       }
          
  -    ATSUDisposeTextLayout(layout);
  +    disposeATSULayoutParameters(&params);
       
       if (style->directionalOverride || (style->rtl && !ATSUMirrors)) {
           free ((void *)swappedRun.characters);
  @@ -1962,6 +2009,20 @@
           iterator->widthToStart = 0;
   }
   
  +static void createATSULayoutParameters(ATSULayoutParameters *params, WebTextRenderer *renderer, const WebCoreTextRun *run , const WebCoreTextStyle *style) 
  +{
  +    params->renderer = renderer;
  +    params->run = run;
  +    params->style = style;
  +    params->layout = [renderer _createATSUTextLayoutForRun:run style:style];
  +    ATSUSetTextLayoutRefCon(params->layout, (UInt32)params);
  +}
  +
  +static void disposeATSULayoutParameters(ATSULayoutParameters *params)
  +{
  +    ATSUDisposeTextLayout(params->layout);
  +}
  +
   static inline float ceilCurrentWidth (CharacterWidthIterator *iterator)
   {
       float totalWidth = iterator->widthToStart + iterator->runWidthSoFar;
  
  
  
  1.160     +30 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- ChangeLog	24 Sep 2005 11:55:53 -0000	1.159
  +++ ChangeLog	24 Sep 2005 13:18:49 -0000	1.160
  @@ -1,5 +1,35 @@
   2005-09-24  Darin Adler  <darin at apple.com>
   
  +        - added tests and updated results for WebKit ATSU text measurement change
  +
  +        * layout-tests/fast/text/cg-vs-atsui.html: Added.
  +        * layout-tests/fast/text/cg-vs-atsui-expected.checksum: Added.
  +        * layout-tests/fast/text/cg-vs-atsui-expected.png: Added.
  +        * layout-tests/fast/text/cg-vs-atsui-expected.txt: Added.
  +
  +        * layout-tests/css1/text_properties/text-transCapitalize-expected.checksum: Updated.
  +        * layout-tests/css1/text_properties/text-transCapitalize-expected.png: Updated.
  +        * layout-tests/css1/text_properties/text-transCapitalize-expected.txt: Updated.
  +        * layout-tests/fast/text/international/bidi-CS-after-AN-expected.checksum: Updated.
  +        * layout-tests/fast/text/international/bidi-CS-after-AN-expected.png: Updated.
  +        * layout-tests/fast/text/international/bidi-CS-after-AN-expected.txt: Updated.
  +        * layout-tests/fast/text/international/bidi-explicit-embedding-expected.checksum: Updated.
  +        * layout-tests/fast/text/international/bidi-explicit-embedding-expected.png: Updated.
  +        * layout-tests/fast/text/international/bidi-explicit-embedding-expected.txt: Updated.
  +        * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.checksum: Updated.
  +        * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.png: Updated.
  +        * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.txt: Updated.
  +        * layout-tests/fast/text/international/bidi-override-expected.checksum: Updated.
  +        * layout-tests/fast/text/international/bidi-override-expected.png: Updated.
  +        * layout-tests/fast/text/international/bidi-override-expected.txt: Updated.
  +
  +        - added pixel results for this test
  +
  +        * layout-tests/editing/pasteboard/3976872-expected.checksum: Added.
  +        * layout-tests/editing/pasteboard/3976872-expected.png: Added.
  +
  +2005-09-24  Darin Adler  <darin at apple.com>
  +
           - fixed a few layout test results
   
           * layout-tests/fast/js/date-big-constructor.html: Added code to make this test dump as text.
  
  
  
  1.2       +1 -1      WebCore/layout-tests/css1/text_properties/text-transCapitalize-expected.checksum
  
  Index: text-transCapitalize-expected.checksum
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/css1/text_properties/text-transCapitalize-expected.checksum,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- text-transCapitalize-expected.checksum	29 Aug 2005 05:54:59 -0000	1.1
  +++ text-transCapitalize-expected.checksum	24 Sep 2005 13:18:51 -0000	1.2
  @@ -1 +1 @@
  -27bdc5cd4908631f126385126d7b97f1
  \ No newline at end of file
  +ba1d50aa8af90d8bc3c3a777b7ba28f8
  \ No newline at end of file
  
  
  
  1.2       +282 -265  WebCore/layout-tests/css1/text_properties/text-transCapitalize-expected.png
  
  	<<Binary file>>
  
  
  1.3       +4 -4      WebCore/layout-tests/css1/text_properties/text-transCapitalize-expected.txt
  
  Index: text-transCapitalize-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/css1/text_properties/text-transCapitalize-expected.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- text-transCapitalize-expected.txt	18 Aug 2005 04:22:56 -0000	1.2
  +++ text-transCapitalize-expected.txt	24 Sep 2005 13:18:51 -0000	1.3
  @@ -101,8 +101,8 @@
                 RenderText {TEXT} at (18,2) size 16x18
                   text run at (18,2) width 16: "en"
               RenderTableCell {TD} at (57,110) size 710x58 [border: (1px solid #EEEEEE)] [r=3 c=1 rs=1 cs=1]
  -              RenderText {TEXT} at (2,2) size 426x18
  -                text run at (2,2) width 426: "'cept nut'in safari\x{2019}s \x{2018}sure\x{2019} nai\x{308}ve r\x{E9}sum\x{E9}\x{2014}h\x{E1}c\x{30C}ek full\x{2010}time one-to-one"
  +              RenderText {TEXT} at (2,2) size 427x18
  +                text run at (2,2) width 427: "'cept nut'in safari\x{2019}s \x{2018}sure\x{2019} nai\x{308}ve r\x{E9}sum\x{E9}\x{2014}h\x{E1}c\x{30C}ek full\x{2010}time one-to-one"
                 RenderBR {BR} at (0,0) size 0x0
                 RenderText {TEXT} at (2,20) size 315x18
                   text run at (2,20) width 315: "\"newcastle\x{2011}upon\x{2011}tyne\" washington\x{2011}on\x{2011}the\x{2011}brazos"
  @@ -405,8 +405,8 @@
                 RenderText {TEXT} at (18,2) size 16x18
                   text run at (18,2) width 16: "en"
               RenderTableCell {TD} at (57,110) size 710x58 [border: (1px solid #EEEEEE)] [r=3 c=1 rs=1 cs=1]
  -              RenderText {TEXT} at (2,2) size 458x18
  -                text run at (2,2) width 458: "'Cept Nut'in Safari\x{2019}s \x{2018}Sure\x{2019} Nai\x{308}ve R\x{E9}sum\x{E9}\x{2014}h\x{E1}c\x{30C}ek Full\x{2010}time One-to-one"
  +              RenderText {TEXT} at (2,2) size 459x18
  +                text run at (2,2) width 459: "'Cept Nut'in Safari\x{2019}s \x{2018}Sure\x{2019} Nai\x{308}ve R\x{E9}sum\x{E9}\x{2014}h\x{E1}c\x{30C}ek Full\x{2010}time One-to-one"
                 RenderBR {BR} at (0,0) size 0x0
                 RenderText {TEXT} at (2,20) size 322x18
                   text run at (2,20) width 322: "\"Newcastle\x{2011}upon\x{2011}tyne\" Washington\x{2011}on\x{2011}the\x{2011}brazos"
  
  
  
  1.1                  WebCore/layout-tests/editing/pasteboard/3976872-expected.checksum
  
  Index: 3976872-expected.checksum
  ===================================================================
  b8bdec16bc9564a41d0016964b5094f0
  
  
  1.1                  WebCore/layout-tests/editing/pasteboard/3976872-expected.png
  
  	<<Binary file>>
  
  
  1.1                  WebCore/layout-tests/fast/text/cg-vs-atsui-expected.checksum
  
  Index: cg-vs-atsui-expected.checksum
  ===================================================================
  db87183aa6972e5129ad8e8459ff55e5
  
  
  1.1                  WebCore/layout-tests/fast/text/cg-vs-atsui-expected.png
  
  	<<Binary file>>
  
  
  1.1                  WebCore/layout-tests/fast/text/cg-vs-atsui-expected.txt
  
  Index: cg-vs-atsui-expected.txt
  ===================================================================
  layer at (0,0) size 800x600
    RenderCanvas at (0,0) size 800x600
  layer at (0,0) size 800x374
    RenderBlock {HTML} at (0,0) size 800x374
      RenderBody {BODY} at (8,8) size 784x358
        RenderBlock {DIV} at (0,0) size 784x182
          RenderBlock {P} at (4,0) size 776x27
            RenderInline {SPAN} at (0,0) size 283x29 [border: (1px solid #FF0000)]
              RenderText {TEXT} at (1,0) size 281x27
                text run at (1,0) width 281: "mmm mmm mmm mmm"
            RenderText {TEXT} at (0,0) size 0x0
          RenderBlock {P} at (4,31) size 776x27
            RenderInline {SPAN} at (0,0) size 283x29 [border: (1px solid #FF0000)]
              RenderText {TEXT} at (1,0) size 281x27
                text run at (1,0) width 281: "mmm mmm\x{300} mmm mmm"
            RenderText {TEXT} at (0,0) size 0x0
          RenderBlock {P} at (4,62) size 776x27
            RenderInline {SPAN} at (0,0) size 281x27
              RenderText {TEXT} at (0,0) size 281x27
                text run at (0,0) width 281: "mmm mmm\x{300} mmm mmm"
            RenderText {TEXT} at (281,0) size 288x27
              text run at (281,0) width 288: " mmm mmm mmm mmm"
          RenderBlock {P} at (4,93) size 776x27
            RenderInline {SPAN} at (0,0) size 425x27
              RenderText {TEXT} at (0,0) size 425x27
                text run at (0,0) width 425: "mmm mmm\x{300} mmm mmm mmm mmm"
            RenderText {TEXT} at (425,0) size 144x27
              text run at (425,0) width 144: " mmm mmm"
          RenderBlock {P} at (4,124) size 776x27
            RenderInline {SPAN} at (0,0) size 281x27
              RenderText {TEXT} at (0,0) size 281x27
                text run at (0,0) width 281: "mmm mmm mmm mmm"
            RenderText {TEXT} at (281,0) size 288x27
              text run at (281,0) width 288: " mmm mmm mmm mmm"
          RenderBlock {P} at (4,155) size 776x27
            RenderInline {SPAN} at (0,0) size 425x27
              RenderText {TEXT} at (0,0) size 425x27
                text run at (0,0) width 425: "mmm mmm mmm mmm mmm mmm"
            RenderText {TEXT} at (425,0) size 144x27
              text run at (425,0) width 144: " mmm mmm"
        RenderBlock {HR} at (0,190) size 784x2 [border: (1px inset #000000)]
        RenderBlock {DIV} at (0,200) size 784x158
          RenderBlock {P} at (4,0) size 776x23
            RenderInline {SPAN} at (0,0) size 224x25 [border: (1px solid #008000)]
              RenderText {TEXT} at (1,0) size 222x23
                text run at (1,0) width 222: "mmm mmm mmm mmm"
            RenderText {TEXT} at (0,0) size 0x0
          RenderBlock {P} at (4,27) size 776x23
            RenderInline {SPAN} at (0,0) size 224x25 [border: (1px solid #008000)]
              RenderText {TEXT} at (1,0) size 222x23
                text run at (1,0) width 222: "mmm mmm\x{300} mmm mmm"
            RenderText {TEXT} at (0,0) size 0x0
          RenderBlock {P} at (4,54) size 776x23
            RenderInline {SPAN} at (0,0) size 222x23
              RenderText {TEXT} at (0,0) size 222x23
                text run at (0,0) width 222: "mmm mmm\x{300} mmm mmm"
            RenderText {TEXT} at (222,0) size 228x23
              text run at (222,0) width 228: " mmm mmm mmm mmm"
          RenderBlock {P} at (4,81) size 776x23
            RenderInline {SPAN} at (0,0) size 336x23
              RenderText {TEXT} at (0,0) size 336x23
                text run at (0,0) width 336: "mmm mmm\x{300} mmm mmm mmm mmm"
            RenderText {TEXT} at (336,0) size 114x23
              text run at (336,0) width 114: " mmm mmm"
          RenderBlock {P} at (4,108) size 776x23
            RenderInline {SPAN} at (0,0) size 222x23
              RenderText {TEXT} at (0,0) size 222x23
                text run at (0,0) width 222: "mmm mmm mmm mmm"
            RenderText {TEXT} at (222,0) size 228x23
              text run at (222,0) width 228: " mmm mmm mmm mmm"
          RenderBlock {P} at (4,135) size 776x23
            RenderInline {SPAN} at (0,0) size 336x23
              RenderText {TEXT} at (0,0) size 336x23
                text run at (0,0) width 336: "mmm mmm mmm mmm mmm mmm"
            RenderText {TEXT} at (336,0) size 114x23
              text run at (336,0) width 114: " mmm mmm"
  
  
  
  1.1                  WebCore/layout-tests/fast/text/cg-vs-atsui.html
  
  Index: cg-vs-atsui.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  "http://www.w3.org/TR/html4/loose.dtd">
  <HTML><HEAD><TITLE>CG vs ATSUI</TITLE>
  <style type="text/css">
  p { margin:4px; }
  </style>
  </HEAD><body>
  <div  style="font-family:'Lucida Grande'; font-size:23px;">
  <!-- tighter in ATSU -->
  <p>
  <span style="border:solid red 1px;">mmm mmm mmm mmm</span>
  </p>
  <!-- box too long in CG -->
  <p>
  <span style="border:solid red 1px;">mmm mmm&#x0300; mmm mmm</span>
  </p>
  <!-- the above two aren't the same width in CG -->
  <!-- uneven spacing in the following two in CG -->
  <p>
  <span>mmm mmm&#x0300; mmm mmm</span> mmm mmm mmm mmm
  </p>
  <p>
  <span>mmm mmm&#x0300; mmm mmm mmm mmm</span> mmm mmm
  </p>
  <p>
  <span>mmm mmm mmm mmm</span> mmm mmm mmm mmm
  </p>
  <p>
  <span>mmm mmm mmm mmm mmm mmm</span> mmm mmm
  </p>
  </div>
  <hr>
  <div  style="font-family:'Helvetica'; font-size:20px;">
  <!-- tighter in ATSU -->
  <p>
  <span style="border:solid green 1px;">mmm mmm mmm mmm</span>
  </p>
  <!-- box too long in CG -->
  <p>
  <span style="border:solid green 1px;">mmm mmm&#x0300; mmm mmm</span>
  </p>
  <!-- the above two aren't the same width in CG -->
  <!-- uneven spacing in the following two in CG -->
  <p>
  <span>mmm mmm&#x0300; mmm mmm</span> mmm mmm mmm mmm
  </p>
  <p>
  <span>mmm mmm&#x0300; mmm mmm mmm mmm</span> mmm mmm
  </p>
  <p>
  <span>mmm mmm mmm mmm</span> mmm mmm mmm mmm
  </p>
  <p>
  <span>mmm mmm mmm mmm mmm mmm</span> mmm mmm
  </p>
  </div>
  
  </body></html>
  
  
  
  1.2       +1 -1      WebCore/layout-tests/fast/text/international/bidi-CS-after-AN-expected.checksum
  
  Index: bidi-CS-after-AN-expected.checksum
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-CS-after-AN-expected.checksum,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-CS-after-AN-expected.checksum	29 Aug 2005 05:59:46 -0000	1.1
  +++ bidi-CS-after-AN-expected.checksum	24 Sep 2005 13:18:53 -0000	1.2
  @@ -1 +1 @@
  -3d789c15411c44e281ae368fcb6d4e3e
  \ No newline at end of file
  +79ba526a363fefed10261544c8615661
  \ No newline at end of file
  
  
  
  1.2       +2 -7      WebCore/layout-tests/fast/text/international/bidi-CS-after-AN-expected.png
  
  	<<Binary file>>
  
  
  1.2       +4 -4      WebCore/layout-tests/fast/text/international/bidi-CS-after-AN-expected.txt
  
  Index: bidi-CS-after-AN-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-CS-after-AN-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-CS-after-AN-expected.txt	25 Jun 2005 04:47:05 -0000	1.1
  +++ bidi-CS-after-AN-expected.txt	24 Sep 2005 13:18:53 -0000	1.2
  @@ -7,7 +7,7 @@
           RenderText {TEXT} at (0,0) size 471x18
             text run at (0,0) width 471: "The following should look like: Arabic characters 123.4 Arabic characters."
         RenderBlock {P} at (0,34) size 784x18
  -        RenderText {TEXT} at (0,0) size 74x18
  -          text run at (0,0) width 18: " \x{644}\x{645}\x{646}"
  -          text run at (18,0) width 36: "123.4"
  -          text run at (54,0) width 20: "\x{627}\x{628}\x{62C} "
  +        RenderText {TEXT} at (0,0) size 73x18
  +          text run at (0,0) width 17: " \x{644}\x{645}\x{646}"
  +          text run at (17,0) width 36: "123.4"
  +          text run at (53,0) width 20: "\x{627}\x{628}\x{62C} "
  
  
  
  1.2       +1 -1      WebCore/layout-tests/fast/text/international/bidi-explicit-embedding-expected.checksum
  
  Index: bidi-explicit-embedding-expected.checksum
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-explicit-embedding-expected.checksum,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-explicit-embedding-expected.checksum	29 Aug 2005 05:59:47 -0000	1.1
  +++ bidi-explicit-embedding-expected.checksum	24 Sep 2005 13:18:53 -0000	1.2
  @@ -1 +1 @@
  -cf131f555487961e42a72b13c7b810d7
  \ No newline at end of file
  +1b9ea20a9719b33f135233235869f178
  \ No newline at end of file
  
  
  
  1.2       +81 -62    WebCore/layout-tests/fast/text/international/bidi-explicit-embedding-expected.png
  
  	<<Binary file>>
  
  
  1.2       +30 -30    WebCore/layout-tests/fast/text/international/bidi-explicit-embedding-expected.txt
  
  Index: bidi-explicit-embedding-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-explicit-embedding-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-explicit-embedding-expected.txt	25 Jun 2005 05:17:33 -0000	1.1
  +++ bidi-explicit-embedding-expected.txt	24 Sep 2005 13:18:53 -0000	1.2
  @@ -9,28 +9,28 @@
             text run at (0,18) width 748: "bracket should be a left bracket and the parenthesis should be a right parenthesis. In each line,"
             text run at (0,36) width 600: "Roman characters and digits should be in increasing order from left to right."
         RenderBlock {P} at (0,70) size 784x18
  -        RenderText {TEXT} at (0,0) size 61x18
  -          text run at (0,0) width 26: "\x{5D0}\x{5D1}\x{5D2}"
  -          text run at (26,0) width 30: " def"
  -          text run at (56,0) width 5: " "
  -        RenderInline {SPAN} at (0,0) size 37x18
  -          RenderText {TEXT} at (61,0) size 37x18
  -            text run at (61,0) width 6: "]"
  -            text run at (67,0) width 31: "(\x{5D6}\x{5D7}\x{5D8}"
  -        RenderText {TEXT} at (98,0) size 24x18
  -          text run at (98,0) width 24: " jkl"
  +        RenderText {TEXT} at (0,0) size 62x18
  +          text run at (0,0) width 27: "\x{5D0}\x{5D1}\x{5D2}"
  +          text run at (27,0) width 30: " def"
  +          text run at (57,0) width 5: " "
  +        RenderInline {SPAN} at (0,0) size 39x18
  +          RenderText {TEXT} at (62,0) size 39x18
  +            text run at (62,0) width 6: "]"
  +            text run at (68,0) width 33: "(\x{5D6}\x{5D7}\x{5D8}"
  +        RenderText {TEXT} at (101,0) size 24x18
  +          text run at (101,0) width 24: " jkl"
         RenderBlock {P} at (0,104) size 784x18
  -        RenderText {TEXT} at (0,0) size 61x18
  -          text run at (0,0) width 26: "\x{5D0}\x{5D1}\x{5D2}"
  -          text run at (26,0) width 30: " def"
  -          text run at (56,0) width 5: " "
  +        RenderText {TEXT} at (0,0) size 62x18
  +          text run at (0,0) width 27: "\x{5D0}\x{5D1}\x{5D2}"
  +          text run at (27,0) width 30: " def"
  +          text run at (57,0) width 5: " "
           RenderInline {SPAN} at (0,0) size 36x18
  -          RenderText {TEXT} at (61,0) size 36x18
  -            text run at (61,0) width 6: "]"
  -            text run at (67,0) width 25: "ghi"
  -            text run at (92,0) width 5: "("
  -        RenderText {TEXT} at (97,0) size 24x18
  -          text run at (97,0) width 24: " jkl"
  +          RenderText {TEXT} at (62,0) size 36x18
  +            text run at (62,0) width 6: "]"
  +            text run at (68,0) width 25: "ghi"
  +            text run at (93,0) width 5: "("
  +        RenderText {TEXT} at (98,0) size 24x18
  +          text run at (98,0) width 24: " jkl"
         RenderBlock {P} at (0,138) size 784x18
           RenderText {TEXT} at (0,0) size 33x18
             text run at (0,0) width 28: "abc"
  @@ -110,19 +110,19 @@
             text run at (54,0) width 6: "\x{202B}("
             text run at (60,0) width 0: "\x{202C}"
         RenderBlock {P} at (0,410) size 784x18
  -        RenderInline {SPAN} at (0,0) size 100x18
  -          RenderText {TEXT} at (0,0) size 100x18
  +        RenderInline {SPAN} at (0,0) size 101x18
  +          RenderText {TEXT} at (0,0) size 101x18
               text run at (0,0) width 6: "]"
               text run at (6,0) width 28: "abc"
  -            text run at (34,0) width 36: " \x{5D0}\x{5D1}\x{5D2} "
  -            text run at (70,0) width 25: "def"
  -            text run at (95,0) width 5: "("
  +            text run at (34,0) width 37: " \x{5D0}\x{5D1}\x{5D2} "
  +            text run at (71,0) width 25: "def"
  +            text run at (96,0) width 5: "("
           RenderText {TEXT} at (0,0) size 0x0
         RenderBlock {P} at (0,444) size 784x18
  -        RenderText {TEXT} at (0,0) size 100x18
  +        RenderText {TEXT} at (0,0) size 101x18
             text run at (0,0) width 5: "]"
             text run at (5,0) width 28: "abc"
  -          text run at (33,0) width 36: " \x{5D0}\x{5D1}\x{5D2} "
  -          text run at (69,0) width 25: "def"
  -          text run at (94,0) width 6: "\x{202B}("
  -          text run at (100,0) width 0: "\x{202C}"
  +          text run at (33,0) width 37: " \x{5D0}\x{5D1}\x{5D2} "
  +          text run at (70,0) width 25: "def"
  +          text run at (95,0) width 6: "\x{202B}("
  +          text run at (101,0) width 0: "\x{202C}"
  
  
  
  1.3       +1 -1      WebCore/layout-tests/fast/text/international/bidi-fallback-font-weight-expected.checksum
  
  Index: bidi-fallback-font-weight-expected.checksum
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-fallback-font-weight-expected.checksum,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- bidi-fallback-font-weight-expected.checksum	1 Sep 2005 04:44:23 -0000	1.2
  +++ bidi-fallback-font-weight-expected.checksum	24 Sep 2005 13:18:53 -0000	1.3
  @@ -1 +1 @@
  -b1a7ef38979f36cc2a5bd705c96739f5
  \ No newline at end of file
  +9dfbdc8b3f076aa9c2386eb14a62ac90
  \ No newline at end of file
  
  
  
  1.3       +51 -60    WebCore/layout-tests/fast/text/international/bidi-fallback-font-weight-expected.png
  
  	<<Binary file>>
  
  
  1.3       +7 -7      WebCore/layout-tests/fast/text/international/bidi-fallback-font-weight-expected.txt
  
  Index: bidi-fallback-font-weight-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-fallback-font-weight-expected.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- bidi-fallback-font-weight-expected.txt	1 Sep 2005 04:44:23 -0000	1.2
  +++ bidi-fallback-font-weight-expected.txt	24 Sep 2005 13:18:53 -0000	1.3
  @@ -10,14 +10,14 @@
             text run at (345,0) width 439: " in the end should be in boldface (compare with the same letters in the"
             text run at (0,18) width 119: "middle of the line)."
         RenderBlock {P} at (0,52) size 784x18
  -        RenderText {TEXT} at (0,0) size 82x18
  +        RenderText {TEXT} at (0,0) size 83x18
             text run at (0,0) width 43: "abcd "
  -          text run at (43,0) width 34: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}"
  -          text run at (77,0) width 5: " "
  -        RenderInline {B} at (0,0) size 81x18
  -          RenderText {TEXT} at (82,0) size 81x18
  -            text run at (82,0) width 45: "abcd "
  -            text run at (127,0) width 36: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}"
  +          text run at (43,0) width 35: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}"
  +          text run at (78,0) width 5: " "
  +        RenderInline {B} at (0,0) size 82x18
  +          RenderText {TEXT} at (83,0) size 82x18
  +            text run at (83,0) width 45: "abcd "
  +            text run at (128,0) width 37: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}"
           RenderText {TEXT} at (0,0) size 0x0
         RenderBlock {P} at (0,86) size 784x18
           RenderText {TEXT} at (0,0) size 94x18
  
  
  
  1.2       +1 -1      WebCore/layout-tests/fast/text/international/bidi-override-expected.checksum
  
  Index: bidi-override-expected.checksum
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-override-expected.checksum,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-override-expected.checksum	24 Sep 2005 11:45:20 -0000	1.1
  +++ bidi-override-expected.checksum	24 Sep 2005 13:18:54 -0000	1.2
  @@ -1 +1 @@
  -ad17c03a922bba7971aa993ebd5aa407
  \ No newline at end of file
  +8eac9397664694929fe0778d3ba22fea
  \ No newline at end of file
  
  
  
  1.2       +94 -115   WebCore/layout-tests/fast/text/international/bidi-override-expected.png
  
  	<<Binary file>>
  
  
  1.2       +44 -44    WebCore/layout-tests/fast/text/international/bidi-override-expected.txt
  
  Index: bidi-override-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/text/international/bidi-override-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-override-expected.txt	24 Sep 2005 11:45:20 -0000	1.1
  +++ bidi-override-expected.txt	24 Sep 2005 13:18:54 -0000	1.2
  @@ -36,26 +36,26 @@
               RenderTableCell {TD} at (97,27) size 238x27 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
                 RenderText {TEXT} at (5,5) size 22x18
                   text run at (5,5) width 22: "abc"
  -              RenderInline {SPAN} at (0,0) size 65x18
  -                RenderText {TEXT} at (27,5) size 65x18
  -                  text run at (27,5) width 65: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  -              RenderText {TEXT} at (92,5) size 141x18
  -                text run at (92,5) width 20: "jkl "
  -                text run at (207,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
  +              RenderInline {SPAN} at (0,0) size 66x18
  +                RenderText {TEXT} at (27,5) size 66x18
  +                  text run at (27,5) width 66: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  +              RenderText {TEXT} at (93,5) size 141x18
  +                text run at (93,5) width 20: "jkl "
  +                text run at (208,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
                 RenderInline {SPAN} at (0,0) size 72x18
  -                RenderText {TEXT} at (135,5) size 72x18
  -                  text run at (135,5) width 72: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  -              RenderText {TEXT} at (112,5) size 23x18
  -                text run at (112,5) width 23: "\x{5D9}\x{5DB}\x{5DC}"
  +                RenderText {TEXT} at (136,5) size 72x18
  +                  text run at (136,5) width 72: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  +              RenderText {TEXT} at (113,5) size 23x18
  +                text run at (113,5) width 23: "\x{5D9}\x{5DB}\x{5DC}"
               RenderTableCell {TD} at (335,27) size 238x27 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
                 RenderText {TEXT} at (130,5) size 22x18
                   text run at (130,5) width 22: "abc"
  -              RenderInline {SPAN} at (0,0) size 65x18
  -                RenderText {TEXT} at (152,5) size 65x18
  -                  text run at (152,5) width 65: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  -              RenderText {TEXT} at (100,5) size 133x18
  +              RenderInline {SPAN} at (0,0) size 66x18
  +                RenderText {TEXT} at (152,5) size 66x18
  +                  text run at (152,5) width 66: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  +              RenderText {TEXT} at (100,5) size 134x18
                   text run at (100,5) width 30: " \x{5D0}\x{5D1}\x{5D2}"
  -                text run at (217,5) width 16: "jkl"
  +                text run at (218,5) width 16: "jkl"
                 RenderInline {SPAN} at (0,0) size 72x18
                   RenderText {TEXT} at (28,5) size 72x18
                     text run at (28,5) width 72: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  @@ -66,33 +66,33 @@
                 RenderText {TEXT} at (5,5) size 88x18
                   text run at (5,5) width 88: "CSS, children"
               RenderTableCell {TD} at (97,54) size 238x27 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
  -              RenderInline {SPAN} at (0,0) size 103x18
  +              RenderInline {SPAN} at (0,0) size 104x18
                   RenderText {TEXT} at (5,5) size 22x18
                     text run at (5,5) width 22: "abc"
  -                RenderInline {SPAN} at (0,0) size 65x18
  -                  RenderText {TEXT} at (27,5) size 65x18
  -                    text run at (27,5) width 65: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  -                RenderText {TEXT} at (92,5) size 16x18
  -                  text run at (92,5) width 16: "jkl"
  -              RenderText {TEXT} at (108,5) size 4x18
  -                text run at (108,5) width 4: " "
  +                RenderInline {SPAN} at (0,0) size 66x18
  +                  RenderText {TEXT} at (27,5) size 66x18
  +                    text run at (27,5) width 66: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  +                RenderText {TEXT} at (93,5) size 16x18
  +                  text run at (93,5) width 16: "jkl"
  +              RenderText {TEXT} at (109,5) size 4x18
  +                text run at (109,5) width 4: " "
                 RenderInline {SPAN} at (0,0) size 121x18
  -                RenderText {TEXT} at (207,5) size 26x18
  -                  text run at (207,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
  +                RenderText {TEXT} at (208,5) size 26x18
  +                  text run at (208,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
                   RenderInline {SPAN} at (0,0) size 72x18
  -                  RenderText {TEXT} at (135,5) size 72x18
  -                    text run at (135,5) width 72: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  -                RenderText {TEXT} at (112,5) size 23x18
  -                  text run at (112,5) width 23: "\x{5D9}\x{5DB}\x{5DC}"
  +                  RenderText {TEXT} at (136,5) size 72x18
  +                    text run at (136,5) width 72: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  +                RenderText {TEXT} at (113,5) size 23x18
  +                  text run at (113,5) width 23: "\x{5D9}\x{5DB}\x{5DC}"
               RenderTableCell {TD} at (335,54) size 238x27 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
  -              RenderInline {SPAN} at (0,0) size 103x18
  +              RenderInline {SPAN} at (0,0) size 104x18
                   RenderText {TEXT} at (130,5) size 22x18
                     text run at (130,5) width 22: "abc"
  -                RenderInline {SPAN} at (0,0) size 65x18
  -                  RenderText {TEXT} at (152,5) size 65x18
  -                    text run at (152,5) width 65: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  -                RenderText {TEXT} at (217,5) size 16x18
  -                  text run at (217,5) width 16: "jkl"
  +                RenderInline {SPAN} at (0,0) size 66x18
  +                  RenderText {TEXT} at (152,5) size 66x18
  +                    text run at (152,5) width 66: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
  +                RenderText {TEXT} at (218,5) size 16x18
  +                  text run at (218,5) width 16: "jkl"
                 RenderText {TEXT} at (126,5) size 4x18
                   text run at (126,5) width 4: " "
                 RenderInline {SPAN} at (0,0) size 121x18
  @@ -108,22 +108,22 @@
                 RenderText {TEXT} at (39,5) size 54x18
                   text run at (39,5) width 54: "Unicode"
               RenderTableCell {TD} at (97,81) size 238x27 [border: (1px solid #008000)] [r=3 c=1 rs=1 cs=1]
  -              RenderText {TEXT} at (5,5) size 228x18
  +              RenderText {TEXT} at (5,5) size 229x18
                   text run at (5,5) width 22: "abc"
  -                text run at (27,5) width 65: "\x{202E}ihg\x{5D0}\x{5D1}\x{5D2}fed"
  -                text run at (92,5) width 20: "\x{202C}jkl "
  -                text run at (112,5) width 23: "\x{202C}\x{5D9}\x{5DB}\x{5DC}"
  -                text run at (135,5) width 72: "\x{202D}\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  -                text run at (207,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
  +                text run at (27,5) width 66: "\x{202E}ihg\x{5D0}\x{5D1}\x{5D2}fed"
  +                text run at (93,5) width 20: "\x{202C}jkl "
  +                text run at (113,5) width 23: "\x{202C}\x{5D9}\x{5DB}\x{5DC}"
  +                text run at (136,5) width 72: "\x{202D}\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
  +                text run at (208,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
               RenderTableCell {TD} at (335,81) size 238x27 [border: (1px solid #008000)] [r=3 c=2 rs=1 cs=1]
  -              RenderText {TEXT} at (5,5) size 228x18
  +              RenderText {TEXT} at (5,5) size 229x18
                   text run at (5,5) width 23: "\x{202C}\x{5D9}\x{5DB}\x{5DC}"
                   text run at (28,5) width 72: "\x{202D}\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
                   text run at (100,5) width 26: "\x{5D0}\x{5D1}\x{5D2}"
                   text run at (126,5) width 4: " "
                   text run at (130,5) width 22: "abc"
  -                text run at (152,5) width 65: "\x{202E}ihg\x{5D0}\x{5D1}\x{5D2}fed"
  -                text run at (217,5) width 16: "\x{202C}jkl"
  +                text run at (152,5) width 66: "\x{202E}ihg\x{5D0}\x{5D1}\x{5D2}fed"
  +                text run at (218,5) width 16: "\x{202C}jkl"
         RenderBlock {P} at (0,158) size 784x18
           RenderText {TEXT} at (0,0) size 387x18
             text run at (0,0) width 387: "The CSS column should be identical to the reference column."
  
  
  



More information about the webkit-changes mailing list