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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 11359198: Implement the Instant extended API startMargin, endMargin, and rtl properties and the onmarginchang… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 76c7453d52281e7fb2c4f4c2b2c1d68aca638a8b..aea2d9fc1e936bca62cfbe75343c582b8abf45b1 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -441,6 +441,12 @@ std::string OmniboxViewViews::GetClassName() const {
void OmniboxViewViews::OnBoundsChanged(const gfx::Rect& previous_bounds) {
if (popup_view_->IsOpen())
popup_view_->UpdatePopupAppearance();
+
+ // Pass the location bar's bounds to the edit model because the OmniboxView
+ // does not fill the entire box when gray text is showing. We also pass the
+ // parent view's bounds so that the end margin can be calculated.
+ model()->OnOmniboxBoundsChanged(location_bar_view_->GetBoundsInScreen(),
+ location_bar_view_->parent()->GetBoundsInScreen());
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698