summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorbshe <bshe@chromium.org>2015-10-14 10:37:03 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-14 17:37:46 +0000
commitc50df996d949d687c0eb7014cf1bdc4162f85c6b (patch)
treeee36aac9ca008aac95f73f30e6a3aa4d0d4d2285 /ash
parent097a9105f8c75911d443afe12d6898ff8e84b4ea (diff)
downloadchromium_src-c50df996d949d687c0eb7014cf1bdc4162f85c6b.zip
chromium_src-c50df996d949d687c0eb7014cf1bdc4162f85c6b.tar.gz
chromium_src-c50df996d949d687c0eb7014cf1bdc4162f85c6b.tar.bz2
Fix cropped floating gesture candidate window
This CL introduces ShouldWindowOverscroll function in keyboard_controller_proxy to check if a window should be overscrolled. There are two types of window that we want to avoid overscroll all the time: virtual keyboard window and ime windows. Ime windows are created by chrome.app.window.create API. This window is used to show gesture typing candidate or accents characters. These two type of windows have the same parent, which is kShellWindowId_ImeWindowParentContainer top level window. To disable overscroll, this CL check if a window is a child of the toplevel window and avoid set overscroll insets if it is. BUG=529880 Review URL: https://codereview.chromium.org/1323053005 Cr-Commit-Position: refs/heads/master@{#354055}
Diffstat (limited to 'ash')
-rw-r--r--ash/test/test_keyboard_ui.cc4
-rw-r--r--ash/test/test_keyboard_ui.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/ash/test/test_keyboard_ui.cc b/ash/test/test_keyboard_ui.cc
index b99266c..67b6993 100644
--- a/ash/test/test_keyboard_ui.cc
+++ b/ash/test/test_keyboard_ui.cc
@@ -20,6 +20,10 @@ bool TestKeyboardUI::HasKeyboardWindow() const {
return keyboard_;
}
+bool TestKeyboardUI::ShouldWindowOverscroll(aura::Window* window) const {
+ return true;
+}
+
aura::Window* TestKeyboardUI::GetKeyboardWindow() {
if (!keyboard_) {
keyboard_.reset(new aura::Window(&delegate_));
diff --git a/ash/test/test_keyboard_ui.h b/ash/test/test_keyboard_ui.h
index d1c1f75..2b8a24e 100644
--- a/ash/test/test_keyboard_ui.h
+++ b/ash/test/test_keyboard_ui.h
@@ -22,6 +22,7 @@ class TestKeyboardUI : public keyboard::KeyboardUI {
~TestKeyboardUI() override;
bool HasKeyboardWindow() const override;
+ bool ShouldWindowOverscroll(aura::Window* window) const override;
aura::Window* GetKeyboardWindow() override;
private: