Commit 5870f216 authored by mukai@chromium.org's avatar mukai@chromium.org

Refreshes the caret bounds on window move for IME UI.

BUG=365822
R=oshima@chromium.org, ben@chromium.org
TEST=manually

Review URL: https://codereview.chromium.org/246073009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266397 0039d316-1c4b-4281-b951-d872f2087c98
parent f689da10
......@@ -2212,6 +2212,9 @@ void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds,
// SetBounds() itself. No matter how we got here, any redundant calls are
// harmless.
SetSize(new_bounds.size());
if (GetInputMethod())
GetInputMethod()->OnCaretBoundsChanged(this);
}
gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) {
......
......@@ -1090,6 +1090,11 @@ gfx::Size Widget::GetMaximumSize() {
void Widget::OnNativeWidgetMove() {
widget_delegate_->OnWidgetMove();
if (GetRootView()->GetFocusManager()) {
View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView();
if (focused_view && focused_view->GetInputMethod())
focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view);
}
FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged(
this,
GetWindowBoundsInScreen()));
......@@ -1098,6 +1103,12 @@ void Widget::OnNativeWidgetMove() {
void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) {
root_view_->SetSize(new_size);
if (GetRootView()->GetFocusManager()) {
View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView();
if (focused_view && focused_view->GetInputMethod())
focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view);
}
// Size changed notifications can fire prior to full initialization
// i.e. during session restore. Avoid saving session state during these
// startup procedures.
......
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