Title: [127966] trunk
Revision
127966
Author
[email protected]
Date
2012-09-08 03:48:09 -0700 (Sat, 08 Sep 2012)

Log Message

[WK2] New fast/events/tab-focus-link-in-canvas fails from r126908
https://bugs.webkit.org/show_bug.cgi?id=95329

Patch by Christophe Dumez <[email protected]> on 2012-09-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Add implementation for overriding the WebKitTabToLinksPreferenceKey
preference as well as the corresponding WKPreferences API that
is needed by WebKitTestRunner.

* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetTabToLinksEnabled):
(WKPreferencesGetTabToLinksEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setTabToLinksEnabled):
(WebKit::WebPage::tabToLinksEnabled):

Tools:

Explicitely disable TabToLinks setting in WebKitTestRunner.
Tests override the "WebKitTabToLinksPreferenceKey" preference
to enable it.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Unskip fast/events/tab-focus-link-in-canvas for WK2 now that WebKitTestRunner
supports overriding the "WebKitTabToLinksPreferenceKey" preference.

* platform/efl-wk2/TestExpectations:
* platform/wk2/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (127965 => 127966)


--- trunk/LayoutTests/ChangeLog	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/LayoutTests/ChangeLog	2012-09-08 10:48:09 UTC (rev 127966)
@@ -1,3 +1,16 @@
+2012-09-08  Christophe Dumez  <[email protected]>
+
+        [WK2] New fast/events/tab-focus-link-in-canvas fails from r126908
+        https://bugs.webkit.org/show_bug.cgi?id=95329
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskip fast/events/tab-focus-link-in-canvas for WK2 now that WebKitTestRunner
+        supports overriding the "WebKitTabToLinksPreferenceKey" preference.
+
+        * platform/efl-wk2/TestExpectations:
+        * platform/wk2/Skipped:
+
 2012-09-07  Dominic Mazzoni  <[email protected]>
 
         REGRESSION (r127936): Multiple accessibility tests failing on Lion

Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (127965 => 127966)


--- trunk/LayoutTests/platform/efl-wk2/TestExpectations	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations	2012-09-08 10:48:09 UTC (rev 127966)
@@ -165,9 +165,6 @@
 BUGWKEFL : fast/events/touch/touch-target-limited.html = TEXT
 BUGWKEFL : fast/events/touch/touch-target.html = TEXT
 
-// WebKit2 can't use TAB key to navigate on webpage links
-BUGWK95329 : fast/events/tab-focus-link-in-canvas.html = TEXT
-
 // WebKitTestRunner needs an implementation for testRunner.setViewModeMediaFeature
 BUGWKEFL : fast/media/media-query-list-02.html = TEXT
 BUGWKEFL : fast/media/media-query-list-03.html = TEXT

Modified: trunk/LayoutTests/platform/wk2/Skipped (127965 => 127966)


--- trunk/LayoutTests/platform/wk2/Skipped	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/LayoutTests/platform/wk2/Skipped	2012-09-08 10:48:09 UTC (rev 127966)
@@ -1277,10 +1277,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=90177
 fast/events/drag-display-none-element.html
 
-# [WK2] New fast/events/tab-focus-link-in-canvas.html fails
-# https://bugs.webkit.org/show_bug.cgi?id=95329
-fast/events/tab-focus-link-in-canvas.html
-
 # Skip tests in fast/text/shaping
 fast/text/shaping
 

Modified: trunk/Source/WebKit2/ChangeLog (127965 => 127966)


--- trunk/Source/WebKit2/ChangeLog	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-08 10:48:09 UTC (rev 127966)
@@ -1,3 +1,26 @@
+2012-09-08  Christophe Dumez  <[email protected]>
+
+        [WK2] New fast/events/tab-focus-link-in-canvas fails from r126908
+        https://bugs.webkit.org/show_bug.cgi?id=95329
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add implementation for overriding the WebKitTabToLinksPreferenceKey
+        preference as well as the corresponding WKPreferences API that
+        is needed by WebKitTestRunner.
+
+        * Shared/WebPreferencesStore.h:
+        (WebKit):
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetTabToLinksEnabled):
+        (WKPreferencesGetTabToLinksEnabled):
+        * UIProcess/API/C/WKPreferencesPrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::setTabToLinksEnabled):
+        (WebKit::WebPage::tabToLinksEnabled):
+
 2012-09-07  Benjamin Poulain  <[email protected]>
 
         Rename the ustring() accessor to string()

Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (127965 => 127966)


--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h	2012-09-08 10:48:09 UTC (rev 127966)
@@ -123,6 +123,7 @@
     macro(AsynchronousPluginInitializationEnabled, asynchronousPluginInitializationEnabled, Bool, bool, false) \
     macro(AsynchronousPluginInitializationEnabledForAllPlugins, asynchronousPluginInitializationEnabledForAllPlugins, Bool, bool, false) \
     macro(ArtificialPluginInitializationDelayEnabled, artificialPluginInitializationDelayEnabled, Bool, bool, false) \
+    macro(TabToLinksEnabled, tabToLinksEnabled, Bool, bool, false) \
     macro(ScrollingPerformanceLoggingEnabled, scrollingPerformanceLoggingEnabled, Bool, bool, false) \
     macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, 0) \
     macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED) \

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (127965 => 127966)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-09-08 10:48:09 UTC (rev 127966)
@@ -874,6 +874,16 @@
     return toImpl(preferencesRef)->artificialPluginInitializationDelayEnabled();
 }
 
+void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)->setTabToLinksEnabled(enabled);
+}
+
+bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)->tabToLinksEnabled();
+}
+
 void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
     toImpl(preferencesRef)->setScrollingPerformanceLoggingEnabled(enabled);

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (127965 => 127966)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h	2012-09-08 10:48:09 UTC (rev 127966)
@@ -204,6 +204,10 @@
 WK_EXPORT bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef);
 
 // Defaults to false
+WK_EXPORT void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef);
+
+// Defaults to false
 WK_EXPORT void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled);
 WK_EXPORT bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef);
 

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (127965 => 127966)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-09-08 10:48:09 UTC (rev 127966)
@@ -131,7 +131,13 @@
 {
     const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
 
-    // FIXME: Need an explicit way to set "WebKitTabToLinksPreferenceKey" directly in WebPage.
+    if (preference == "WebKitTabToLinksPreferenceKey") {
+       WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::tabsToLinksKey(), enabled);
+       for (HashSet<Page*>::iterator i = pages.begin(); i != pages.end(); ++i) {
+            WebPage* webPage = static_cast<WebFrameLoaderClient*>((*i)->mainFrame()->loader()->client())->webFrame()->page();
+            webPage->setTabToLinksEnabled(enabled);
+        }
+    }
 
     if (preference == "WebKit2AsynchronousPluginInitializationEnabled") {
         WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledKey(), enabled);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (127965 => 127966)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2012-09-08 10:48:09 UTC (rev 127966)
@@ -581,6 +581,8 @@
     void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
     bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
     void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
+    void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; }
+    bool tabToLinksEnabled() const { return m_tabToLinks; }
 
     bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
     void setScrollingPerformanceLoggingEnabled(bool);

Modified: trunk/Tools/ChangeLog (127965 => 127966)


--- trunk/Tools/ChangeLog	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Tools/ChangeLog	2012-09-08 10:48:09 UTC (rev 127966)
@@ -1,3 +1,17 @@
+2012-09-08  Christophe Dumez  <[email protected]>
+
+        [WK2] New fast/events/tab-focus-link-in-canvas fails from r126908
+        https://bugs.webkit.org/show_bug.cgi?id=95329
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Explicitely disable TabToLinks setting in WebKitTestRunner.
+        Tests override the "WebKitTabToLinksPreferenceKey" preference
+        to enable it.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetStateToConsistentValues):
+
 2012-09-08  Kenichi Ishibashi  <[email protected]>
 
         webkit.py gdb pretty printer can't print CString

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (127965 => 127966)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2012-09-08 07:36:18 UTC (rev 127965)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2012-09-08 10:48:09 UTC (rev 127966)
@@ -475,6 +475,7 @@
     WKPreferencesSetAsynchronousPluginInitializationEnabled(preferences, false);
     WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(preferences, false);
     WKPreferencesSetArtificialPluginInitializationDelayEnabled(preferences, false);
+    WKPreferencesSetTabToLinksEnabled(preferences, false);
 
 // [Qt][WK2]REGRESSION(r104881):It broke hundreds of tests
 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=76247
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to