[webkit-changes] cvs commit: WebKit/WebCoreSupport.subproj WebTextRenderer.m

Adele adele at opensource.apple.com
Thu Aug 25 17:04:13 PDT 2005


adele       05/08/25 17:04:13

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               WebCoreSupport.subproj Tag: Safari-2-0-branch
                        WebTextRenderer.m
  Log:
            Merged fix from TOT to Safari-2-0-branch
  
      2005-08-25  David Harrison  <harrison at apple.com>
  
            Reviewed by Maciej.
  
            <rdar://problem/4227734> Regression: WebCore selection bug on lines starting with tab (clownfish)
  
            The text is in a DIV styled with "white-space:pre", and uses newline characters as linebreaks.
            WebKit's text renderer is erroneously considering the width of the lines leading up to the tab
            character when calculating the width of the tab.
            Easily fixed by having widthForNextCharacter ignore the widthToStart when working with tabWidth.
            Any prior text that fits in the same line is already factored into the xpos, which is paid attention to.
  
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (widthForNextCharacter):
            Ignore the widthToStart when working with tabWidth.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3118.4.57 +20 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3118.4.56
  retrieving revision 1.3118.4.57
  diff -u -r1.3118.4.56 -r1.3118.4.57
  --- ChangeLog	25 Aug 2005 21:49:18 -0000	1.3118.4.56
  +++ ChangeLog	26 Aug 2005 00:04:08 -0000	1.3118.4.57
  @@ -2,6 +2,26 @@
   
   2005-08-25  Adele Peterson  <adele at apple.com>
   
  +          Merged fix from TOT to Safari-2-0-branch
  +
  +    2005-08-25  David Harrison  <harrison at apple.com>
  +
  +          Reviewed by Maciej.
  +
  +          <rdar://problem/4227734> Regression: WebCore selection bug on lines starting with tab (clownfish)
  +
  +          The text is in a DIV styled with "white-space:pre", and uses newline characters as linebreaks.
  +          WebKit's text renderer is erroneously considering the width of the lines leading up to the tab
  +          character when calculating the width of the tab.
  +          Easily fixed by having widthForNextCharacter ignore the widthToStart when working with tabWidth.
  +          Any prior text that fits in the same line is already factored into the xpos, which is paid attention to.
  +
  +          * WebCoreSupport.subproj/WebTextRenderer.m:
  +          (widthForNextCharacter):
  +          Ignore the widthToStart when working with tabWidth.
  +
  +2005-08-25  Adele Peterson  <adele at apple.com>
  +
           Reviewed by John.        
   
           Merged nil check for URLs from TOT
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.165.8.8 +1 -1      WebKit/WebCoreSupport.subproj/WebTextRenderer.m
  
  Index: WebTextRenderer.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
  retrieving revision 1.165.8.7
  retrieving revision 1.165.8.8
  diff -u -r1.165.8.7 -r1.165.8.8
  --- WebTextRenderer.m	23 Aug 2005 23:56:37 -0000	1.165.8.7
  +++ WebTextRenderer.m	26 Aug 2005 00:04:12 -0000	1.165.8.8
  @@ -2108,7 +2108,7 @@
       // Now that we have glyph and font, get its width.
       WebGlyphWidth width;
       if (style->tabWidth != 0.0F && c == '\t') {
  -        width = style->tabWidth - fmodf(style->xpos+iterator->widthToStart+iterator->runWidthSoFar, style->tabWidth);
  +        width = style->tabWidth - fmodf(style->xpos+iterator->runWidthSoFar, style->tabWidth);
       } else {
           width = widthForGlyph(renderer, _glyphUsed, _fontUsed);
           // We special case spaces in two ways when applying word rounding.
  
  
  



More information about the webkit-changes mailing list