WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
16286
[GTK] API: Can WebView implement GtkEditable?
https://bugs.webkit.org/show_bug.cgi?id=16286
Summary
[GTK] API: Can WebView implement GtkEditable?
Alp Toker
Reported
2007-12-04 02:59:14 PST
From the docs: <snip> The GtkEditable interface is an interface which should be implemented by text editing widgets, such as GtkEntry and GtkText. It contains functions for generically manipulating an editable widget, a large number of action signals used for key bindings, and several signals that an application can connect to to modify the behavior of a widget. As an example of the latter usage, by connecting the following handler to "insert_text", an application can convert all entry into a widget into uppercase. </snip> We can implement some of the functions in this interface easily (eg. get/set editable). Others, taking integer indexes, may be difficult or impossible to map elegantly to the browser DOM, eg.: void gtk_editable_delete_text (GtkEditable *editable, gint start_pos, gint end_pos); The question is: (1) Can we elegantly implement this interface properly? (2) If not, is it worth partially implementing this interface, or would it be better to just skip it and do our own thing? Someone needs to do this research before we can move forward on this bug.
Attachments
Add attachment
proposed patch, testcase, etc.
Luca Bruno
Comment 1
2007-12-05 02:03:05 PST
The implementation of getting chars, the selection bounds, selecting and deleting the selection become simple enough using Range and the SelectionController. Inserting and deleting text won't be enabled at the moment, since we force the widget to be not editable as it should be.
Christian Dywan
Comment 2
2007-12-06 00:57:59 PST
While implementing GtkEditable is clearly desirable if we want to make the life of developers as agreeable as possible, I am not sure how much sense the integer values make in this context. This is especially difficult because selection can be related to the view or different kinds of contained elements and there is currently no way to find out what a "I can copy something right now" actually means. See also
bug 16144
.
Luca Bruno
Comment 3
2007-12-06 14:13:24 PST
GtkTextBuffer is the same of our WebView. They're a policy for getting text. We just return the text, not the html. If textbuffer can work with integers, we can too and it makes sense.
Alp Toker
Comment 4
2007-12-09 17:46:26 PST
I've discussed this with Owen Taylor, who worked on GtkTextView. He confirms that implementing GtkEditable wouldn't make much sense, especially in a browser widget: [01:36] <owen> alp: well, as the author of GtkEditable, I consider GtkEditable a mistake, and see no evidence that anybody has ever benifited from it.
Luca Bruno
Comment 5
2007-12-10 10:16:18 PST
Ok then, going straight without implementing it then is the best choice as i see.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug