Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 659823003: Nasty hack to pick the right origin for a sheet above an app window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 41a5a177b113ed9ba130122f438582f5b9c05433..458ef405fdfe5a13dec4355907afcd2cc8af8c99 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -2314,5 +2314,9 @@ NSRect GetSheetParentBoundsForParentView(NSView* view) {
// the devtools view is always in the hierarchy even if it is not open or it
// is detached.
NSView* devtools_view = [[[view superview] superview] superview];
- return [devtools_view convertRect:[devtools_view bounds] toView:nil];
+ if (devtools_view) {
+ return [devtools_view convertRect:[devtools_view bounds] toView:nil];
+ } else {
+ return [view convertRect:[view bounds] toView:nil];
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698