summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-28 23:12:59 +0000
committerwittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-28 23:12:59 +0000
commitf4193889339abe71a8be99f9f48972616889e5e6 (patch)
tree4423d7b267f82f23425550e1a9a509e6e4531b79
parent5e2bc8c829c9bde32df904bc9a4301e86778e4b6 (diff)
downloadchromium_src-f4193889339abe71a8be99f9f48972616889e5e6.zip
chromium_src-f4193889339abe71a8be99f9f48972616889e5e6.tar.gz
chromium_src-f4193889339abe71a8be99f9f48972616889e5e6.tar.bz2
Redo display of web contents modal dialog under the bookmark bar
This change was made in http://crrev.com/200122, but appears to have been lost in a merge at http://crrev.com/200407. BUG=243275 Review URL: https://chromiumcodereview.appspot.com/16021009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202681 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/frame/browser_view_layout.cc16
-rw-r--r--chrome/browser/ui/views/frame/browser_view_layout.h2
2 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index 31b5d9e..eea6191 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -332,9 +332,6 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
}
top = LayoutToolbar(top);
- web_contents_modal_dialog_top_y_ =
- top + browser_view->y() - kConstrainedWindowOverlap;
-
// Overlay container requires updated toolbar bounds to determine its
// position, and needs to be laid out before:
// - GetTopMarginForActiveContent(), which calls GetInstantUIState() to check
@@ -344,7 +341,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
// visible.
LayoutOverlayContainer();
- top = LayoutBookmarkAndInfoBars(top);
+ top = LayoutBookmarkAndInfoBars(top, browser_view->y());
// Top container requires updated toolbar and bookmark bar to compute size.
top_container_->SetSize(top_container_->GetPreferredSize());
@@ -448,16 +445,23 @@ int BrowserViewLayout::LayoutToolbar(int top) {
return y + height;
}
-int BrowserViewLayout::LayoutBookmarkAndInfoBars(int top) {
+int BrowserViewLayout::LayoutBookmarkAndInfoBars(int top, int browser_view_y) {
if (bookmark_bar_) {
// If we're showing the Bookmark bar in detached style, then we
// need to show any Info bar _above_ the Bookmark bar, since the
// Bookmark bar is styled to look like it's part of the page.
- if (bookmark_bar_->IsDetached())
+ if (bookmark_bar_->IsDetached()) {
+ web_contents_modal_dialog_top_y_ =
+ top + browser_view_y - kConstrainedWindowOverlap;
return LayoutBookmarkBar(LayoutInfoBar(top));
+ }
// Otherwise, Bookmark bar first, Info bar second.
top = std::max(toolbar_->bounds().bottom(), LayoutBookmarkBar(top));
}
+
+ web_contents_modal_dialog_top_y_ =
+ top + browser_view_y - kConstrainedWindowOverlap;
+
return LayoutInfoBar(top);
}
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.h b/chrome/browser/ui/views/frame/browser_view_layout.h
index 433d1bc..e7b14e3 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.h
+++ b/chrome/browser/ui/views/frame/browser_view_layout.h
@@ -117,7 +117,7 @@ class BrowserViewLayout : public views::LayoutManager {
// Layout the following controls, starting at |top|, returns the coordinate
// of the bottom of the control, for laying out the next control.
int LayoutToolbar(int top);
- int LayoutBookmarkAndInfoBars(int top);
+ int LayoutBookmarkAndInfoBars(int top, int browser_view_y);
int LayoutBookmarkBar(int top);
int LayoutInfoBar(int top);