Bug 8845

Summary: Add TextRun to the text drawing/measuring APIs.
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Patch.
none
Patch that fixes up FontWin as well. andersca: review+

Description Dave Hyatt 2006-05-11 02:33:43 PDT
This patch basically takes the concept of WebCoreTextRun and lifts it up into the actual API used by WebCore.
Comment 1 Dave Hyatt 2006-05-11 02:34:11 PDT
Created attachment 8234 [details]
Patch.
Comment 2 Dave Hyatt 2006-05-11 02:46:02 PDT
Created attachment 8235 [details]
Patch that fixes up FontWin as well.
Comment 3 Anders Carlsson 2006-05-11 03:00:22 PDT
Comment on attachment 8235 [details]
Patch that fixes up FontWin as well.

r=me
Comment 4 mitz 2006-05-11 03:01:41 PDT
(In reply to comment #2)
> Created an attachment (id=8235) [edit]

                 UChar spacePeriod[2] = { '.', ' ' };
-                int width = font.width(spacePeriod, 2);
-                p->drawText(marker.location(), " .");
-                p->drawText(marker.location() + IntSize(width, 0), m_item);
+                TextRun spacePeriodRun(spacePeriod, 2);

Looks like spacePeriod should be { ' ', '.' } (didn't matter before when it was only used for measuring). Can you check fast/lists in pixel mode?
Comment 5 Dave Hyatt 2006-05-11 03:07:13 PDT
Thanks mitz.  I fixed it.
Comment 6 Dave Hyatt 2006-05-11 03:19:55 PDT
Fixed.