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

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: Rebase after r171018 Created 8 years 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 94a93c12ce9687e8fb8519dc54b6f1b606317b60..b57f3d66db810fae4ce012f4f9ed0df140c5e04b 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -442,6 +442,11 @@ 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. The OmniboxView bounds
+ // cannot be used here because the OmniboxView does not fill the entire box
+ // when gray text is showing.
+ model()->OnOmniboxBoundsChanged(location_bar_view_->GetBoundsInScreen());
sky 2012/12/04 23:06:36 The locationbarview might contain a bunch of other
melevin 2012/12/06 23:13:00 Yes, we want the outer bounds of the location box.
}
////////////////////////////////////////////////////////////////////////////////
@@ -681,6 +686,10 @@ bool OmniboxViewViews::IsImeComposing() const {
return false;
}
+gfx::Rect OmniboxViewViews::GetContainerBounds() const {
+ return location_bar_view_->parent()->GetBoundsInScreen();
+}
+
int OmniboxViewViews::GetMaxEditWidth(int entry_width) const {
return entry_width;
}

Powered by Google App Engine
This is Rietveld 408576698