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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1319983002: Add a top shadow to material design omnibox dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new comments Created 5 years, 4 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 2d5fd1269c656e4c5bdc2f229d81f7408f2e86cf..c406984ac013f68ba01e7aa9e4d43befdc11b6d1 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -488,18 +488,12 @@ void LocationBarView::GetOmniboxPopupPositioningInfo(
gfx::Point* top_left_screen_coord,
int* popup_width,
int* left_margin,
- int* right_margin) {
- // Because the popup might appear atop the attached bookmark bar, there won't
- // necessarily be a client edge separating it from the rest of the toolbar.
- // Therefore we position the popup high enough so it can draw its own client
- // edge at the top, in the same place the toolbar would normally draw the
- // client edge.
- *top_left_screen_coord = gfx::Point(
- 0,
- parent()->height() - views::NonClientFrameView::kClientEdgeThickness);
+ int* right_margin,
+ int top_edge_overlap) {
+ *top_left_screen_coord = gfx::Point(0, parent()->height() - top_edge_overlap);
views::View::ConvertPointToScreen(parent(), top_left_screen_coord);
- *popup_width = parent()->width();
+ *popup_width = parent()->width();
gfx::Rect location_bar_bounds(bounds());
location_bar_bounds.Inset(kNormalEdgeThickness, 0);
*left_margin = location_bar_bounds.x();

Powered by Google App Engine
This is Rietveld 408576698