From 69bdff519f5c7c628c7e07f3d0cc28272b897442 Mon Sep 17 00:00:00 2001 From: "weinig@apple.com" Date: Mon, 3 Jan 2011 17:02:05 +0000 Subject: [PATCH] Ensure that the correct initial focusable area is focused when tabbing and shift-tabbing into the WKView. Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView becomeFirstResponder]): Use the keyViewSelectionDirection to set the initial focus. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74893 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebKit2/ChangeLog | 13 ++++++++++++- WebKit2/UIProcess/API/mac/WKView.mm | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog index ebf77fde0093..c87f2c340e56 100644 --- a/WebKit2/ChangeLog +++ b/WebKit2/ChangeLog @@ -1,3 +1,14 @@ +2011-01-03 Sam Weinig + + Reviewed by Anders Carlsson. + + Ensure that the correct initial focusable area is focused when tabbing + and shift-tabbing into the WKView. + + * UIProcess/API/mac/WKView.mm: + (-[WKView becomeFirstResponder]): Use the keyViewSelectionDirection to set + the initial focus. + 2011-01-02 Dan Bernstein Rubber-stamped by Simon Fraser. @@ -14,7 +25,7 @@ WebKit 2 does not build on 64bits with a recent GCC https://bugs.webkit.org/show_bug.cgi?id=51754 - Change the argument coding for DatabaseDetails to use explicitely the 64 bits type. + Change the argument coding for DatabaseDetails to use explicitly the 64 bits type. * Shared/OriginAndDatabases.h: * Shared/WebCoreArgumentCoders.h: diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm index b09951d503f0..02b7c67ada0a 100644 --- a/WebKit2/UIProcess/API/mac/WKView.mm +++ b/WebKit2/UIProcess/API/mac/WKView.mm @@ -208,7 +208,13 @@ typedef HashMap ValidationMap; - (BOOL)becomeFirstResponder { + NSSelectionDirection direction = [[self window] keyViewSelectionDirection]; + _data->_page->setFocused(true); + + if (direction != NSDirectSelection) + _data->_page->setInitialFocus(direction == NSSelectingNext); + return YES; } -- 2.36.0