Bug 8100 - REGRESSION (NativeTextField): Right-aligned and RTL text jitters in new text fields
Summary: REGRESSION (NativeTextField): Right-aligned and RTL text jitters in new text ...
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Darin Adler
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-03-31 02:33 PST by mitz
Modified: 2006-04-19 02:22 PDT (History)
1 user (show)

See Also:


Attachments
Test case (348 bytes, text/html)
2006-03-31 02:34 PST, mitz
no flags Details
Test case (367 bytes, text/html)
2006-03-31 02:36 PST, mitz
no flags Details
Apply rounding on the left in RTL runs (6.17 KB, patch)
2006-04-01 09:47 PST, mitz
darin: review+
Details | Formatted Diff | Diff

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