Bug 8845 - Add TextRun to the text drawing/measuring APIs.
Summary: Add TextRun to the text drawing/measuring APIs.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-11 02:33 PDT by Dave Hyatt
Modified: 2006-05-11 03:19 PDT (History)
0 users

See Also:


Attachments
Patch. (53.05 KB, patch)
2006-05-11 02:34 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch that fixes up FontWin as well. (58.82 KB, patch)
2006-05-11 02:46 PDT, Dave Hyatt
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.