Bug 8100

Summary: REGRESSION (NativeTextField): Right-aligned and RTL text jitters in new text fields
Product: WebKit Reporter: mitz
Component: FormsAssignee: Darin Adler <darin>
Status: VERIFIED FIXED    
Severity: Normal CC: darin
Priority: P1 Keywords: Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Test case
none
Test case
none
Apply rounding on the left in RTL runs darin: review+

Description mitz 2006-03-31 02:33:40 PST
Summary: glyphs' horizontal positions slightly change as more text is entered into a right-aligned or RTL text field.

To reproduce:
1) Open the attached test case.
2) In the first text field, type lower-case "x"s. Watch the glyphs' positions as you add more "x"s.
3) In the second text field, type (or paste) Alephs. Watch the position of the last-typed Aleph as you type the next one.
4) From the Debug menu, choose Use ATSU For All Text, reload and repeat (in step 3, watch all Alephs).

I think these are artifacts of the "rounding hack". They can be observed in Mail too (and in other editable or dynamic HTML).

The right-aligned case is somewhat artificial, but the RTL case is a real problem.
Comment 1 mitz 2006-03-31 02:34:41 PST
Created attachment 7415 [details]
Test case
Comment 2 mitz 2006-03-31 02:36:22 PST
Created attachment 7416 [details]
Test case

Oops
Comment 3 mitz 2006-04-01 09:47:52 PST
Created attachment 7443 [details]
Apply rounding on the left in RTL runs

This patch addresses the RTL part of this bug. The right-aligned-LTR case (and the symmetric left-aligned-LTR case) are arguably non-issues. I think that in order to solve them, WebTextRenderer will need to know if the run is going anchored on the right or on the left, and use that instead of the rtl flag.

This patch affects the pixel results of all tests that include RTL test in Lucida Grande (and maybe other fractional-width fonts). Updated results will need to be generated and landed.
Comment 4 Darin Adler 2006-04-01 11:00:56 PST
Comment on attachment 7443 [details]
Apply rounding on the left in RTL runs

OK, r=me
Comment 5 Darin Adler 2006-04-02 19:02:24 PDT
(In reply to comment #3)
> This patch addresses the RTL part of this bug. The right-aligned-LTR case (and
> the symmetric left-aligned-LTR case) are arguably non-issues. I think that in
> order to solve them, WebTextRenderer will need to know if the run is going
> anchored on the right or on the left, and use that instead of the rtl flag.

Seems like the jittering *is* an issue in the right-aligned-LTR and left-aligned-RTL cases, although a much smaller one. Maybe we should have a second bug report about those.
Comment 6 Maciej Stachowiak 2006-04-02 23:25:41 PDT
These are all text field regressions so they should all be P1.