Commit 3027d415 authored by deanm@chromium.org's avatar deanm@chromium.org

The "size-request" event is run-first, clean up the Omnibox handler.

This wasn't actually a bug in that everything worked fine.  It just meant we
were calling the default handler twice, and returning from what should have
been a void function.

Review URL: http://codereview.chromium.org/99218


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14943 0039d316-1c4b-4281-b951-d872f2087c98
parent 7351ada6
...@@ -458,11 +458,10 @@ void AutocompleteEditViewGtk::HandleViewMoveCursor( ...@@ -458,11 +458,10 @@ void AutocompleteEditViewGtk::HandleViewMoveCursor(
g_signal_stop_emission_by_name(text_view_, "move-cursor"); g_signal_stop_emission_by_name(text_view_, "move-cursor");
} }
gboolean AutocompleteEditViewGtk::HandleViewSizeRequest(GtkRequisition* req) { void AutocompleteEditViewGtk::HandleViewSizeRequest(GtkRequisition* req) {
// Don't force a minimum width, but use the font-relative height. // Don't force a minimum width, but use the font-relative height. This is a
GTK_WIDGET_GET_CLASS(text_view_)->size_request(text_view_, req); // run-first handler, so the default handler was already called.
req->width = 1; req->width = 1;
return TRUE; // We already called the default handler.
} }
AutocompleteEditViewGtk::CharRange AutocompleteEditViewGtk::GetSelection() { AutocompleteEditViewGtk::CharRange AutocompleteEditViewGtk::GetSelection() {
......
...@@ -160,13 +160,13 @@ class AutocompleteEditViewGtk : public AutocompleteEditView { ...@@ -160,13 +160,13 @@ class AutocompleteEditViewGtk : public AutocompleteEditView {
gint count, gint count,
gboolean extendion_selection); gboolean extendion_selection);
static gboolean HandleViewSizeRequestThunk(GtkWidget* view, static void HandleViewSizeRequestThunk(GtkWidget* view,
GtkRequisition* req, GtkRequisition* req,
gpointer self) { gpointer self) {
return reinterpret_cast<AutocompleteEditViewGtk*>(self)-> reinterpret_cast<AutocompleteEditViewGtk*>(self)->
HandleViewSizeRequest(req); HandleViewSizeRequest(req);
} }
gboolean HandleViewSizeRequest(GtkRequisition* req); void HandleViewSizeRequest(GtkRequisition* req);
// Get the character indices of the current selection. This honors // Get the character indices of the current selection. This honors
// direction, cp_max is the insertion point, and cp_min is the bound. // direction, cp_max is the insertion point, and cp_min is the bound.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment