Bug 25299

Summary: Don't bound caret to root line box if it is still inside its containing block
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: Layout and RenderingAssignee: Justin Garcia <justin.garcia>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
patch mitz: review+

Description Justin Garcia 2009-04-20 14:24:13 PDT
In RTL, I think we should distribute odd caret widths more to the left than to the right, so that the caret doesn't overlap what is usually the just typed character.

Also in RTL, we shouldn't make the caret stay in the root line box in auto wrap modes, it should just be kept inside the containing block (like we do in non wrapping modes before the text wraps).

<rdar://problem/6804912>
Comment 1 mitz 2009-04-20 14:35:20 PDT
(In reply to comment #0)
> Also in RTL, we shouldn't make the caret stay in the root line box in auto wrap
> modes, it should just be kept inside the containing block (like we do in non
> wrapping modes before the text wraps).

I don't understand why there needs to be a different rule for RTL.
Comment 2 Justin Garcia 2009-04-20 14:37:10 PDT
>> Also in RTL, we shouldn't make the caret stay in the root line box in auto wrap
>> modes, it should just be kept inside the containing block (like we do in non
>> wrapping modes before the text wraps).

> I don't understand why there needs to be a different rule for RTL.

Sorry I was unclear.  I only mean that right now, we don't bound carets in LTR text to their root line box in auto wrap, only in RTL, so the fix only needs to happen in the RTL case.
Comment 3 mitz 2009-04-20 14:38:13 PDT
As for the caret width, I agree, but I think the definition of "in RTL" should not be too fine-grained: perhaps consider the block direction, but not individual text boxes'.
Comment 4 Justin Garcia 2009-04-20 14:46:45 PDT
Going to hold off on the caretWidth distribution change for now, since we think it may make us deviate from AppKit.
Comment 5 Justin Garcia 2009-04-20 14:51:25 PDT
Created attachment 29625 [details]
patch
Comment 6 Justin Garcia 2009-04-20 15:29:05 PDT
http://trac.webkit.org/changeset/42685
Comment 7 Justin Garcia 2009-04-20 15:31:12 PDT
Oops!  Made a big typo.  Fixed it in http://trac.webkit.org/changeset/42686