Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
index 86f81a9cf90c1fb2852334785b939092d1f638c5..f4445b964ea011604f2fe900267942fa3d123580 100644 |
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
@@ -20,7 +20,6 @@ |
#include "chrome/browser/autocomplete/autocomplete_classifier.h" |
#include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
#include "chrome/browser/autocomplete/autocomplete_match.h" |
-#include "chrome/browser/devtools/devtools_window.h" |
#include "chrome/browser/extensions/tab_helper.h" |
#include "chrome/browser/favicon/favicon_tab_helper.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -2222,9 +2221,16 @@ NSView* GetSheetParentViewForWebContents(WebContents* web_contents) { |
// View hierarchy of the contents view: |
// NSView -- switchView, same for all tabs |
// +- NSView -- TabContentsController's view |
- // +- TabContentsViewCocoa |
+ // +- WebContentsViewCocoa |
// |
// Changing it? Do not forget to modify |
// -[TabStripController swapInTabAtIndex:] too. |
return [web_contents->GetNativeView() superview]; |
} |
+ |
+NSRect GetSheetParentBoundsForParentView(NSView* view) { |
+ // If the devtools view is open, it shrinks the size of the WebContents, so go |
+ // up the hierarchy to the devtools container view to avoid that. |
Robert Sesek
2014/07/28 21:11:26
Add to the comment as to what happens when you don
Avi (use Gerrit)
2014/07/28 21:21:21
Done.
|
+ NSView* devtools_view = [[[view superview] superview] superview]; |
+ return [devtools_view convertRect:[devtools_view bounds] toView:nil]; |
+} |