Commit 808fe69c authored by dpapad@chromium.org's avatar dpapad@chromium.org

Print Preview: Fixing crash when hitting tab multiple times.

BUG=104478
TEST=Hit tab mulitple times, browser should not crash, focus should cycle through printing options.


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110396 0039d316-1c4b-4281-b951-d872f2087c98
parent 0b05881d
...@@ -269,9 +269,11 @@ void TabContentsViewGtk::GotFocus() { ...@@ -269,9 +269,11 @@ void TabContentsViewGtk::GotFocus() {
// all subclasses. http://crbug.com/21875 // all subclasses. http://crbug.com/21875
} }
// This is called when we the renderer asks us to take focus back (i.e., it has // This is called when the renderer asks us to take focus back (i.e., it has
// iterated past the last focusable element on the page). // iterated past the last focusable element on the page).
void TabContentsViewGtk::TakeFocus(bool reverse) { void TabContentsViewGtk::TakeFocus(bool reverse) {
if (!tab_contents_->delegate())
return;
if (!tab_contents_->delegate()->TakeFocus(reverse)) { if (!tab_contents_->delegate()->TakeFocus(reverse)) {
gtk_widget_child_focus(GTK_WIDGET(GetTopLevelNativeWindow()), gtk_widget_child_focus(GTK_WIDGET(GetTopLevelNativeWindow()),
reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD); reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD);
......
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