Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/mozilla/ComplexTextInputPanel.mm

Issue 6259013: Update Mac plugin IME handling to match updated spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to trunk Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/mozilla/ComplexTextInputPanel.h ('k') | third_party/mozilla/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mozilla/ComplexTextInputPanel.mm
diff --git a/third_party/mozilla/ComplexTextInputPanel.mm b/third_party/mozilla/ComplexTextInputPanel.mm
index 638ed9df3534d373a53ba1edbdc6a881090134dc..0eb49e2d6a1493e458ced4042cd67dbf61d9534f 100644
--- a/third_party/mozilla/ComplexTextInputPanel.mm
+++ b/third_party/mozilla/ComplexTextInputPanel.mm
@@ -98,8 +98,7 @@ static NSString* const NSTextInputContextKeyboardSelectionDidChangeNotification
- (void)keyboardInputSourceChanged:(NSNotification *)notification
{
- [mInputTextView setString:@""];
- [self orderOut:nil];
+ [self cancelComposition];
}
- (BOOL)interpretKeyEvent:(NSEvent*)event string:(NSString**)string
@@ -129,15 +128,20 @@ static NSString* const NSTextInputContextKeyboardSelectionDidChangeNotification
return hadMarkedText;
}
-- (void)cancelInput
+- (NSTextInputContext*)inputContext
+{
+ return [mInputTextView inputContext];
+}
+
+- (void)cancelComposition
{
- [self orderOut:nil];
[mInputTextView setString:@""];
+ [self orderOut:nil];
}
-- (NSTextInputContext*)inputContext
+- (BOOL)inComposition
{
- return [mInputTextView inputContext];
+ return [mInputTextView hasMarkedText];
}
@end
« no previous file with comments | « third_party/mozilla/ComplexTextInputPanel.h ('k') | third_party/mozilla/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698