WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
150390
[GTK][WK2] Expose GtkIMContext
https://bugs.webkit.org/show_bug.cgi?id=150390
Summary
[GTK][WK2] Expose GtkIMContext
Tomas Popela
Reported
2015-10-21 04:28:58 PDT
Expose the GtkIMContext in WebKit 2. Evolution is using it in composer (for saving the input history if inputs methods are active and for adding the input methods to the context menu).
Attachments
Patch
(2.67 KB, patch)
2015-10-21 04:37 PDT
,
Tomas Popela
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Tomas Popela
Comment 1
2015-10-21 04:37:28 PDT
Created
attachment 263673
[details]
Patch
WebKit Commit Bot
Comment 2
2015-10-21 04:39:55 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Martin Robinson
Comment 3
2015-10-21 06:59:53 PDT
Instead of exposing internal API, it would be worth considering how we can expose API to accomplish everything you need.
Carlos Garcia Campos
Comment 4
2015-10-21 08:56:01 PDT
(In reply to
comment #3
)
> Instead of exposing internal API, it would be worth considering how we can > expose API to accomplish everything you need.
I agree.
Tomas Popela
Comment 5
2015-10-22 00:22:34 PDT
(In reply to
comment #3
)
> Instead of exposing internal API, it would be worth considering how we can > expose API to accomplish everything you need.
OK, so we need to add two signals (the best place for it from Evolution' POV would be the WebProcess especially the WebKitWebEditor, but I didn't look if it is possible yet) that will mimic the GtkIMContext' preedit-start[0] and preedit-end signals[1]. The last thing was the gtk_im_multicontext_append_menuitems[2] functionality, but we decided that we won't include that code in WK2 port of Evolution. [0] -
https://developer.gnome.org/gtk3/stable/GtkIMContext.html#GtkIMContext-preedit-start
[1] -
https://developer.gnome.org/gtk3/stable/GtkIMContext.html#GtkIMContext-preedit-end
[2] -
https://developer.gnome.org/gtk3/stable/GtkIMMulticontext.html#gtk-im-multicontext-append-menuitems
Carlos Garcia Campos
Comment 6
2015-10-22 00:32:04 PDT
Instead of explaining how evolution uses the IM context, it would be better to explain what for. Understanding the use case is key to provide a good API.
Tomas Popela
Comment 7
2015-10-22 00:49:54 PDT
(In reply to
comment #6
)
> Instead of explaining how evolution uses the IM context, it would be better > to explain what for. Understanding the use case is key to provide a good API.
I already wrote that in the first post: "for saving the input history if inputs methods are active and for adding the input methods to the context menu" I will describe the first use case as: If there is an active input method and the user writes a text with it he usually needs to write a sequence of characters to get a desired character. The thing is that we have a callback on HTML "input" event, where we are saving the undo/redo history and this callback needs to be suppressed when there is active GtkIMContext's preedit phase. The second case is self-explanatory.
Tomas Popela
Comment 8
2015-12-07 12:34:37 PST
I'm closing this as Martin pointer me to [0] that perfectly fits our needs. [0] -
https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent
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