[Webkit-unassigned] [Bug 114819] New: Show a block caret for overtype mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 18 10:20:47 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=114819

           Summary: Show a block caret for overtype mode
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: svillar at igalia.com
                CC: rniwa at webkit.org


I've been taking a look at how to properly implement this. It's not enough with adjusting the caret size and position to cover the character located in the next offset because it does not get on well with bidi text. So rniwa suggested on the mailing list (see https://lists.webkit.org/pipermail/webkit-dev/2013-April/024650.html) to internally use a selection as it already deals with all the bidi text complexities.

Having an internal 1-char long selection is not a problem. The thing is how to properly show it to the user. We have two options I'd say:
1) modify the caret to cover the same area than the internal selection.
2) show the selection instead of the caret

Regarding 1) it's really complicated because the actual size and position of the selection is computed at rendering time if I'm not wrong (the code iterates over the RenderObjects covered by the selection to build the final LayoutRect), so it is not possible to get their position and size to be used to modify the caret.

I've explored option 2) as well. I think we can show the selection without exposing it to the JS world by setting the Frame into the internal FrameSelection object. This way the selection will be shown to the user but the one exposed to JS will remain the one linked to the Frame object.

Opinions, suggestions, corrections?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list