Bug 25299 - Don't bound caret to root line box if it is still inside its containing block
Summary: Don't bound caret to root line box if it is still inside its containing block
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Justin Garcia
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-04-20 14:24 PDT by Justin Garcia
Modified: 2009-04-20 15:31 PDT (History)
1 user (show)

See Also:


Attachments
patch (1.19 KB, patch)
2009-04-20 14:51 PDT, Justin Garcia
mitz: review+
Details | Formatted Diff | Diff

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