Commit 5242a5a0 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

IME events were not dispatched properly to Pepper.

A stub implementation for ShouldDispatchImeEventsToPepper was placed
on FrameWidget but was never implemented anywhere. Some methods called
the proper Client()->ShouldDispatchImeEventsToPepper code path, but
others ended up using the stub. Remove the dead code, call the right
method.

Fallout from https://crrev.com/23748d4a10c7a3cefb87851045250b8b86887938

BUG=1110131

Change-Id: I04884f4d86b1a07b56b65bb49711f3b9ca060b69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324444Reviewed-by: default avatarMustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792444}
parent 6cf9aaf5
......@@ -168,7 +168,6 @@ class PLATFORM_EXPORT FrameWidget
virtual uint64_t GetScrollableContainerIdAt(const gfx::PointF& point) = 0;
virtual bool ShouldHandleImeEvents() { return false; }
virtual bool ShouldDispatchImeEventsToPepper() { return false; }
virtual void SetEditCommandsForNextKeyEvent(
Vector<mojom::blink::EditCommandPtr> edit_commands) = 0;
......
......@@ -744,7 +744,7 @@ void WidgetBase::ImeSetComposition(
FrameWidget* frame_widget = client_->FrameWidget();
if (!frame_widget)
return;
if (frame_widget->ShouldDispatchImeEventsToPepper()) {
if (frame_widget->Client()->ShouldDispatchImeEventsToPepper()) {
frame_widget->Client()->ImeSetCompositionForPepper(
text,
std::vector<ui::ImeTextSpan>(ime_text_spans.begin(),
......@@ -777,7 +777,7 @@ void WidgetBase::ImeCommitText(const String& text,
FrameWidget* frame_widget = client_->FrameWidget();
if (!frame_widget)
return;
if (frame_widget->ShouldDispatchImeEventsToPepper()) {
if (frame_widget->Client()->ShouldDispatchImeEventsToPepper()) {
frame_widget->Client()->ImeCommitTextForPepper(
text,
std::vector<ui::ImeTextSpan>(ime_text_spans.begin(),
......@@ -801,7 +801,7 @@ void WidgetBase::ImeFinishComposingText(bool keep_selection) {
FrameWidget* frame_widget = client_->FrameWidget();
if (!frame_widget)
return;
if (frame_widget->ShouldDispatchImeEventsToPepper()) {
if (frame_widget->Client()->ShouldDispatchImeEventsToPepper()) {
frame_widget->Client()->ImeFinishComposingTextForPepper(keep_selection);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment