Bug 66949

Summary: [WK2] Anchor elements doesn't get focus on TAB key press
Product: WebKit Reporter: Ravi Phaneendra Kasibhatla <ravi.kasibhatla>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: amruthraj, andersca, ap, aroben, mrobinson, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Initialize tabsToLinks property to true by default in WebPreferencesStore
aroben: review-
Set property TabsToLinks to true for GTK platform
aroben: review-
Initialize tabsToLinks property to true by default in WebPreferencesStore only for GTK platform none

Ravi Phaneendra Kasibhatla
Reported 2011-08-25 09:18:13 PDT
On TAB key press, focus never moves to any anchor element present in the page. Default behavior should be to move the focus to any anchor element in the current tree scope of DOM. To enable focus on links from TAB key, the property KeyboardAccessTabsToLinks should be set to true by default.
Attachments
Initialize tabsToLinks property to true by default in WebPreferencesStore (1.88 KB, patch)
2011-08-25 09:26 PDT, Ravi Phaneendra Kasibhatla
aroben: review-
Set property TabsToLinks to true for GTK platform (1.45 KB, patch)
2011-08-26 00:42 PDT, Ravi Phaneendra Kasibhatla
aroben: review-
Initialize tabsToLinks property to true by default in WebPreferencesStore only for GTK platform (2.83 KB, patch)
2011-09-01 23:09 PDT, Ravi Phaneendra Kasibhatla
no flags
Adam Roben (:aroben)
Comment 1 2011-08-25 09:22:12 PDT
Presumably we want to match WebKit1's defaults, which may be different on different platforms.
Ravi Phaneendra Kasibhatla
Comment 2 2011-08-25 09:26:40 PDT
Created attachment 105200 [details] Initialize tabsToLinks property to true by default in WebPreferencesStore
Ravi Phaneendra Kasibhatla
Comment 3 2011-08-25 09:31:03 PDT
(In reply to comment #1) > Presumably we want to match WebKit1's defaults, which may be different on different platforms. aroben, In WebKit1, ChromeClient::keyboardUIMode() is implemented by various ports individually they were setting individually it to true (by default only). In WebKit2, since WebChromeClient::keyboardUIMode() is common for all ports shouldn't it be set to true by default there itself. Rather than each port individually setting and sending the preference change to WebProcess.
Ravi Phaneendra Kasibhatla
Comment 4 2011-08-25 09:31:15 PDT
(In reply to comment #0) > On TAB key press, focus never moves to any anchor element present in the page. Default behavior should be to move the focus to any anchor element in the current tree scope of DOM. > > To enable focus on links from TAB key, the property KeyboardAccessTabsToLinks should be set to true by default. I have verified for the issue in QT & GTK ports and it is present. The issue is solved in both these ports with the attached patch. I haven't been able to verify the issue and the patch on win/mac ports.
Adam Roben (:aroben)
Comment 5 2011-08-25 09:37:46 PDT
(In reply to comment #3) > (In reply to comment #1) > > Presumably we want to match WebKit1's defaults, which may be different on different platforms. > aroben, > In WebKit1, ChromeClient::keyboardUIMode() is implemented by various ports individually they were setting individually it to true (by default only). WebKit1 on Windows defaults to false. WebKit1 on Mac bases this value on a system-level setting, which itself defaults to false. So I don't think it's true that all WebKit1 ports default to true.
Ravi Phaneendra Kasibhatla
Comment 6 2011-08-26 00:42:00 PDT
Created attachment 105323 [details] Set property TabsToLinks to true for GTK platform As per comments, I have reverted the setting of property to true in WebPreferencesStore and doing it specifically for GTK platform, while setting up the WebProcessCreationParameters.
Ravi Phaneendra Kasibhatla
Comment 7 2011-08-26 00:43:03 PDT
(In reply to comment #5) > (In reply to comment #3) > > (In reply to comment #1) > > > Presumably we want to match WebKit1's defaults, which may be different on different platforms. > > aroben, > > In WebKit1, ChromeClient::keyboardUIMode() is implemented by various ports individually they were setting individually it to true (by default only). > > WebKit1 on Windows defaults to false. WebKit1 on Mac bases this value on a system-level setting, which itself defaults to false. So I don't think it's true that all WebKit1 ports default to true. aroben, As per your comments, now I am setting in WebKit::WebPageProxy::creationParameters() specifically for GTK port only.
Ravi Phaneendra Kasibhatla
Comment 8 2011-08-31 06:22:46 PDT
(In reply to comment #7) > (In reply to comment #5) > > (In reply to comment #3) > > > (In reply to comment #1) > > > > Presumably we want to match WebKit1's defaults, which may be different on different platforms. > > > aroben, > > > In WebKit1, ChromeClient::keyboardUIMode() is implemented by various ports individually they were setting individually it to true (by default only). > > > > WebKit1 on Windows defaults to false. WebKit1 on Mac bases this value on a system-level setting, which itself defaults to false. So I don't think it's true that all WebKit1 ports default to true. > > aroben, > As per your comments, now I am setting in WebKit::WebPageProxy::creationParameters() specifically for GTK port only. aroben, Can you please check the reworked patch?
Adam Roben (:aroben)
Comment 9 2011-08-31 06:29:51 PDT
Comment on attachment 105323 [details] Set property TabsToLinks to true for GTK platform This doesn't seem like the right place or way to do this. You should be changing the default value for this preference for GTK only in WebPreferencesStore.h.
Ravi Phaneendra Kasibhatla
Comment 10 2011-09-01 23:09:55 PDT
Created attachment 106095 [details] Initialize tabsToLinks property to true by default in WebPreferencesStore only for GTK platform As per comments setting the property of TabsToLinks to default true but only for GTK platform. Also, fixed couple of style errors reported by style script in WebPreferencesStore.h
Adam Roben (:aroben)
Comment 11 2011-09-02 05:53:06 PDT
Comment on attachment 106095 [details] Initialize tabsToLinks property to true by default in WebPreferencesStore only for GTK platform Nice!
WebKit Review Bot
Comment 12 2011-09-02 07:08:32 PDT
Comment on attachment 106095 [details] Initialize tabsToLinks property to true by default in WebPreferencesStore only for GTK platform Clearing flags on attachment: 106095 Committed r94417: <http://trac.webkit.org/changeset/94417>
WebKit Review Bot
Comment 13 2011-09-02 07:08:37 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.