Closed
Bug 805357
Opened 12 years ago
Closed 12 years ago
nsIMEStateManager should always call nsIWidget::OnIMEFocusChange(false) when our editor loses focus
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod)
Attachments
(2 files, 1 obsolete file)
8.67 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
6.52 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Currently, if we don't create nsTextStateManager, we don't call nsIWidget::OnIMEFocusChange(false). This is not good behavior for widget.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #675012 -
Flags: review?(bugs)
Assignee | ||
Comment 2•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=ba09333c34c2
Comment 3•12 years ago
|
||
Comment on attachment 675012 [details] [diff] [review] Patch >+bool >+nsIMEStateManager::IsIMEAvailableExceptOnPlugin(nsIWidget* aWidget) >+{ >+ switch (aWidget->GetInputContext().mIMEState.mEnabled) { >+ case widget::IMEState::ENABLED: >+ case widget::IMEState::PASSWORD: >+ return true; >+ default: >+ return false; >+ } >+} I have no idea what this is about. Could you explain and add also some comment to the code. What "ExceptOnPlugin"?
Attachment #675012 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 4•12 years ago
|
||
If the enabled state is PLUGIN, IME should be available but it shouldn't be managed by us. Hmm, IsEditableIMEState() is better?
Comment 5•12 years ago
|
||
Well, if you want to check PLUGIN state, check that explicitly, and don't check the other values.
Comment 6•12 years ago
|
||
switch (aWidget->GetInputContext().mIMEState.mEnabled) { case widget::IMEState::DISABLED: case widget::IMEState::PLUGIN: return false; default: return true; } would be much easier to understand, IMO.
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #675012 -
Attachment is obsolete: true
Attachment #675487 -
Flags: review?(bugs)
Assignee | ||
Comment 8•12 years ago
|
||
By the part.1, OnIMEFocusChange(true) never needs to return NS_SUCCESS_IME_NO_UPDATES for receiving OnIMEFocusChange(false). So, we can drop the error code.
Attachment #675490 -
Flags: review?(roc)
Attachment #675490 -
Flags: review?(roc) → review+
Comment 9•12 years ago
|
||
Comment on attachment 675487 [details] [diff] [review] part.1 nsIMEStateManager should always call nsIWidget::OnIMEFocusChange(false) when our editor loses focus >+nsIMEStateManager::IsEditableIMEState(nsIWidget* aWidget) >+{ >+ switch (aWidget->GetInputContext().mIMEState.mEnabled) { >+ case widget::IMEState::ENABLED: >+ case widget::IMEState::PASSWORD: >+ return true; >+ case widget::IMEState::PLUGIN: >+ case widget::IMEState::DISABLED: >+ return false; >+ default: >+ MOZ_NOT_REACHED("Define whther the IME enable state is editable or not"); 'whther' But maybe "Unknown IMEState" or something like that
Attachment #675487 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a4fd71c3252 https://hg.mozilla.org/integration/mozilla-inbound/rev/f38bee8c58b9
Target Milestone: --- → mozilla19
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4a4fd71c3252 https://hg.mozilla.org/mozilla-central/rev/f38bee8c58b9
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•