Bug 66949 - [WK2] Anchor elements doesn't get focus on TAB key press
Summary: [WK2] Anchor elements doesn't get focus on TAB key press
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-25 09:18 PDT by Ravi Phaneendra Kasibhatla
Modified: 2011-09-02 07:08 PDT (History)
7 users (show)

See Also:


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-
Details | Formatted Diff | Diff
Set property TabsToLinks to true for GTK platform (1.45 KB, patch)
2011-08-26 00:42 PDT, Ravi Phaneendra Kasibhatla
aroben: review-
Details | Formatted Diff | Diff
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 Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ravi Phaneendra Kasibhatla 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.
Comment 1 Adam Roben (:aroben) 2011-08-25 09:22:12 PDT
Presumably we want to match WebKit1's defaults, which may be different on different platforms.
Comment 2 Ravi Phaneendra Kasibhatla 2011-08-25 09:26:40 PDT
Created attachment 105200 [details]
Initialize tabsToLinks property to true by default in WebPreferencesStore
Comment 3 Ravi Phaneendra Kasibhatla 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.
Comment 4 Ravi Phaneendra Kasibhatla 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.
Comment 5 Adam Roben (:aroben) 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.
Comment 6 Ravi Phaneendra Kasibhatla 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.
Comment 7 Ravi Phaneendra Kasibhatla 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.
Comment 8 Ravi Phaneendra Kasibhatla 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?
Comment 9 Adam Roben (:aroben) 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.
Comment 10 Ravi Phaneendra Kasibhatla 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
Comment 11 Adam Roben (:aroben) 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!
Comment 12 WebKit Review Bot 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>
Comment 13 WebKit Review Bot 2011-09-02 07:08:37 PDT
All reviewed patches have been landed.  Closing bug.