Reviewed by Darin Adler.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 21:34:20 +0000 (21:34 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 21:34:20 +0000 (21:34 +0000)
        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
        https://bugs.webkit.org/show_bug.cgi?id=55633
        <rdar://problem/8963023>

        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
        * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
        (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
        (-[FullKeyboardAccessWatcher init]):
        (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
        Get the current state of full keyboard access, listening for change notifications.

        * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().

        * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
        WebKit1 also doesn't implement this on platforms other than Mac.

        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
        Just ask FullKeyboardAccessWatcher.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        Added keyboardUIMode(), removed tabsToLinks().

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
        * WebProcess/WebPage/WebPage.h:
        Generate keyboard UI mode from tabToLinks preference and current state of FKA.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80279 268f45cc-cd09-0410-ab3c-d52691b4dbfc

43 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/EventHandler.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ChromeClientImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/haiku/ChangeLog
Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.h [new file with mode: 0644]
Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.mm [new file with mode: 0644]
Source/WebKit2/WebProcess/mac/WebProcessMac.mm

index d603ed7238ab23b2ddbe4b5df0d681c23a6f4787..66e40b33c8c72065b910734200ec0bbb1ecd56b2 100644 (file)
@@ -1,3 +1,17 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * loader/EmptyClients.h: (WebCore::EmptyChromeClient::keyboardUIMode):
+        * page/ChromeClient.h:
+        * page/EventHandler.cpp: (WebCore::EventHandler::tabsToLinks):
+        Merged tabsToLinks() and keyboardUIMode(). The latter returned a superset of information
+        returned by former.
+
 2011-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Fix Win compile break, caused by r80276.
index f8bbabb8d31d283e78490faf4f937c3fac7a6de0..ce95c9cea79ae42882a46d7898979d901f379642 100644 (file)
@@ -152,7 +152,7 @@ public:
 
     virtual void setStatusbarText(const String&) { }
 
-    virtual bool tabsToLinks() const { return false; }
+    virtual KeyboardUIMode keyboardUIMode() { return KeyboardAccessDefault; }
 
     virtual IntRect windowResizerRect() const { return IntRect(); }
 
index 01bbd78b54cf3f6c3df6a906d0b8ff1f6aa9bde8..35aaa590acc34033895c38d22670c0e1672c5bfc 100644 (file)
@@ -132,7 +132,7 @@ namespace WebCore {
         virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result) = 0;
         virtual void setStatusbarText(const String&) = 0;
         virtual bool shouldInterruptJavaScript() = 0;
-        virtual bool tabsToLinks() const = 0;
+        virtual KeyboardUIMode keyboardUIMode() = 0;
 
 #if ENABLE(REGISTER_PROTOCOL_HANDLER)
         virtual void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title) = 0;
@@ -277,8 +277,6 @@ namespace WebCore {
 #endif
 
 #if PLATFORM(MAC)
-        virtual KeyboardUIMode keyboardUIMode() { return KeyboardAccessDefault; }
-
         virtual NSResponder *firstResponder() { return 0; }
         virtual void makeFirstResponder(NSResponder *) { }
 
index 1a4eabb05ea398665be9e111514734f2aba0fa8f..727426ef05717848a57ab81fe74092af21a74b21 100644 (file)
@@ -2753,7 +2753,7 @@ bool EventHandler::tabsToLinks(KeyboardEvent* event) const
     if (!page)
         return false;
 
-    bool tabsToLinksClientCallResult = page->chrome()->client()->tabsToLinks();
+    bool tabsToLinksClientCallResult = page->chrome()->client()->keyboardUIMode() & KeyboardAccessTabsToLinks;
     return eventInvertsTabsToLinksClientCallResult(event) ? !tabsToLinksClientCallResult : tabsToLinksClientCallResult;
 }
 
index 91940765139b9120d1d4caf0afeb3d1dda5cd0d4..efbced1d0591df64957ac3a845f91aa7e1ad32c0 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * src/ChromeClientImpl.cpp: (WebKit::ChromeClientImpl::keyboardUIMode):
+        * src/ChromeClientImpl.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-03  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r80219.
index 992e26cf9b321dd0e9710d4c4bf2d9dcb1d7aba9..1e639ec3d01580da84b2d7d1383b1fcff9f1cda2 100644 (file)
@@ -485,14 +485,9 @@ bool ChromeClientImpl::shouldInterruptJavaScript()
     return false;
 }
 
-bool ChromeClientImpl::tabsToLinks() const
-{
-    // Returns true if anchors should accept keyboard focus with the tab key.
-    // This method is used in a convoluted fashion by EventHandler::tabsToLinks.
-    // It's a twisted path (self-evident, but more complicated than seems
-    // necessary), but the net result is that returning true from here, on a
-    // platform other than MAC or QT, lets anchors get keyboard focus.
-    return m_webView->tabsToLinks();
+KeyboardUIMode ChromeClientImpl::keyboardUIMode()
+{
+    return m_webView->tabsToLinks() ? KeyboardAccessTabsToLinks : KeyboardAccessDefault;
 }
 
 IntRect ChromeClientImpl::windowResizerRect() const
index 7d437756c92e02a7785b9118df32a7d60b3fa1e2..671767aa9bcd36c408d235dbd0f285ad6ff33eb6 100644 (file)
@@ -35,6 +35,7 @@
 #include "ChromeClientChromium.h"
 #include "PopupMenu.h"
 #include "SearchPopupMenu.h"
+#include "WebCoreKeyboardUIMode.h"
 
 namespace WebCore {
 class AccessibilityObject;
@@ -101,7 +102,7 @@ public:
         const WTF::String& defaultValue, WTF::String& result);
     virtual void setStatusbarText(const WTF::String& message);
     virtual bool shouldInterruptJavaScript();
-    virtual bool tabsToLinks() const;
+    virtual WebCore::KeyboardUIMode keyboardUIMode();
     virtual WebCore::IntRect windowResizerRect() const;
 #if ENABLE(REGISTER_PROTOCOL_HANDLER)
     virtual void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
index 1accad892435a00fa949caf94d4379c61fc5e9aa..9c8c5a73e173515c63dce36fe9cad226b46c4a32 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/ChromeClientEfl.cpp: (WebCore::ChromeClientEfl::keyboardUIMode):
+        * WebCoreSupport/ChromeClientEfl.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
 
         Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
index 6425c3942f119cf111508962391238cfd9756b7e..a1851c530308824c5cdf2b63bdd5adc485f2eef0 100644 (file)
@@ -305,9 +305,9 @@ bool ChromeClientEfl::shouldInterruptJavaScript()
     return ewk_view_should_interrupt_javascript(m_view);
 }
 
-bool ChromeClientEfl::tabsToLinks() const
+KeyboardUIMode ChromeClientEfl::keyboardUIMode()
 {
-    return true;
+    return KeyboardAccessTabsToLinks;
 }
 
 IntRect ChromeClientEfl::windowResizerRect() const
index c17fe1092c8da1ae8c698fb8ac95d47ad5d9ef2b..2dc39229fc3484cc0efe29aaa59014711dbbe73c 100644 (file)
@@ -27,6 +27,7 @@
 #include "ChromeClient.h"
 #include "KURL.h"
 #include "PopupMenu.h"
+#include "WebCoreKeyboardUIMode.h"
 
 typedef struct _Evas_Object Evas_Object;
 
@@ -91,7 +92,7 @@ public:
     virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
     virtual void setStatusbarText(const String&);
     virtual bool shouldInterruptJavaScript();
-    virtual bool tabsToLinks() const;
+    virtual WebCore::KeyboardUIMode keyboardUIMode();
 
     virtual IntRect windowResizerRect() const;
 
index 4d3ec95fb5d3384dda736a6b0381fddd5c23d100..0e5c978b835316bff91513b34922e4c178cb7fc6 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/ChromeClientGtk.cpp: (WebKit::ChromeClient::keyboardUIMode):
+        * WebCoreSupport/ChromeClientGtk.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-03  Lukasz Slachciak  <l.slachciak@samsung.com>
 
         Reviewed by Xan Lopez.
index d17dec0e7da1b9ea6255710555e09ae0a6e2d68a..206b504e66005c1fc77ade96694d8ce7421a22fe 100644 (file)
@@ -355,12 +355,13 @@ bool ChromeClient::shouldInterruptJavaScript()
     return false;
 }
 
-bool ChromeClient::tabsToLinks() const
+KeyboardUIMode ChromeClient::keyboardUIMode()
 {
+    bool tabsToLinks = true;
     if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
-        return DumpRenderTreeSupportGtk::linksIncludedInFocusChain();
+        tabsToLinks = DumpRenderTreeSupportGtk::linksIncludedInFocusChain();
 
-    return true;
+    return tabsToLinks ? KeyboardAccessTabsToLinks : KeyboardAccessDefault;
 }
 
 IntRect ChromeClient::windowResizerRect() const
index 4017f7426b7e91a60b7a99fae3963fe52a4887fe..cfccfc213528b8de1da9f0926a3cf76aa3d73ade 100644 (file)
@@ -25,6 +25,7 @@
 #include "KURL.h"
 #include "PopupMenu.h"
 #include "SearchPopupMenu.h"
+#include "WebCoreKeyboardUIMode.h"
 
 typedef struct _WebKitWebView WebKitWebView;
 
@@ -91,7 +92,7 @@ namespace WebKit {
         virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& message, const WTF::String& defaultValue, WTF::String& result);
         virtual void setStatusbarText(const WTF::String&);
         virtual bool shouldInterruptJavaScript();
-        virtual bool tabsToLinks() const;
+        virtual WebCore::KeyboardUIMode keyboardUIMode();
 
         virtual WebCore::IntRect windowResizerRect() const;
 
index ce84a1f38133c31dc77da4004d6b2590b3b1e4d5..f4ddcad9a394912379960f0b336cd60edb6a877c 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/ChromeClientHaiku.cpp: (WebCore::ChromeClientHaiku::keyboardUIMode):
+        * WebCoreSupport/ChromeClientHaiku.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-02-28  Chang Shu  <cshu@webkit.org>
 
         Reviewed by Ryosuke Niwa.
index 6ed11ea8bc6e8e6ec9f85e2504ca96e222171889..b16e08c8949189c40fa15b01c50c3a0d3f66eeb4 100644 (file)
@@ -253,9 +253,9 @@ bool ChromeClientHaiku::shouldInterruptJavaScript()
     return false;
 }
 
-bool ChromeClientHaiku::tabsToLinks() const
+KeyboardUIMode ChromeClientHaiku::keyboardUIMode()
 {
-    return false;
+    return KeyboardAccessDefault;
 }
 
 IntRect ChromeClientHaiku::windowResizerRect() const
index 3298c3796ac1b911f9fcc090132e94daf9e79673..b86579359a2ac3d138c3121bd5bf77cddac4cb72 100644 (file)
@@ -32,6 +32,7 @@
 #include "ChromeClient.h"
 #include "FloatRect.h"
 #include "RefCounted.h"
+#include "WebCoreKeyboardUIMode.h"
 
 namespace WebCore {
 
@@ -101,7 +102,7 @@ namespace WebCore {
         virtual bool shouldInterruptJavaScript();
 
         virtual void setStatusbarText(const WTF::String&);
-        virtual bool tabsToLinks() const;
+        virtual WebCore::KeyboardUIMode keyboardUIMode();
         virtual IntRect windowResizerRect() const;
 
         virtual void invalidateWindow(const IntRect&, bool);
index 2770ab863d8387aea0c29db00d52328893741cb3..f1bffdf74b25f5b4f57e8f8c1e07b6b9d5ae1cc4 100644 (file)
@@ -1,3 +1,20 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        Removed tabsToLinks(). Mac WebKit already implements keyboardUIMode().
+
+        * WebView/WebView.mm: (-[WebView _retrieveKeyboardUIModeFromPreferences:]):
+        Removed an incorrect comment. We actually get a value of 2 on Snow Leopard, and we don't
+        require both bits to be set. The rest of the comment might be wrong too, but I'm not sure,
+        so I've preserved it.
+
 2011-03-02  Jessie Berlin  <jberlin@apple.com>
 
         Rubber-stamped by Dan Bernstein.
index dda0bb1dd3a4ce6625ecdfe5c060e290f866db9f..3129fae18a3d573c59c705b3fdb5041621088275 100644 (file)
@@ -88,8 +88,6 @@ public:
     virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& message, const WTF::String& defaultValue, WTF::String& result);
     virtual bool shouldInterruptJavaScript();
 
-    virtual bool tabsToLinks() const;
-    
     virtual WebCore::IntRect windowResizerRect() const;
 
     virtual void invalidateWindow(const WebCore::IntRect&, bool);
index 0df1e78bc5a3c06f8c16548f93e493ef247583af..99b817b4ae616d06df3abbb3068716fe8ebf79a6 100644 (file)
@@ -546,11 +546,6 @@ void WebChromeClient::setStatusbarText(const String& status)
     [localPool drain];
 }
 
-bool WebChromeClient::tabsToLinks() const
-{
-    return [[m_webView preferences] tabsToLinks];
-}
-
 IntRect WebChromeClient::windowResizerRect() const
 {
     NSRect rect = [[m_webView window] _growBoxRect];
index 8fb06d6644e79cdee0e5bfc1aecca92336470570..c7605a0c8ff7e830aa0f110d694bdb44629782d7 100644 (file)
@@ -5895,10 +5895,6 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
     // The keyboard access mode is reported by two bits:
     // Bit 0 is set if feature is on
     // Bit 1 is set if full keyboard access works for any control, not just text boxes and lists
-    // We require both bits to be on.
-    // I do not know that we would ever get one bit on and the other off since
-    // checking the checkbox in system preferences which is marked as "Turn on full keyboard access"
-    // turns on both bits.
     _private->_keyboardUIMode = (mode & 0x2) ? KeyboardAccessFull : KeyboardAccessDefault;
     
     // check for tabbing to links
index c69e3fa7e42cf7f7c197b18490c7418c8bd2ea10..723251af1757d445ca6ba05677135e86c63578fe 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/ChromeClientQt.cpp (WebCore::ChromeClientQt::keyboardUIMode):
+        * WebCoreSupport/ChromeClientQt.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-03  Alexis Menard  <alexis.menard@openbossa.org>
 
         Reviewed by Andreas Kling.
index fb9b96c21f1b6771aba62e8d79a28d8d4d79dc25..c78437516a6f02e294f7814c7580792e339f3231 100644 (file)
@@ -354,9 +354,10 @@ bool ChromeClientQt::shouldInterruptJavaScript()
     return shouldInterrupt;
 }
 
-bool ChromeClientQt::tabsToLinks() const
+KeyboardUIMode ChromeClientQt::keyboardUIMode()
 {
-    return m_webPage->settings()->testAttribute(QWebSettings::LinksIncludedInFocusChain);
+    return m_webPage->settings()->testAttribute(QWebSettings::LinksIncludedInFocusChain)
+        ? KeyboardAccessTabsToLinks : KeyboardAccessDefault;
 }
 
 IntRect ChromeClientQt::windowResizerRect() const
index f1b377cce0950d7cba98e2dc4223e9c39bc04442..3c6bd431aaa9dadd1bc6767df983b685040b06cb 100644 (file)
@@ -35,6 +35,7 @@
 #include "KURL.h"
 #include "PlatformString.h"
 #include "QtPlatformPlugin.h"
+#include "WebCoreKeyboardUIMode.h"
 
 QT_BEGIN_NAMESPACE
 class QEventLoop;
@@ -112,7 +113,7 @@ namespace WebCore {
 
         virtual void setStatusbarText(const String&);
 
-        virtual bool tabsToLinks() const;
+        virtual WebCore::KeyboardUIMode keyboardUIMode();
         virtual IntRect windowResizerRect() const;
 
         virtual void invalidateWindow(const IntRect&, bool);
index fce7c7d9eacbee884d88cf819be128f3aa60d298..220b7485d935ec244ed574caac9fa67b43f90c7b 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::keyboardUIMode):
+        * WebCoreSupport/WebChromeClient.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-03  Peter Kasting  <pkasting@google.com>
 
         Reviewed by James Robinson.
index 47ca713330429b2f8b63f694916d4af230be4bf8..65537f425517b1623821c8e5be9b3513c9f8fd1e 100644 (file)
@@ -448,14 +448,14 @@ bool WebChromeClient::shouldInterruptJavaScript()
     return false;
 }
 
-bool WebChromeClient::tabsToLinks() const
+KeyboardUIMode WebChromeClient::keyboardUIMode()
 {
     BOOL enabled = FALSE;
     IWebPreferences* preferences;
     if (SUCCEEDED(m_webView->preferences(&preferences)))
         preferences->tabsToLinks(&enabled);
 
-    return !!enabled;
+    return enabled ? KeyboardAccessTabsToLinks : KeyboardAccessDefault;
 }
 
 IntRect WebChromeClient::windowResizerRect() const
index 9298f1c3cc967f3dbb10cc272f58426b319e841c..f672c8981d16c39638a1330feadd0af790714d7c 100644 (file)
@@ -29,6 +29,7 @@
 #include <WebCore/GraphicsContext.h>
 #include <WebCore/FocusDirection.h>
 #include <WebCore/ScrollTypes.h>
+#include <WebCore/WebCoreKeyboardUIMode.h>
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
 
@@ -92,7 +93,7 @@ public:
     virtual void setStatusbarText(const WTF::String&);
     virtual bool shouldInterruptJavaScript();
 
-    virtual bool tabsToLinks() const;
+    virtual WebCore::KeyboardUIMode keyboardUIMode();
     virtual WebCore::IntRect windowResizerRect() const;
 
     virtual void invalidateWindow(const WebCore::IntRect&, bool);
index 7b8a97a21004f0d5d3529fa2772bbcc79cc48b8d..142518b12df8027b76f62ddc868070475b594d1b 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebCoreSupport/ChromeClientWinCE.cpp: (WebKit::ChromeClientWinCE::keyboardUIMode):
+        * WebCoreSupport/ChromeClientWinCE.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-02  Brian Weinstein  <bweinstein@apple.com>
 
         WinCE build fix.
index 3430c66d37581c54629e81c477f12c3634d254a7..4424c01512d3001658b235d965732227fb4083a6 100644 (file)
@@ -219,9 +219,9 @@ bool ChromeClientWinCE::shouldInterruptJavaScript()
     return false;
 }
 
-bool ChromeClientWinCE::tabsToLinks() const
+KeyboardUIMode ChromeClientWinCE::keyboardUIMode()
 {
-    return true;
+    return KeyboardAccessTabsToLinks;
 }
 
 IntRect ChromeClientWinCE::windowResizerRect() const
index 781989de204b77e1091dc1dca0d427e1f1383e0e..50ce2c258af3cdb3dd18080a61639ef8e87fbdcd 100644 (file)
@@ -26,6 +26,7 @@
 #define ChromeClientWinCE_h
 
 #include "ChromeClient.h"
+#include "WebCoreKeyboardUIMode.h"
 
 class WebView;
 
@@ -89,7 +90,7 @@ public:
     virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& message, const WTF::String& defaultValue, WTF::String& result);
     virtual void setStatusbarText(const WTF::String&);
     virtual bool shouldInterruptJavaScript();
-    virtual bool tabsToLinks() const;
+    virtual WebCore::KeyboardUIMode keyboardUIMode();
 
     virtual WebCore::IntRect windowResizerRect() const;
 
index c67d385d90efb9c5963061095f80dc85605cea2a..a0801c97c4c755e153609dd3417b8ebcee72e42d 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebKitSupport/ChromeClientWx.cpp: (WebCore::ChromeClientWx::keyboardUIMode):
+        * WebKitSupport/ChromeClientWx.h:
+        Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+        this platform doesn't observe or have full keyboard access state.
+
 2011-03-01  Kevin Ollivier  <kevino@theolliviers.com>
 
         [wx] Build fix after removal of Frame::isContentEditable.
index 026d8a6fcadfbfba68d77bdda092454c8e86eeb0..d525c09ac10daa3fc7be10496bafa9ca06c8dc2f 100644 (file)
@@ -333,10 +333,10 @@ bool ChromeClientWx::shouldInterruptJavaScript()
     return false;
 }
 
-bool ChromeClientWx::tabsToLinks() const
+KeyboardUIMode ChromeClientWx::keyboardUIMode()
 {
     notImplemented();
-    return false;
+    return KeyboardAccessDefault;
 }
 
 IntRect ChromeClientWx::windowResizerRect() const
index 94e65046bd0581c26529278c56483282a1819b19..079a0c939212cfda93abe6aae74ddab86fa99179 100644 (file)
@@ -32,6 +32,7 @@
 #include "ChromeClient.h"
 #include "FocusDirection.h"
 #include "IntRect.h"
+#include "WebCoreKeyboardUIMode.h"
 #include "WebView.h"
 
 namespace WebCore {
@@ -98,7 +99,7 @@ public:
     virtual void setStatusbarText(const String&);
     virtual bool shouldInterruptJavaScript();
     
-    virtual bool tabsToLinks() const;
+    virtual WebCore::KeyboardUIMode keyboardUIMode();
 
     virtual IntRect windowResizerRect() const;
     virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect);
index 109d78627f36862071a8db2d8cb1c91d623a8023..3b506cd7f940b733499baedaafb438761aea7562 100644 (file)
@@ -1,3 +1,35 @@
+2011-03-03  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+        https://bugs.webkit.org/show_bug.cgi?id=55633
+        <rdar://problem/8963023>
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
+        * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
+        (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
+        (-[FullKeyboardAccessWatcher init]):
+        (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
+        Get the current state of full keyboard access, listening for change notifications.
+
+        * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
+
+        * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
+        WebKit1 also doesn't implement this on platforms other than Mac.
+
+        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
+        Just ask FullKeyboardAccessWatcher.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        Added keyboardUIMode(), removed tabsToLinks().
+
+        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
+        * WebProcess/WebPage/WebPage.h:
+        Generate keyboard UI mode from tabToLinks preference and current state of FKA.
+
 2011-03-03  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index f26cb3d35174558f67c6ae5dcad1d77a81829832..76679b7493e45d22725b599cad38ea2bf86c609d 100644 (file)
                E18C92F412DB9E7100CF2AEB /* PrintInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18C92F312DB9E7100CF2AEB /* PrintInfo.cpp */; };
                E18C92F512DB9E7A00CF2AEB /* PrintInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18C92F312DB9E7100CF2AEB /* PrintInfo.cpp */; };
                E18C92F612DB9E9400CF2AEB /* PrintInfoMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */; };
+               E1BB16A413201B9B00F49431 /* FullKeyboardAccessWatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BB1688132018BA00F49431 /* FullKeyboardAccessWatcher.h */; };
+               E1BB16A513201B9B00F49431 /* FullKeyboardAccessWatcher.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1BB1689132018BA00F49431 /* FullKeyboardAccessWatcher.mm */; };
                E1CC1B9012D7EADF00625838 /* PrintInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E1CC1B8E12D7EADF00625838 /* PrintInfo.h */; };
                E1CC1B9112D7EADF00625838 /* PrintInfoMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */; };
                E1EE53E311F8CFC000CCBEE4 /* InjectedBundlePageEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */; };
                E134F01512EA5D11004EC58D /* WKPrintingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPrintingView.h; sourceTree = "<group>"; };
                E134F01912EA5D99004EC58D /* WKPrintingView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKPrintingView.mm; sourceTree = "<group>"; };
                E18C92F312DB9E7100CF2AEB /* PrintInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrintInfo.cpp; sourceTree = "<group>"; };
+               E1BB1688132018BA00F49431 /* FullKeyboardAccessWatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullKeyboardAccessWatcher.h; sourceTree = "<group>"; };
+               E1BB1689132018BA00F49431 /* FullKeyboardAccessWatcher.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = FullKeyboardAccessWatcher.mm; sourceTree = "<group>"; };
                E1CC1B8E12D7EADF00625838 /* PrintInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrintInfo.h; sourceTree = "<group>"; };
                E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PrintInfoMac.mm; sourceTree = "<group>"; };
                E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageEditorClient.h; sourceTree = "<group>"; };
                        children = (
                                1A6FA01D11E1526300DB1371 /* WebProcessMainMac.mm */,
                                BC3065C312592F8900E71278 /* WebProcessMac.mm */,
+                               E1BB1688132018BA00F49431 /* FullKeyboardAccessWatcher.h */,
+                               E1BB1689132018BA00F49431 /* FullKeyboardAccessWatcher.mm */,
                        );
                        path = mac;
                        sourceTree = "<group>";
                                BCE81D8D1319F7EF00241910 /* FontInfo.h in Headers */,
                                BCE81D99131AE02100241910 /* DictionaryPopupInfo.h in Headers */,
                                37C4E9F6131C6E7E0029BD5A /* config.h in Headers */,
+                               E1BB16A413201B9B00F49431 /* FullKeyboardAccessWatcher.h in Headers */,
                                33AA1067131F060000D4A575 /* WebCookieManagerProxyClient.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                                3309345A1315B9980097A7BC /* WKCookieManager.cpp in Sources */,
                                BCE81D8C1319F7EF00241910 /* FontInfo.cpp in Sources */,
                                BCE81D98131AE02100241910 /* DictionaryPopupInfo.cpp in Sources */,
+                               E1BB16A513201B9B00F49431 /* FullKeyboardAccessWatcher.mm in Sources */,
                                33AA1066131F060000D4A575 /* WebCookieManagerProxyClient.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
index 18ba26b7b8022cf7bcbc98f24a927c694ae8c9ab..c320bc212b94cf3d228f73d578988a8802d881fc 100644 (file)
@@ -336,9 +336,9 @@ bool WebChromeClient::shouldInterruptJavaScript()
     return false;
 }
 
-bool WebChromeClient::tabsToLinks() const
+KeyboardUIMode WebChromeClient::keyboardUIMode()
 {
-    return m_page->tabsToLinks();
+    return m_page->keyboardUIMode();
 }
 
 IntRect WebChromeClient::windowResizerRect() const
index 82ba36e37967979a5a7542a326c627712a536b93..96da752a65393c330ed2ebf3a546186812f7c205 100644 (file)
@@ -102,8 +102,9 @@ private:
     virtual bool runJavaScriptPrompt(WebCore::Frame*, const String& message, const String& defaultValue, String& result);
     virtual void setStatusbarText(const String&);
     virtual bool shouldInterruptJavaScript();
-    virtual bool tabsToLinks() const;
-    
+
+    virtual WebCore::KeyboardUIMode keyboardUIMode();
+
     virtual WebCore::IntRect windowResizerRect() const;
     
     // Methods used by HostWindow.
index 24371e3211d72bf7858cbfc321b4d695c54f6034..bfb4e96aeb8ef94438b4b999272cd56af37885ec 100644 (file)
@@ -1192,6 +1192,12 @@ IntRect WebPage::windowResizerRect() const
                    m_windowResizerSize.width(), m_windowResizerSize.height());
 }
 
+KeyboardUIMode WebPage::keyboardUIMode()
+{
+    bool fullKeyboardAccessEnabled = WebProcess::shared().fullKeyboardAccessEnabled();
+    return static_cast<KeyboardUIMode>((fullKeyboardAccessEnabled ? KeyboardAccessFull : KeyboardAccessDefault) | (m_tabToLinks ? KeyboardAccessTabsToLinks : 0));
+}
+
 void WebPage::runJavaScriptInMainFrame(const String& script, uint64_t callbackID)
 {
     // NOTE: We need to be careful when running scripts that the objects we depend on don't
index 5fa230a01f033202dae0b73cb4ea8f4ff31644d9..2ef15d83481dc7119bd5a91b5dfa850587617deb 100644 (file)
@@ -46,6 +46,7 @@
 #include <WebCore/Editor.h>
 #include <WebCore/FrameLoaderTypes.h>
 #include <WebCore/IntRect.h>
+#include <WebCore/WebCoreKeyboardUIMode.h>
 #include <wtf/HashMap.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassRefPtr.h>
@@ -153,7 +154,7 @@ public:
     void show();
     String userAgent() const { return m_userAgent; }
     WebCore::IntRect windowResizerRect() const;
-    bool tabsToLinks() const { return m_tabToLinks; }
+    WebCore::KeyboardUIMode keyboardUIMode();
 
     WebEditCommand* webEditCommand(uint64_t);
     void addWebEditCommand(uint64_t, WebEditCommand*);
index 4cfa8b45e621759d55eab2a0e449e03516a26196..6de748f84d6bed4200ee393a9cc7fb38cdf8e95e 100644 (file)
@@ -291,6 +291,13 @@ void WebProcess::addVisitedLink(WebCore::LinkHash linkHash)
     m_connection->send(Messages::WebContext::AddVisitedLinkHash(linkHash), 0);
 }
 
+#if !PLATFORM(MAC)
+bool WebProcess::fullKeyboardAccessEnabled()
+{
+    return false;
+}
+#endif
+
 void WebProcess::setCacheModel(uint32_t cm)
 {
     CacheModel cacheModel = static_cast<CacheModel>(cm);
index 772d77fbbac487a483655431f1da6c58bcb844ce..946bb690bb5f5ba7559299d5a9f175ff3c2f2f1d 100644 (file)
@@ -88,6 +88,8 @@ public:
     void addVisitedLink(WebCore::LinkHash);
     bool isLinkVisited(WebCore::LinkHash) const;
 
+    bool fullKeyboardAccessEnabled();
+
     WebFrame* webFrame(uint64_t) const;
     void addWebFrame(uint64_t, WebFrame*);
     void removeWebFrame(uint64_t);
diff --git a/Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.h b/Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.h
new file mode 100644 (file)
index 0000000..d6212b2
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FullKeyboardAccessWatcher_h
+#define FullKeyboardAccessWatcher_h
+
+#import <Cocoa/Cocoa.h>
+
+@interface FullKeyboardAccessWatcher : NSObject {
+@private
+    BOOL fullKeyboardAccessEnabled;
+}
+
++ (BOOL)fullKeyboardAccessEnabled;
+
+@end;
+
+#endif // FullKeyboardAccessWatcher_h
diff --git a/Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.mm b/Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.mm
new file mode 100644 (file)
index 0000000..5fbcf9d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "FullKeyboardAccessWatcher.h"
+
+const NSString *KeyboardUIModeDidChangeNotification = @"com.apple.KeyboardUIModeDidChange";
+const CFStringRef AppleKeyboardUIMode = CFSTR("AppleKeyboardUIMode");
+const CFStringRef UniversalAccessDomain = CFSTR("com.apple.universalaccess");
+
+@implementation FullKeyboardAccessWatcher
+
+- (void)retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
+{
+    CFPreferencesAppSynchronize(UniversalAccessDomain);
+
+    Boolean keyExistsAndHasValidFormat;
+    int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &keyExistsAndHasValidFormat);
+    if (keyExistsAndHasValidFormat) {
+        // The keyboard access mode is reported by two bits:
+        // Bit 0 is set if feature is on
+        // Bit 1 is set if full keyboard access works for any control, not just text boxes and lists.
+        fullKeyboardAccessEnabled = (mode & 0x2);
+    }
+}
+
+- (id)init
+{
+    self = [super init];
+    if (!self)
+        return nil;
+
+    [self retrieveKeyboardUIModeFromPreferences:nil];
+
+    [[NSDistributedNotificationCenter defaultCenter] 
+        addObserver:self selector:@selector(retrieveKeyboardUIModeFromPreferences:) 
+        name:KeyboardUIModeDidChangeNotification object:nil];
+
+    return self;
+}
+
++ (BOOL)fullKeyboardAccessEnabled
+{
+    static FullKeyboardAccessWatcher *watcher = [[FullKeyboardAccessWatcher alloc] init];
+    return watcher->fullKeyboardAccessEnabled;
+}
+
+@end
index 2665a71b70ffa37c7d49ecc8db797d5750cd3b6e..92b36b839630d625478f1190cb7cae9e7f291444 100644 (file)
@@ -26,6 +26,7 @@
 #import "config.h"
 #import "WebProcess.h"
 
+#import "FullKeyboardAccessWatcher.h"
 #import "SandboxExtension.h"
 #import "WebProcessCreationParameters.h"
 #import <WebCore/MemoryCache.h>
@@ -110,6 +111,11 @@ void WebProcess::platformClearResourceCaches()
     [[NSURLCache sharedURLCache] removeAllCachedResponses];
 }
 
+bool WebProcess::fullKeyboardAccessEnabled()
+{
+    return [FullKeyboardAccessWatcher fullKeyboardAccessEnabled];
+}
+
 #if ENABLE(WEB_PROCESS_SANDBOX)
 static void appendSandboxParameterPath(Vector<const char*>& vector, const char* name, const char* path)
 {