+2010-08-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by David Kilzer.
+
+ AX: Support methods for web apps to interact with the native accessibility APIs
+ https://bugs.webkit.org/show_bug.cgi?id=43005
+
+ * GNUmakefile.am:
+
2010-08-02 Balazs Kelemen <kb@inf.u-szeged.hu>
Reviewed by Simon Hausmann.
$(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h
webkitgtk_built_h_api += \
+ DerivedSources/webkit/WebKitDOMAccessibility.h \
DerivedSources/webkit/WebKitDOMCSSRule.h \
DerivedSources/webkit/WebKitDOMCSSRuleList.h \
DerivedSources/webkit/WebKitDOMCSSStyleDeclaration.h \
DerivedSources/webkit/WebKitDOMObject.h \
DerivedSources/webkit/WebKitDOMNavigator.h \
DerivedSources/webkit/WebKitDOMScreen.h \
+ DerivedSources/webkit/WebKitDOMScreenReader.h \
DerivedSources/webkit/WebKitDOMWebKitPoint.h \
DerivedSources/webkit/WebKitDOMDOMMimeType.h \
DerivedSources/webkit/WebKitDOMDOMMimeTypeArray.h \
$(webkitgtk_static_h_api)
webkitgtk_gdom_built_sources += \
+ DerivedSources/webkit/WebKitDOMAccessibility.cpp \
DerivedSources/webkit/WebKitDOMAttr.cpp \
DerivedSources/webkit/WebKitDOMAttrPrivate.h \
DerivedSources/webkit/WebKitDOMBarInfo.cpp \
DerivedSources/webkit/WebKitDOMRangePrivate.h \
DerivedSources/webkit/WebKitDOMScreen.cpp \
DerivedSources/webkit/WebKitDOMScreenPrivate.h \
+ DerivedSources/webkit/WebKitDOMScreenReader.cpp \
DerivedSources/webkit/WebKitDOMStorage.cpp \
DerivedSources/webkit/WebKitDOMStoragePrivate.h \
DerivedSources/webkit/WebKitDOMStyleMedia.cpp \
+2010-08-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by David Kilzer.
+
+ AX: Support methods for web apps to interact with the native accessibility APIs
+ https://bugs.webkit.org/show_bug.cgi?id=43005
+
+ * platform/mac/accessibility/js-accessibility-expected.txt: Added.
+ * platform/mac/accessibility/js-accessibility.html: Added.
+
2010-08-02 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
--- /dev/null
+This tests the javascript interface to accessibility
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS ax.screenReader.active is false
+PASS addedNotification is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS name is 'AXScreenChanged'
+PASS name is 'AXElementsChanged'
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests the javascript interface to accessibility");
+
+ var body = 0;
+ var name = 0;
+ function notifyCallback(notification) {
+ name = notification;
+ if (name == "AXScreenChanged") {
+ shouldBe("name", "'AXScreenChanged'");
+ }
+ else if (name == "AXElementsChanged") {
+ shouldBe("name", "'AXElementsChanged'");
+ body.removeNotificationListener();
+ window.layoutTestController.notifyDone();
+ }
+ }
+</script>
+
+<script>
+ var ax = window.navigator.accessibility;
+
+ // screen reader should not be running within layout tests.
+ shouldBe("ax.screenReader.active", "false");
+
+ // should not cause an error.
+ var version = ax.screenReader.version;
+
+ // should not cause an error
+ var activeElement = ax.screenReader.activeElement;
+
+ if (window.accessibilityController) {
+ window.layoutTestController.waitUntilDone();
+
+ document.getElementById("body").focus();
+
+ body = window.accessibilityController.focusedElement;
+
+ var addedNotification = body.addNotificationListener(notifyCallback);
+ shouldBe("addedNotification", "true");
+
+ // should cause a AXScreenChanged to be sent out.
+ ax.screenChanged();
+
+ // should cause a AXElementsChanged to be sent out.
+ ax.elementsChanged();
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
# above rules. Specifying this explicitly makes -j2 work.
$(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)/bindings/%.h
+# Accessibility
+GEN := \
+ $(intermediates)/bindings/V8Accessibility.h
+ $(intermediates)/bindings/V8ScreenReader.h
+
+$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
+$(GEN): PRIVATE_CUSTOM_TOOL = SOURCE_ROOT=$(PRIVATE_PATH) perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator V8 --include dom --include html --outputdir $(dir $@) $<
+$(GEN): $(intermediates)/bindings/V8%.h : $(LOCAL_PATH)/accessibility/%.idl $(js_binding_scripts)
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+# We also need the .cpp files, which are generated as side effects of the
+# above rules. Specifying this explicitly makes -j2 work.
+$(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)/bindings/%.h
+
# Page
GEN := \
$(intermediates)/bindings/V8BarInfo.h \
$(JAVASCRIPTCORE_PATH)/wrec \
$(JAVASCRIPTCORE_PATH)/ForwardingHeaders \
\
+ $(base_intermediates)/WebCore/accessibility \
$(base_intermediates)/WebCore/bindings/js \
$(base_intermediates)/WebCore/dom \
$(base_intermediates)/WebCore/html/canvas \
+2010-08-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by David Kilzer.
+
+ AX: Support methods for web apps to interact with the native accessibility APIs
+ https://bugs.webkit.org/show_bug.cgi?id=43005
+
+ Adds a new "accessibility" object that hangs off of "window.navigator".
+ This accessibility object will allow web apps to interact with native accessibility APIs
+ to provide a richer experience (for screen reader users primarily).
+
+ Test: platform/mac/accessibility/js-accessibility.html
+
+ * Android.derived.v8bindings.mk:
+ * Android.jscbindings.mk:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ * accessibility/Accessibility.cpp: Added.
+ (WebCore::Accessibility::Accessibility):
+ (WebCore::Accessibility::~Accessibility):
+ (WebCore::Accessibility::disconnectFrame):
+ (WebCore::Accessibility::screenChanged):
+ (WebCore::Accessibility::elementsChanged):
+ (WebCore::Accessibility::screenReader):
+ * accessibility/Accessibility.h: Added.
+ (WebCore::Accessibility::create):
+ * accessibility/Accessibility.idl: Added.
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isScreenReaderRunning):
+ (WebCore::AccessibilityObject::screenReaderFocusedElement):
+ (WebCore::AccessibilityObject::screenReaderVersion):
+ * accessibility/ScreenReader.cpp: Added.
+ (WebCore::ScreenReader::ScreenReader):
+ (WebCore::ScreenReader::~ScreenReader):
+ (WebCore::ScreenReader::disconnectFrame):
+ (WebCore::ScreenReader::active):
+ (WebCore::ScreenReader::activeElement):
+ (WebCore::ScreenReader::version):
+ * accessibility/ScreenReader.h: Added.
+ (WebCore::ScreenReader::create):
+ * accessibility/ScreenReader.idl: Added.
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ (WebCore::AccessibilityObject::isScreenReaderRunning):
+ (WebCore::AccessibilityObject::screenReaderFocusedElement):
+ (WebCore::AccessibilityObject::screenReaderVersion):
+ * page/Navigator.cpp:
+ (WebCore::Navigator::disconnectFrame):
+ (WebCore::Navigator::accessibility):
+ * page/Navigator.h:
+ * page/Navigator.idl:
+
2010-08-02 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
#include "HTMLElementFactory.cpp"
#include "JSAbstractWorker.cpp"
+#include "JSAccessibility.cpp"
#include "JSAttr.cpp"
#include "JSBarInfo.cpp"
#include "JSBeforeLoadEvent.cpp"
#include "JSRect.cpp"
#include "JSRGBColor.cpp"
#include "JSScreen.cpp"
+#include "JSScreenReader.cpp"
#include "JSScriptProfile.cpp"
#include "JSScriptProfileNode.cpp"
#include "JSSharedWorker.cpp"
VPATH = \
$(WebCore) \
+ $(WebCore)/accessibility \
$(WebCore)/bindings/js \
$(WebCore)/bindings/objc \
$(WebCore)/css \
DOM_CLASSES = \
AbstractView \
AbstractWorker \
+ Accessibility \
Attr \
BarInfo \
BeforeLoadEvent \
SVGZoomAndPan \
SVGZoomEvent \
Screen \
+ ScreenReader \
StyleMedia \
StyleSheet \
StyleSheetList \
DerivedSources/WebCore/InspectorBackendDispatcher.h \
DerivedSources/WebCore/JSAbstractWorker.cpp \
DerivedSources/WebCore/JSAbstractWorker.h \
+ DerivedSources/WebCore/JSAccessibility.cpp \
+ DerivedSources/WebCore/JSAccessibility.h \
DerivedSources/WebCore/JSArrayBuffer.cpp \
DerivedSources/WebCore/JSArrayBuffer.h \
DerivedSources/WebCore/JSArrayBufferView.cpp \
DerivedSources/WebCore/JSRGBColor.h \
DerivedSources/WebCore/JSScreen.cpp \
DerivedSources/WebCore/JSScreen.h \
+ DerivedSources/WebCore/JSScreenReader.cpp \
+ DerivedSources/WebCore/JSScreenReader.h \
DerivedSources/WebCore/JSScriptProfile.cpp \
DerivedSources/WebCore/JSScriptProfile.h \
DerivedSources/WebCore/JSScriptProfileNode.cpp \
WebCore/WebCorePrefix.h \
WebCore/accessibility/AXObjectCache.cpp \
WebCore/accessibility/AXObjectCache.h \
+ WebCore/accessibility/Accessibility.cpp \
+ WebCore/accessibility/Accessibility.h \
WebCore/accessibility/AccessibilityARIAGrid.cpp \
WebCore/accessibility/AccessibilityARIAGrid.h \
WebCore/accessibility/AccessibilityARIAGridCell.cpp \
WebCore/accessibility/AccessibilityTableHeaderContainer.h \
WebCore/accessibility/AccessibilityTableRow.cpp \
WebCore/accessibility/AccessibilityTableRow.h \
+ WebCore/accessibility/ScreenReader.cpp \
+ WebCore/accessibility/ScreenReader.h \
WebCore/bindings/generic/RuntimeEnabledFeatures.cpp \
WebCore/bindings/generic/RuntimeEnabledFeatures.h \
WebCore/bindings/js/CachedScriptSourceProvider.h \
$(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts -I$(WebCore)/inspector $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator Inspector $<
IDL_PATH := \
+ $(WebCore)/accessibility \
$(WebCore)/bindings/js \
$(WebCore)/css \
$(WebCore)/dom \
{
'variables': {
'webcore_bindings_idl_files': [
+ 'accessibility/Accessibility.idl',
+ 'accessibility/ScreenReader.idl',
'css/CSSCharsetRule.idl',
'css/CSSFontFaceRule.idl',
'css/CSSImportRule.idl',
# Source/Header Files
'accessibility/AXObjectCache.cpp',
'accessibility/AXObjectCache.h',
+ 'accessibility/Accessibility.cpp',
+ 'accessibility/Accessibility.h',
'accessibility/AccessibilityARIAGrid.cpp',
'accessibility/AccessibilityARIAGrid.h',
'accessibility/AccessibilityARIAGridCell.cpp',
'accessibility/AccessibilityTableHeaderContainer.h',
'accessibility/AccessibilityTableRow.cpp',
'accessibility/AccessibilityTableRow.h',
+ 'accessibility/ScreenReader.cpp',
+ 'accessibility/ScreenReader.h',
'accessibility/chromium/AXObjectCacheChromium.cpp',
'accessibility/chromium/AccessibilityObjectChromium.cpp',
'accessibility/chromium/AccessibilityObjectWrapper.h',
$$PWD/css/themeQtMaemo5.css
IDL_BINDINGS += \
+ accessibility/Accessibility.idl \
+ accessibility/ScreenReader.idl \
css/Counter.idl \
css/CSSCharsetRule.idl \
css/CSSFontFaceRule.idl \
}
SOURCES += \
+ accessibility/Accessibility.cpp \
accessibility/AccessibilityImageMapLink.cpp \
accessibility/AccessibilityMediaControls.cpp \
accessibility/AccessibilityMenuList.cpp \
accessibility/AccessibilityTableHeaderContainer.cpp \
accessibility/AccessibilityTableRow.cpp \
accessibility/AXObjectCache.cpp \
+ accessibility/ScreenReader.cpp \
bindings/generic/RuntimeEnabledFeatures.cpp \
bindings/js/GCController.cpp \
bindings/js/DOMObjectHashTableMap.cpp \
RelativePath="$(WebKitOutputDir)\obj\WebCore\DerivedSources\JSAbstractWorker.h"\r
>\r
</File>\r
+ <File\r
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSAccessibility.cpp"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug_Internal|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug_Cairo|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release_Cairo|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug_All|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSAccessibility.h"\r
+ >\r
+ </File>\r
<File\r
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSAttr.cpp"\r
>\r
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSScreen.h"\r
>\r
</File>\r
+ <File\r
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSScreenReader.cpp"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug_Internal|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug_Cairo|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release_Cairo|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug_All|Win32"\r
+ ExcludedFromBuild="true"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSScreenReader.h"\r
+ >\r
+ </File>\r
<File\r
RelativePath="$(WebKitOutputDir)\obj\WebCore\DerivedSources\JSSharedWorker.cpp"\r
>\r
RelativePath="..\accessibility\AccessibilityAllInOne.cpp"\r
>\r
</File>\r
+ <File\r
+ RelativePath="..\accessibility\Accessibility.cpp"\r
+ >\r
+ <File\r
+ RelativePath="..\accessibility\Accessibility.h"\r
+ >\r
+ </File>\r
<File\r
RelativePath="..\accessibility\AccessibilityARIAGrid.cpp"\r
>\r
RelativePath="..\accessibility\AXObjectCache.h"\r
>\r
</File>\r
+ <File\r
+ RelativePath="..\accessibility\ScreenReader.cpp"\r
+ >\r
+ <File\r
+ RelativePath="..\accessibility\ScreenReader.h"\r
+ >\r
+ </File>\r
<Filter\r
Name="win"\r
>\r
24F54EAD101FE914000AE741 /* ApplicationCacheHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 24F54EAB101FE914000AE741 /* ApplicationCacheHost.h */; settings = {ATTRIBUTES = (); }; };
2542F4DA1166C25A00E89A86 /* UserGestureIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2542F4D81166C25A00E89A86 /* UserGestureIndicator.cpp */; };
2542F4DB1166C25A00E89A86 /* UserGestureIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2542F4D91166C25A00E89A86 /* UserGestureIndicator.h */; };
+ 2974463D11FE257A004523F8 /* Accessibility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2974463711FE257A004523F8 /* Accessibility.cpp */; };
+ 2974463E11FE257A004523F8 /* Accessibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 2974463811FE257A004523F8 /* Accessibility.h */; };
+ 2974464011FE257A004523F8 /* ScreenReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2974463A11FE257A004523F8 /* ScreenReader.cpp */; };
+ 2974464111FE257A004523F8 /* ScreenReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2974463B11FE257A004523F8 /* ScreenReader.h */; };
+ 2974466F11FE2B32004523F8 /* JSAccessibility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2974466D11FE2B32004523F8 /* JSAccessibility.cpp */; };
+ 2974467011FE2B32004523F8 /* JSAccessibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 2974466E11FE2B32004523F8 /* JSAccessibility.h */; };
+ 2974468E11FE2BE1004523F8 /* JSScreenReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2974468C11FE2BE1004523F8 /* JSScreenReader.cpp */; };
+ 2974468F11FE2BE1004523F8 /* JSScreenReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2974468D11FE2BE1004523F8 /* JSScreenReader.h */; };
29A812260FBB9C1D00510293 /* AccessibilityRenderObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A812080FBB9C1D00510293 /* AccessibilityRenderObject.cpp */; };
29A812270FBB9C1D00510293 /* AccessibilityTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A812090FBB9C1D00510293 /* AccessibilityTable.cpp */; };
29A812280FBB9C1D00510293 /* AccessibilityARIAGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8120A0FBB9C1D00510293 /* AccessibilityARIAGrid.cpp */; };
24F54EAB101FE914000AE741 /* ApplicationCacheHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCacheHost.h; sourceTree = "<group>"; };
2542F4D81166C25A00E89A86 /* UserGestureIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserGestureIndicator.cpp; sourceTree = "<group>"; };
2542F4D91166C25A00E89A86 /* UserGestureIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserGestureIndicator.h; sourceTree = "<group>"; };
+ 2974463711FE257A004523F8 /* Accessibility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Accessibility.cpp; sourceTree = "<group>"; };
+ 2974463811FE257A004523F8 /* Accessibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Accessibility.h; sourceTree = "<group>"; };
+ 2974463911FE257A004523F8 /* Accessibility.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Accessibility.idl; sourceTree = "<group>"; };
+ 2974463A11FE257A004523F8 /* ScreenReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScreenReader.cpp; sourceTree = "<group>"; };
+ 2974463B11FE257A004523F8 /* ScreenReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenReader.h; sourceTree = "<group>"; };
+ 2974463C11FE257A004523F8 /* ScreenReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScreenReader.idl; sourceTree = "<group>"; };
+ 2974466D11FE2B32004523F8 /* JSAccessibility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibility.cpp; sourceTree = "<group>"; };
+ 2974466E11FE2B32004523F8 /* JSAccessibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibility.h; sourceTree = "<group>"; };
+ 2974468C11FE2BE1004523F8 /* JSScreenReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScreenReader.cpp; sourceTree = "<group>"; };
+ 2974468D11FE2BE1004523F8 /* JSScreenReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScreenReader.h; sourceTree = "<group>"; };
29A812080FBB9C1D00510293 /* AccessibilityRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityRenderObject.cpp; sourceTree = "<group>"; };
29A812090FBB9C1D00510293 /* AccessibilityTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTable.cpp; sourceTree = "<group>"; };
29A8120A0FBB9C1D00510293 /* AccessibilityARIAGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityARIAGrid.cpp; sourceTree = "<group>"; };
isa = PBXGroup;
children = (
29A812050FBB9B5200510293 /* mac */,
+ 2974463711FE257A004523F8 /* Accessibility.cpp */,
+ 2974463811FE257A004523F8 /* Accessibility.h */,
+ 2974463911FE257A004523F8 /* Accessibility.idl */,
29A8120A0FBB9C1D00510293 /* AccessibilityARIAGrid.cpp */,
29A812160FBB9C1D00510293 /* AccessibilityARIAGrid.h */,
29A812120FBB9C1D00510293 /* AccessibilityARIAGridCell.cpp */,
29A812130FBB9C1D00510293 /* AccessibilityTableRow.h */,
29A812190FBB9C1D00510293 /* AXObjectCache.cpp */,
29A8121A0FBB9C1D00510293 /* AXObjectCache.h */,
+ 2974463A11FE257A004523F8 /* ScreenReader.cpp */,
+ 2974463B11FE257A004523F8 /* ScreenReader.h */,
+ 2974463C11FE257A004523F8 /* ScreenReader.idl */,
);
path = accessibility;
sourceTree = "<group>";
A83B79100CCB001B000B0825 /* Core */ = {
isa = PBXGroup;
children = (
+ 2974466D11FE2B32004523F8 /* JSAccessibility.cpp */,
+ 2974466E11FE2B32004523F8 /* JSAccessibility.h */,
65DF31D809D1C122000BE325 /* JSAttr.cpp */,
65DF31D909D1C123000BE325 /* JSAttr.h */,
93F9B79E0BA6032600854064 /* JSCDATASection.cpp */,
65DF31EC09D1CC60000BE325 /* JSProcessingInstruction.h */,
E4B423850CBFB73C00AF2ECE /* JSProgressEvent.cpp */,
E4B423860CBFB73C00AF2ECE /* JSProgressEvent.h */,
+ 2974468C11FE2BE1004523F8 /* JSScreenReader.cpp */,
+ 2974468D11FE2BE1004523F8 /* JSScreenReader.h */,
65DF31EF09D1CC60000BE325 /* JSText.cpp */,
65DF31F009D1CC60000BE325 /* JSText.h */,
);
files = (
B5B5DC6A119BB3D5002A8790 /* AbstractDatabase.h in Headers */,
41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */,
+ 2974463E11FE257A004523F8 /* Accessibility.h in Headers */,
29A8122E0FBB9C1D00510293 /* AccessibilityARIAGridCell.h in Headers */,
29A812330FBB9C1D00510293 /* AccessibilityARIAGridRow.h in Headers */,
29A8123B0FBB9C1D00510293 /* AccessibilityImageMapLink.h in Headers */,
59EE122E1106080F00885116 /* JNIUtilityPrivate.h in Headers */,
93309DF4099E64920056E581 /* JoinTextNodesCommand.h in Headers */,
418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */,
+ 2974467011FE2B32004523F8 /* JSAccessibility.h in Headers */,
49EECF01105070C400099FAB /* JSArrayBuffer.h in Headers */,
49EECF1C105072F300099FAB /* JSArrayBufferView.h in Headers */,
86243D0111BC31F700CC006A /* JSArrayBufferViewHelper.h in Headers */,
BCFE2F120C1B58380020235F /* JSRect.h in Headers */,
BC74DA491013F468007987AD /* JSRGBColor.h in Headers */,
BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */,
+ 2974468F11FE2BE1004523F8 /* JSScreenReader.h in Headers */,
9FA37EFB1172FDA600C4CD55 /* JSScriptProfile.h in Headers */,
9FA37EFD1172FDA600C4CD55 /* JSScriptProfileNode.h in Headers */,
41D07A7F0FF935CA0095EDCE /* JSSharedWorker.h in Headers */,
1CEFC9B90D78DC8C007D2579 /* SchedulePair.h in Headers */,
5162C7F511F77EFB00612EFE /* SchemeRegistry.h in Headers */,
BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */,
+ 2974464111FE257A004523F8 /* ScreenReader.h in Headers */,
A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */,
7A1E88F6101CC384000C4DF5 /* ScriptArray.h in Headers */,
7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */,
files = (
B5B5DC69119BB3D5002A8790 /* AbstractDatabase.cpp in Sources */,
41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
+ 2974463D11FE257A004523F8 /* Accessibility.cpp in Sources */,
29A812280FBB9C1D00510293 /* AccessibilityARIAGrid.cpp in Sources */,
29A812300FBB9C1D00510293 /* AccessibilityARIAGridCell.cpp in Sources */,
29A8122D0FBB9C1D00510293 /* AccessibilityARIAGridRow.cpp in Sources */,
59EE122C1106080500885116 /* JNIUtilityPrivate.cpp in Sources */,
93309DF3099E64920056E581 /* JoinTextNodesCommand.cpp in Sources */,
418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */,
+ 2974466F11FE2B32004523F8 /* JSAccessibility.cpp in Sources */,
49EECF00105070C400099FAB /* JSArrayBuffer.cpp in Sources */,
BC275CB311C5E85C00C9206C /* JSArrayBufferCustom.cpp in Sources */,
49EECF1B105072F300099FAB /* JSArrayBufferView.cpp in Sources */,
BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
BC74DA481013F468007987AD /* JSRGBColor.cpp in Sources */,
BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */,
+ 2974468E11FE2BE1004523F8 /* JSScreenReader.cpp in Sources */,
9FA37EFA1172FDA600C4CD55 /* JSScriptProfile.cpp in Sources */,
9FA37EFC1172FDA600C4CD55 /* JSScriptProfileNode.cpp in Sources */,
9FA37EE71172FCF000C4CD55 /* JSScriptProfileNodeCustom.cpp in Sources */,
1CE24F970D7CAF0E007E04C2 /* SchedulePairMac.mm in Sources */,
5162C7F411F77EFB00612EFE /* SchemeRegistry.cpp in Sources */,
BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */,
+ 2974464011FE257A004523F8 /* ScreenReader.cpp in Sources */,
A84D82C211D3474800972990 /* ScriptableDocumentParser.cpp in Sources */,
7A1E88F5101CC384000C4DF5 /* ScriptArray.cpp in Sources */,
200B190911C277D900DCCD3A /* ScriptBreakpoint.cpp in Sources */,
AXRowCountChanged,
AXRowCollapsed,
AXRowExpanded,
+ AXScreenChanged,
+ AXElementsChanged
};
void postNotification(RenderObject*, AXNotification, bool postToElement, PostType = PostAsynchronously);
--- /dev/null
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#include "config.h"
+#include "Accessibility.h"
+
+#include "AXObjectCache.h"
+#include "AccessibilityObject.h"
+#include "Frame.h"
+#include "ScreenReader.h"
+
+namespace WebCore {
+
+Accessibility::Accessibility(Frame* frame)
+ : m_frame(frame)
+{
+}
+
+Accessibility::~Accessibility()
+{
+ disconnectFrame();
+}
+
+void Accessibility::disconnectFrame()
+{
+ if (m_screenReader) {
+ m_screenReader->disconnectFrame();
+ m_screenReader = 0;
+ }
+ m_frame = 0;
+}
+
+void Accessibility::screenChanged()
+{
+ if (!m_frame)
+ return;
+
+ Document* doc = m_frame->document();
+ if (!doc)
+ return;
+
+ AccessibilityObject* root = doc->axObjectCache()->getOrCreate(doc->renderer());
+ doc->axObjectCache()->postNotification(root, doc, AXObjectCache::AXScreenChanged, false);
+}
+
+void Accessibility::elementsChanged()
+{
+ if (!m_frame)
+ return;
+
+ Document* doc = m_frame->document();
+ if (!doc)
+ return;
+
+ AccessibilityObject* root = doc->axObjectCache()->getOrCreate(doc->renderer());
+ doc->axObjectCache()->postNotification(root, doc, AXObjectCache::AXElementsChanged, false);
+}
+
+ScreenReader* Accessibility::screenReader() const
+{
+ if (!m_screenReader)
+ m_screenReader = ScreenReader::create(m_frame);
+
+ return m_screenReader.get();
+}
+
+} // namespace WebCore
+
--- /dev/null
+/*
+ * Copyright (C) 2010 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 Accessibility_h
+#define Accessibility_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class Frame;
+class ScreenReader;
+
+class Accessibility : public RefCounted<Accessibility> {
+public:
+ static PassRefPtr<Accessibility> create(Frame* frame) { return adoptRef(new Accessibility(frame)); }
+ ~Accessibility();
+
+ ScreenReader* screenReader() const;
+ void screenChanged();
+ void elementsChanged();
+
+ void disconnectFrame();
+
+private:
+ Accessibility(Frame*);
+ Frame* m_frame;
+ mutable RefPtr<ScreenReader> m_screenReader;
+};
+
+} // namespace WebCore
+
+#endif // Accessibility_h
--- /dev/null
+/*
+ * Copyright (C) 2010 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.
+ */
+
+module window {
+
+ interface [OmitConstructor] Accessibility {
+ readonly attribute ScreenReader screenReader;
+
+ void screenChanged();
+ void elementsChanged();
+
+ };
+}
#include "AccessibilityObjectWrapper.h"
#endif
+#if PLATFORM(MAC)
+#define SUPPORTS_JSACCESSIBILITY 1
+#else
+#define SUPPORTS_JSACCESSIBILITY 0
+#endif
+
typedef struct _NSRange NSRange;
#ifdef __OBJC__
#endif
#endif
+#if SUPPORTS_JSACCESSIBILITY
+ bool isScreenReaderRunning() const;
+ Element* screenReaderFocusedElement() const;
+ String screenReaderVersion() const;
+#else
+ bool isScreenReaderRunning() const { return false; }
+ Element* screenReaderFocusedElement() const { return 0; }
+ String screenReaderVersion() const { return nullAtom; }
+#endif
+
#if HAVE(ACCESSIBILITY)
// a platform-specific method for determining if an attachment is ignored
bool accessibilityIgnoreAttachment() const;
--- /dev/null
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#include "config.h"
+#include "ScreenReader.h"
+
+#include "AXObjectCache.h"
+#include "AccessibilityObject.h"
+#include "Document.h"
+#include "Element.h"
+#include "Frame.h"
+
+namespace WebCore {
+
+ScreenReader::ScreenReader(Frame* frame)
+ : m_frame(frame)
+{
+}
+
+ScreenReader::~ScreenReader()
+{
+ disconnectFrame();
+}
+
+void ScreenReader::disconnectFrame()
+{
+ m_frame = 0;
+}
+
+bool ScreenReader::active() const
+{
+ if (!m_frame)
+ return false;
+
+ Document* doc = m_frame->document();
+ if (!doc)
+ return false;
+
+ AccessibilityObject* obj = doc->axObjectCache()->getOrCreate(doc->renderer());
+ return obj->isScreenReaderRunning();
+}
+
+Element* ScreenReader::activeElement() const
+{
+ Document* doc = m_frame->document();
+ if (!doc)
+ return false;
+
+ AccessibilityObject* obj = doc->axObjectCache()->getOrCreate(doc->renderer());
+ return obj->screenReaderFocusedElement();
+}
+
+String ScreenReader::version() const
+{
+ Document* doc = m_frame->document();
+ if (!doc)
+ return nullAtom;
+
+ AccessibilityObject* obj = doc->axObjectCache()->getOrCreate(doc->renderer());
+ return obj->screenReaderVersion();
+}
+
+} // namespace WebCore;
--- /dev/null
+/*
+ * Copyright (C) 2010 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 ScreenReader_h
+#define ScreenReader_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Element;
+class Frame;
+class String;
+
+class ScreenReader : public RefCounted<ScreenReader> {
+public:
+ static PassRefPtr<ScreenReader> create(Frame* frame) { return adoptRef(new ScreenReader(frame)); }
+ ~ScreenReader();
+
+ String version() const;
+ bool active() const;
+ Element* activeElement() const;
+
+ void disconnectFrame();
+private:
+ ScreenReader(Frame*);
+ Frame* m_frame;
+};
+
+} // namespace WebCore
+
+#endif // ScreenReader_h
--- /dev/null
+/*
+ * Copyright (C) 2010 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.
+ */
+
+module window {
+
+ interface [OmitConstructor] ScreenReader {
+ readonly attribute DOMString version;
+ readonly attribute boolean active;
+ readonly attribute Element activeElement;
+ };
+
+}
+
case AXLayoutComplete:
macNotification = "AXLayoutComplete";
break;
+ case AXScreenChanged:
+ macNotification = "AXScreenChanged";
+ break;
+ case AXElementsChanged:
+ macNotification = "AXElementsChanged";
+ break;
case AXLoadComplete:
macNotification = "AXLoadComplete";
break;
#if HAVE(ACCESSIBILITY)
#import "AccessibilityObjectWrapper.h"
+#import "AXObjectCache.h"
namespace WebCore {
+bool AccessibilityObject::isScreenReaderRunning() const
+{
+ // If the enhanced user interface is enabled, it means VoiceOver is running.
+ return AXObjectCache::accessibilityEnhancedUserInterfaceEnabled();
+}
+
+Element* AccessibilityObject::screenReaderFocusedElement() const
+{
+ return 0;
+}
+
+String AccessibilityObject::screenReaderVersion() const
+{
+ return nullAtom;
+}
+
bool AccessibilityObject::accessibilityIgnoreAttachment() const
{
NSView* attachment = [wrapper() attachmentView];
#include "config.h"
#include "Navigator.h"
+#include "Accessibility.h"
#include "Chrome.h"
#include "CookieJar.h"
#include "DOMMimeTypeArray.h"
m_geolocation->disconnectFrame();
m_geolocation = 0;
}
+ if (m_accessibility) {
+ m_accessibility->disconnectFrame();
+ m_accessibility = 0;
+ }
m_frame = 0;
}
m_mimeTypes = DOMMimeTypeArray::create(m_frame);
return m_mimeTypes.get();
}
+
+Accessibility* Navigator::accessibility() const
+{
+ if (!m_accessibility)
+ m_accessibility = Accessibility::create(m_frame);
+ return m_accessibility.get();
+}
bool Navigator::cookieEnabled() const
{
namespace WebCore {
+class Accessibility;
class DOMMimeTypeArray;
class DOMPluginArray;
class Frame;
String language() const;
DOMPluginArray* plugins() const;
DOMMimeTypeArray* mimeTypes() const;
+ Accessibility* accessibility() const;
bool cookieEnabled() const;
bool javaEnabled() const;
mutable RefPtr<DOMPluginArray> m_plugins;
mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
mutable RefPtr<Geolocation> m_geolocation;
+ mutable RefPtr<Accessibility> m_accessibility;
};
}
readonly attribute DOMString platform;
readonly attribute DOMPluginArray plugins;
readonly attribute DOMMimeTypeArray mimeTypes;
+ readonly attribute Accessibility accessibility;
readonly attribute DOMString product;
readonly attribute DOMString productSub;
readonly attribute DOMString vendor;