Index: chrome/browser/ui/views/frame/contents_container.cc |
diff --git a/chrome/browser/ui/views/frame/contents_container.cc b/chrome/browser/ui/views/frame/contents_container.cc |
index d1b45f603673ec87f8bfc27597b4954fea43099d..ea91e79d947f160c6fafc2b5be76290aaf4559fb 100644 |
--- a/chrome/browser/ui/views/frame/contents_container.cc |
+++ b/chrome/browser/ui/views/frame/contents_container.cc |
@@ -78,8 +78,10 @@ class ShadowView : public views::View { |
} // namespace |
-ContentsContainer::ContentsContainer(views::WebView* active) |
+ContentsContainer::ContentsContainer(views::WebView* active, |
+ views::View* browser_view) |
: active_(active), |
+ browser_view_(browser_view), |
overlay_(NULL), |
overlay_web_contents_(NULL), |
draw_drop_shadow_(false), |
@@ -169,6 +171,17 @@ void ContentsContainer::SetOverlay(views::WebView* overlay, |
#endif // !defined(OS_WIN) |
} |
+ // If overlay's height has shrunk and |active_top_margin_| was used to |
dhollowa
2013/04/11 21:56:34
If |overlay_|'s height...
kuan
2013/04/11 23:39:20
Done.
|
+ // preserve |active_|'s origin in BrowserViewLayout::Layout(), we need to re- |
+ // determine if its origin still needs to be preserved (which only happens if |
dhollowa
2013/04/11 21:56:34
...preserved. This only happens... . In this cas
kuan
2013/04/11 23:39:20
Done. i slightly modify "This only happens" to "Th
|
+ // overlay is taller than total height of hidden bookmark and info bars), so |
+ // force a re-layout of BrowserView. |
+ bool layout_browser_view = false; |
+ if (overlay_ && active_top_margin_ > 0 && units == INSTANT_SIZE_PIXELS && |
+ height > 0 && height < overlay_height_) { |
+ layout_browser_view = true; |
+ } |
+ |
overlay_height_ = height; |
overlay_height_units_ = units; |
draw_drop_shadow_ = draw_drop_shadow; |
@@ -198,6 +211,9 @@ void ContentsContainer::SetOverlay(views::WebView* overlay, |
} |
Layout(); |
+ |
+ if (layout_browser_view) |
+ browser_view_->Layout(); |
dhollowa
2013/04/11 21:56:34
Doesn't browser_view_ contain |this| as a view? S
kuan
2013/04/11 23:39:20
the overlay needs to be laid out before BrowserVie
kuan
2013/04/11 23:45:24
hm.. let me try to change BrowserViewLayout::Layou
|
} |
void ContentsContainer::MaybeStackOverlayAtTop() { |