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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm

Issue 1951143002: [Mac][Material Design] Get Omnibox table width from dropdown window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/omnibox/omnibox_popup_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
index e18b78eda1fb6de85f0e266464a4a411337319cf..7e92d3a7c48c2d2bbb5b5c24b307cad0d9f32e5d 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
@@ -260,7 +260,7 @@ void OmniboxPopupViewMac::PositionPopup(const CGFloat matrixHeight) {
// In Material Design, the table is the width of the window. In non-MD,
// calculate the width of the table based on backing out the popup's border
// from the width of the field.
- CGFloat table_width = NSWidth([background_view_ bounds]);
+ CGFloat table_width = NSWidth([[[field_ window] contentView] bounds]);
bool is_mode_material = ui::MaterialDesignController::IsModeMaterial();
if (!is_mode_material) {
table_width = NSWidth([field_ bounds]);
« 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