+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.
virtual void setStatusbarText(const String&) { }
- virtual bool tabsToLinks() const { return false; }
+ virtual KeyboardUIMode keyboardUIMode() { return KeyboardAccessDefault; }
virtual IntRect windowResizerRect() const { return IntRect(); }
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;
#endif
#if PLATFORM(MAC)
- virtual KeyboardUIMode keyboardUIMode() { return KeyboardAccessDefault; }
-
virtual NSResponder *firstResponder() { return 0; }
virtual void makeFirstResponder(NSResponder *) { }
if (!page)
return false;
- bool tabsToLinksClientCallResult = page->chrome()->client()->tabsToLinks();
+ bool tabsToLinksClientCallResult = page->chrome()->client()->keyboardUIMode() & KeyboardAccessTabsToLinks;
return eventInvertsTabsToLinksClientCallResult(event) ? !tabsToLinksClientCallResult : tabsToLinksClientCallResult;
}
+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.
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
#include "ChromeClientChromium.h"
#include "PopupMenu.h"
#include "SearchPopupMenu.h"
+#include "WebCoreKeyboardUIMode.h"
namespace WebCore {
class AccessibilityObject;
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);
+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.
return ewk_view_should_interrupt_javascript(m_view);
}
-bool ChromeClientEfl::tabsToLinks() const
+KeyboardUIMode ChromeClientEfl::keyboardUIMode()
{
- return true;
+ return KeyboardAccessTabsToLinks;
}
IntRect ChromeClientEfl::windowResizerRect() const
#include "ChromeClient.h"
#include "KURL.h"
#include "PopupMenu.h"
+#include "WebCoreKeyboardUIMode.h"
typedef struct _Evas_Object Evas_Object;
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;
+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.
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
#include "KURL.h"
#include "PopupMenu.h"
#include "SearchPopupMenu.h"
+#include "WebCoreKeyboardUIMode.h"
typedef struct _WebKitWebView WebKitWebView;
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;
+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.
return false;
}
-bool ChromeClientHaiku::tabsToLinks() const
+KeyboardUIMode ChromeClientHaiku::keyboardUIMode()
{
- return false;
+ return KeyboardAccessDefault;
}
IntRect ChromeClientHaiku::windowResizerRect() const
#include "ChromeClient.h"
#include "FloatRect.h"
#include "RefCounted.h"
+#include "WebCoreKeyboardUIMode.h"
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);
+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.
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);
[localPool drain];
}
-bool WebChromeClient::tabsToLinks() const
-{
- return [[m_webView preferences] tabsToLinks];
-}
-
IntRect WebChromeClient::windowResizerRect() const
{
NSRect rect = [[m_webView window] _growBoxRect];
// 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
+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.
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
#include "KURL.h"
#include "PlatformString.h"
#include "QtPlatformPlugin.h"
+#include "WebCoreKeyboardUIMode.h"
QT_BEGIN_NAMESPACE
class QEventLoop;
virtual void setStatusbarText(const String&);
- virtual bool tabsToLinks() const;
+ virtual WebCore::KeyboardUIMode keyboardUIMode();
virtual IntRect windowResizerRect() const;
virtual void invalidateWindow(const IntRect&, bool);
+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.
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
#include <WebCore/GraphicsContext.h>
#include <WebCore/FocusDirection.h>
#include <WebCore/ScrollTypes.h>
+#include <WebCore/WebCoreKeyboardUIMode.h>
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
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);
+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.
return false;
}
-bool ChromeClientWinCE::tabsToLinks() const
+KeyboardUIMode ChromeClientWinCE::keyboardUIMode()
{
- return true;
+ return KeyboardAccessTabsToLinks;
}
IntRect ChromeClientWinCE::windowResizerRect() const
#define ChromeClientWinCE_h
#include "ChromeClient.h"
+#include "WebCoreKeyboardUIMode.h"
class WebView;
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;
+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.
return false;
}
-bool ChromeClientWx::tabsToLinks() const
+KeyboardUIMode ChromeClientWx::keyboardUIMode()
{
notImplemented();
- return false;
+ return KeyboardAccessDefault;
}
IntRect ChromeClientWx::windowResizerRect() const
#include "ChromeClient.h"
#include "FocusDirection.h"
#include "IntRect.h"
+#include "WebCoreKeyboardUIMode.h"
#include "WebView.h"
namespace WebCore {
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);
+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.
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;
return false;
}
-bool WebChromeClient::tabsToLinks() const
+KeyboardUIMode WebChromeClient::keyboardUIMode()
{
- return m_page->tabsToLinks();
+ return m_page->keyboardUIMode();
}
IntRect WebChromeClient::windowResizerRect() const
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.
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
#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>
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*);
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);
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);
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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
#import "config.h"
#import "WebProcess.h"
+#import "FullKeyboardAccessWatcher.h"
#import "SandboxExtension.h"
#import "WebProcessCreationParameters.h"
#import <WebCore/MemoryCache.h>
[[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)
{