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

David harrison at opensource.apple.com
Thu Aug 25 16:46:31 PDT 2005


harrison    05/08/25 16:46:31

  Modified:    .        ChangeLog
               WebCoreSupport.subproj WebTextRenderer.m
  Log:
          Reviewed by Maciej.
  
          <rdar://problem/4227734> Denver 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
  1.3305    +16 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3304
  retrieving revision 1.3305
  diff -u -r1.3304 -r1.3305
  --- ChangeLog	24 Aug 2005 00:34:54 -0000	1.3304
  +++ ChangeLog	25 Aug 2005 23:46:24 -0000	1.3305
  @@ -1,3 +1,19 @@
  +2005-08-25  David Harrison  <harrison at apple.com>
  +
  +        Reviewed by Maciej.
  +
  +        <rdar://problem/4227734> Denver 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-23  John Sullivan  <sullivan at apple.com>
   
           Reviewed by Beth Dakin.
  
  
  
  1.189     +1 -1      WebKit/WebCoreSupport.subproj/WebTextRenderer.m
  
  Index: WebTextRenderer.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -r1.188 -r1.189
  --- WebTextRenderer.m	23 Aug 2005 21:42:17 -0000	1.188
  +++ WebTextRenderer.m	25 Aug 2005 23:46:30 -0000	1.189
  @@ -2078,7 +2078,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