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

Unified Diff: ui/views/cocoa/bridged_content_view.mm

Issue 2601513002: MacViews: Mark key down event as handled when consumed by the IME. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_content_view.mm
diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm
index b5d67a19df856cc326768644356b961c201fc628..15ac3500bc7c36ed0e51d48931e75860ac9ef2ce 100644
--- a/ui/views/cocoa/bridged_content_view.mm
+++ b/ui/views/cocoa/bridged_content_view.mm
@@ -1412,11 +1412,15 @@ ui::TextEditCommand GetTextEditCommandForMenuAction(SEL action) {
composition.underlines.push_back(ui::CompositionUnderline(
0, [text length], SK_ColorBLACK, false, SK_ColorTRANSPARENT));
textInputClient_->SetCompositionText(composition);
+ keyDownEvent_ = nil; // Handled.
}
- (void)unmarkText {
- if (textInputClient_)
- textInputClient_->ConfirmCompositionText();
+ if (!textInputClient_)
+ return;
+
+ textInputClient_->ConfirmCompositionText();
+ keyDownEvent_ = nil; // Handled.
}
- (NSArray*)validAttributesForMarkedText {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698