Closed
Bug 931378
Opened 12 years ago
Closed 12 years ago
[GTK3] Set input-purpose to GtkIMContext
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: wengxt, Assigned: masayuki)
References
Details
(Keywords: inputmethod, Whiteboard: [bugday-20131028])
Attachments
(1 file)
|
3.86 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130918224116
Steps to reproduce:
Firefox send keys to input method in password field in current aurora version, while this is a good change, but gtk2 doesn't support the password hint to inform input method that password is in password field, which makes it very inconvinient to use it.
For example, Chinese people can have Pinyin enabled and carelessly typed chinese in the password field, and since firefox is only using one input context, input method doesn't found anything special and will keep Pinyin on. The password could even leak because the input method shows the preedit without knowing current it's in firefox password field. And another thing is, website usually doesn't accept non-ascii password, or no one actually check that, this may even make user carelessly type password that CANNOT be typed on any other clients, like mobile phone (android has such hint and the android keyboard will only be able to type ascii character in password field).
Gtk3 toolkit (Later than 3.6, GtkInputPurpose) and Qt toolkit (4 and 5, Qt::InputMethodHints) are support such hint. I'm not sure if this is a change on purpose, even if so, this should be reverted until firefox is ported to gtk3/qt and implement such hint.
(Some side notes, I'm a input method developer under Linux).
Step:
1. focus in firefox password field
2. enable input method and type
Actual results:
The password might be shown by input method.
Expected results:
Input method should receive hint, and input method can do things based on that hint, for example, let user to type only ascii character.
Updated•12 years ago
|
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Whiteboard: [bugday-20131028]
| Assignee | ||
Comment 1•12 years ago
|
||
(In reply to Weng Xuetian from comment #0)
> Firefox send keys to input method in password field in current aurora
> version, while this is a good change, but gtk2 doesn't support the password
> hint to inform input method that password is in password field, which makes
> it very inconvinient to use it.
What?? I don't know about the change... I guess that somebody broke the IME implementation on GTK without my review...
| Assignee | ||
Comment 2•12 years ago
|
||
Hmm, Bug 906072 completely broke the IM context management for password field.
http://hg.mozilla.org/mozilla-central/diff/9d925d047ba5/widget/gtk2/nsGtkIMModule.cpp
dougt:
Why did you do it? You completely removed |#ifndef MOZ_PLATFORM_MAEMO| including its internal code which is used on desktop!!
Flags: needinfo?(doug.turner)
Comment 3•12 years ago
|
||
my bad. this was two months ago. sounds like an over-sight or mistake. how could this be broken for so long without anyone noticing?
Flags: needinfo?(doug.turner)
Updated•12 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 4•12 years ago
|
||
I filed bug 932168 for partially backing out the patch from nsGtkIMModule.cpp.
(In reply to Doug Turner (:dougt) from comment #3)
> my bad. this was two months ago. sounds like an over-sight or mistake. how
> could this be broken for so long without anyone noticing?
I guess that our GTK port testers in CJK locale is fewer than other locale :-(
| Assignee | ||
Comment 5•12 years ago
|
||
Sorry, I forgot to explain current state of GTK's IME implementation.
First, Becoming IME enabled on password fields was not expected. It was fixed by bug 932168. I.e., IME isn't enabled on password fields again.
However, we should enable IME on password fields on Linux in the future. I'll fix it in bug 749123. At that time, the information in comment 0 will help to fix the bug.
Blocks: 749123
| Assignee | ||
Comment 6•12 years ago
|
||
Accoring to printf() debug, this patch sets GtkInputPurpose properly. However, I'm not sure how to test this with something. The VKB of Ubuntu looks like it doesn't change the layout with this information.
I build GTK3 build with:
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-system-cairo
Assignee: nobody → masayuki
| Assignee | ||
Updated•12 years ago
|
Summary: Set Input Method hint for Firefox password field → [GTK3] Set input-purpose to GtkIMContext
Version: 26 Branch → Trunk
| Assignee | ||
Updated•12 years ago
|
Keywords: inputmethod
| Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 8357774 [details] [diff] [review]
Patch
Okay, I confirmed that this patch works fine with the patch of bug 749123 in password case. Let's take this.
Attachment #8357774 -
Flags: review?(karlt)
Updated•12 years ago
|
Attachment #8357774 -
Flags: review?(karlt) → review+
| Assignee | ||
Comment 8•12 years ago
|
||
Status: NEW → ASSIGNED
Comment 9•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•