[webkit-changes] cvs commit: WebKit/WebCoreSupport.subproj
WebTextRenderer.m
Adele
adele at opensource.apple.com
Fri Aug 12 01:27:16 PDT 2005
adele 05/08/12 01:27:16
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
<rdar://problem/4205174> Hebrew or Arabic text on long pages becomes garbled
Revision Changes Path
No revision
No revision
1.3118.4.42 +16 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3118.4.41
retrieving revision 1.3118.4.42
diff -u -r1.3118.4.41 -r1.3118.4.42
--- ChangeLog 12 Aug 2005 01:53:23 -0000 1.3118.4.41
+++ ChangeLog 12 Aug 2005 08:27:11 -0000 1.3118.4.42
@@ -1,3 +1,19 @@
+2005-08-12 Adele Peterson <adele at apple.com>
+
+ Merged fix from TOT to Safari-2-0-branch
+ <rdar://problem/4205174> Hebrew or Arabic text on long pages becomes garbled
+
+ 2005-06-19 Darin Adler <darin at apple.com>
+
+ Changes by Mitz Pettel
+ Reviewed by me.
+
+ - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3466>
+ ATSUI text doesn't render at coordinates greater than 32K
+
+ * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
+ Translate the matrix of the CGContext instead of passing the appropriate coordinates to ATSU.
+
2005-08-11 Adele Peterson <adele at apple.com>
Merged fix from TOT to Safari-2-0-branch
No revision
No revision
1.165.8.4 +12 -3 WebKit/WebCoreSupport.subproj/WebTextRenderer.m
Index: WebTextRenderer.m
===================================================================
RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
retrieving revision 1.165.8.3
retrieving revision 1.165.8.4
diff -u -r1.165.8.3 -r1.165.8.4
--- WebTextRenderer.m 5 Aug 2005 18:02:06 -0000 1.165.8.3
+++ WebTextRenderer.m 12 Aug 2005 08:27:15 -0000 1.165.8.4
@@ -1673,10 +1673,11 @@
- (void)_ATSU_drawRun:(const WebCoreTextRun *)run style:(const WebCoreTextStyle *)style geometry:(const WebCoreTextGeometry *)geometry
{
- // The only Cocoa calls made here are to NSColor, plus the self
+ // The only Cocoa calls made here are to NSColor and NSGraphicsContext, plus the self
// calls to _createATSUTextLayoutForRun: and
// _ATSU_drawHighlightForRun:. These are all exception-safe.
+ CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
ATSUTextLayout layout;
OSStatus status;
int from, to;
@@ -1706,11 +1707,19 @@
[style->textColor set];
+ // ATSUI can't draw beyond (32768, 32768) so we translate the CTM and tell it to draw at (0, 0)
+
+ CGContextSaveGState( context );
+ CGContextTranslateCTM( context, geometry->point.x, geometry->point.y );
+
status = ATSUDrawText(layout,
aRun->from,
runLength,
- FloatToFixed(geometry->point.x), // these values are
- FloatToFixed(geometry->point.y)); // also of type Fixed
+ 0,
+ 0);
+
+ CGContextRestoreGState( context );
+
if (status != noErr){
// Nothing to do but report the error (dev build only).
ERROR ("ATSUDrawText() failed(%d)", status);
More information about the webkit-changes
mailing list