Bug 157790 - [GTK] Add WebKitWebView::caret/focus-position-changed signal
Summary: [GTK] Add WebKitWebView::caret/focus-position-changed signal
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-17 06:21 PDT by Milan Crha
Modified: 2016-05-18 10:31 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2016-05-17 06:21:25 PDT
It would be pretty handy to have "caret-position-changed"/"focus-position-changed" signals on the UIProcess side, thus on the WebKitWebView, to which one would be able to connect and listen for the changes on the caret position (the focus position is for the read-only WebView-s, when the Tab circles between focusable elements, like anchors, inputs and similar, but otherwise has the same meaning).

The idea for this signal is to help in case of the GNOME-related bug [1]. It asks for a way to allow the scrolling to be fully managed by the WebView owner, not by the WebView itself. For this the cursor/focus position change notifications are needed, to be able to properly scroll the content to the place where the user is focusing his/her interest.

I hope it's understood what I mean, but just in case, when tabbing between anchors/inputs/... inside the WebView the scrolled window should make sure that the currently focused anchor is shown in the view; similarly when moving the cursor when having a caret mode on, or when moving the cursor in the editor mode (contenteditable). It would be nice not only to receive the position of the cursor (x,y coordinates), but also the size of the focused area (width,height values), which can be [0,cursor-height] in case of the cursor and [anchor-width,anchor-height] in case of the selected anchor, and so on. Cursor movement inside an input element should be also notified (like when typing/moving inside a TextArea).

[1] https://bugzilla.gnome.org/show_bug.cgi?id=763863
Comment 1 Milan Crha 2016-05-18 10:31:14 PDT
I'm closing this, because it'll not be used in the Evolution. Read a detailed explanation at:
https://bugzilla.gnome.org/show_bug.cgi?id=763863#c10

Maybe someone would find useful anything like that, but as I'm not going to use it right now, then it doesn't make sense to maintain the code in the WebKitGTK+.