summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-10 06:18:49 +0000
committertmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-10 06:18:49 +0000
commit0f8f5b473542e30930101eb61d044849fcaa17e3 (patch)
tree40db6c1d73f847d8482e1afd03a787026af71a7b
parentaa051274bdd5359b31fe250152a7db8ccf2879bf (diff)
downloadchromium_src-0f8f5b473542e30930101eb61d044849fcaa17e3.zip
chromium_src-0f8f5b473542e30930101eb61d044849fcaa17e3.tar.gz
chromium_src-0f8f5b473542e30930101eb61d044849fcaa17e3.tar.bz2
Fixed incorrect frame insets for app windows on ChromeOS
HeaderPainter::GetWindowBoundsForClientBounds() shifts the Y coordinate of the window bounds to ensure it is not negative. This causes NativeAppWindowViews::GetFrameInsets() to compute the wrong insets. Therefore we should leave the Y coordinate of the window bounds negative in HeaderPainter::GetWindowBoundsForClientBounds(). BUG=349220 TEST=browser_tests (AppWindowBrowserTest.*) Review URL: https://codereview.chromium.org/180803013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255878 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/app_window_browsertest.cc12
-rw-r--r--ash/wm/header_painter.cc2
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/app_window_browsertest.cc b/apps/app_window_browsertest.cc
index c974c92..ccb409e 100644
--- a/apps/app_window_browsertest.cc
+++ b/apps/app_window_browsertest.cc
@@ -13,10 +13,10 @@ namespace {
typedef extensions::PlatformAppBrowserTest AppWindowBrowserTest;
-#if defined(OS_WIN) || defined(OS_MACOSX)
-#define MAYBE_FrameInsetsForDefaultFrame FrameInsetsForDefaultFrame
-#else
+#if defined(TOOLKIT_GTK)
#define MAYBE_FrameInsetsForDefaultFrame DISABLED_FrameInsetsForDefaultFrame
+#else
+#define MAYBE_FrameInsetsForDefaultFrame FrameInsetsForDefaultFrame
#endif
// Verifies that the NativeAppWindows implement GetFrameInsets() correctly.
@@ -33,10 +33,10 @@ IN_PROC_BROWSER_TEST_F(AppWindowBrowserTest, MAYBE_FrameInsetsForDefaultFrame) {
CloseAppWindow(app_window);
}
-#if defined(OS_WIN) || defined(OS_MACOSX)
-#define MAYBE_FrameInsetsForColoredFrame FrameInsetsForColoredFrame
-#else
+#if defined(TOOLKIT_GTK)
#define MAYBE_FrameInsetsForColoredFrame DISABLED_FrameInsetsForColoredFrame
+#else
+#define MAYBE_FrameInsetsForColoredFrame FrameInsetsForColoredFrame
#endif
// Verifies that the NativeAppWindows implement GetFrameInsets() correctly.
diff --git a/ash/wm/header_painter.cc b/ash/wm/header_painter.cc
index f6fdfaf..c6db020 100644
--- a/ash/wm/header_painter.cc
+++ b/ash/wm/header_painter.cc
@@ -185,8 +185,6 @@ gfx::Rect HeaderPainter::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) {
gfx::Rect window_bounds(client_bounds);
window_bounds.Inset(0, -header_height, 0, 0);
- if (window_bounds.y() < 0)
- window_bounds.set_y(0);
return window_bounds;
}