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

Darin darin at opensource.apple.com
Sat Sep 24 06:36:54 PDT 2005


darin       05/09/24 06:36:53

  Modified:    .        ChangeLog
               WebCoreSupport.subproj WebTextRenderer.m
  Log:
          Reviewed and landed by Darin.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5100
            -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
  
          * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
          Set up a the CGContext with a matrix that flips the text if the view is not flipped.
  
  Revision  Changes    Path
  1.3332    +10 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3331
  retrieving revision 1.3332
  diff -u -r1.3331 -r1.3332
  --- ChangeLog	24 Sep 2005 13:18:41 -0000	1.3331
  +++ ChangeLog	24 Sep 2005 13:36:50 -0000	1.3332
  @@ -1,5 +1,15 @@
   2005-09-24  Mitz Pettel  <opendarwin.org at mitzpettel.com>
   
  +        Reviewed and landed by Darin.
  +
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5100
  +          -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
  +
  +        * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
  +        Set up a the CGContext with a matrix that flips the text if the view is not flipped.
  +
  +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
  
  
  
  1.192     +6 -1      WebKit/WebCoreSupport.subproj/WebTextRenderer.m
  
  Index: WebTextRenderer.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
  retrieving revision 1.191
  retrieving revision 1.192
  diff -u -r1.191 -r1.192
  --- WebTextRenderer.m	24 Sep 2005 13:18:49 -0000	1.191
  +++ WebTextRenderer.m	24 Sep 2005 13:36:53 -0000	1.192
  @@ -997,7 +997,7 @@
           const float *matrix = [drawFont matrix];
           float flip = [v isFlipped] ? -1 : 1;
           CGContextSetTextMatrix(cgContext, CGAffineTransformMake(matrix[0], matrix[1] * flip, matrix[2], matrix[3] * flip, matrix[4], matrix[5]));
  -		WKSetCGFontRenderingMode(cgContext, drawFont);
  +        WKSetCGFontRenderingMode(cgContext, drawFont);
           CGContextSetFontSize(cgContext, 1.0F);
   
           [color set];
  @@ -1739,7 +1739,12 @@
       // 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);
  +    BOOL flipped = [[NSView focusView] isFlipped];
  +    if (!flipped)
  +        CGContextScaleCTM(context, 1.0, -1.0);
       status = ATSUDrawText(params.layout, aRun->from, runLength, 0, 0);
  +    if (!flipped)
  +        CGContextScaleCTM(context, 1.0, -1.0);
       CGContextTranslateCTM(context, -geometry->point.x, -geometry->point.y);
   
       if (status != noErr){
  
  
  



More information about the webkit-changes mailing list