[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
cfleizach at apple.com
cfleizach at apple.com
Tue Jan 5 23:42:37 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 4f1f98ea3a674af7ca97b1432b81d0a005f1f8f0
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 4 20:04:32 2009 +0000
REGRESSION: AX: buttons now extremely repetitive
https://bugs.webkit.org/show_bug.cgi?id=32164
Reviewed by Darin Adler.
WebCore:
Test: platform/mac/accessibility/button-shouldnot-have-axvalue.html
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isButton):
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilityAttributeNames]):
WebKitTools:
* DumpRenderTree/AccessibilityUIElement.cpp:
(isAttributeSupportedCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::isAttributeSupported):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isAttributeSupported):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::isAttributeSupported):
LayoutTests:
* platform/mac-leopard/accessibility/table-with-aria-role-expected.txt:
* platform/mac/accessibility/button-shouldnot-have-axvalue-expected.txt: Added.
* platform/mac/accessibility/button-shouldnot-have-axvalue.html: Added.
* platform/mac/accessibility/table-with-aria-role-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b985c7a..c1e2c82 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-04 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: AX: buttons now extremely repetitive
+ https://bugs.webkit.org/show_bug.cgi?id=32164
+
+ * platform/mac-leopard/accessibility/table-with-aria-role-expected.txt:
+ * platform/mac/accessibility/button-shouldnot-have-axvalue-expected.txt: Added.
+ * platform/mac/accessibility/button-shouldnot-have-axvalue.html: Added.
+ * platform/mac/accessibility/table-with-aria-role-expected.txt:
+
2009-12-04 Enrica Casucci <enrica at apple.com>
Reviewed by John Sullivan.
diff --git a/LayoutTests/platform/mac-leopard/accessibility/table-with-aria-role-expected.txt b/LayoutTests/platform/mac-leopard/accessibility/table-with-aria-role-expected.txt
index 1d8ed06..e66bdb9 100644
--- a/LayoutTests/platform/mac-leopard/accessibility/table-with-aria-role-expected.txt
+++ b/LayoutTests/platform/mac-leopard/accessibility/table-with-aria-role-expected.txt
@@ -15,7 +15,6 @@ AXTitle: test test test
test test test
AXDescription:
-AXValue:
AXFocused: 0
AXEnabled: 1
AXWindow: <AXButton: 'test test test
@@ -37,7 +36,6 @@ test test test
'>
AXTitleUIElement: (null)
AXAccessKey: (null)
-AXRequired: 0
------------
AXRole: AXMenu
diff --git a/LayoutTests/platform/mac/accessibility/button-shouldnot-have-axvalue-expected.txt b/LayoutTests/platform/mac/accessibility/button-shouldnot-have-axvalue-expected.txt
new file mode 100644
index 0000000..4787fb1
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/button-shouldnot-have-axvalue-expected.txt
@@ -0,0 +1,12 @@
+
+This tests that a button should not have AXRequired and should not have AXValue returned.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button.isAttributeSupported('AXValue') is false
+PASS button.isAttributeSupported('AXRequired') is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/button-shouldnot-have-axvalue.html b/LayoutTests/platform/mac/accessibility/button-shouldnot-have-axvalue.html
new file mode 100644
index 0000000..a2b3fb9
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/button-shouldnot-have-axvalue.html
@@ -0,0 +1,35 @@
+<!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">
+
+<input tabindex=0 id="button" type="button" value="test">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that a button should not have AXRequired and should not have AXValue returned.");
+
+ if (window.accessibilityController) {
+
+ document.getElementById("button").focus();
+ var button = accessibilityController.focusedElement;
+
+ shouldBe("button.isAttributeSupported('AXValue')", "false");
+ shouldBe("button.isAttributeSupported('AXRequired')", "false");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt b/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt
index 1d8ed06..e66bdb9 100644
--- a/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt
@@ -15,7 +15,6 @@ AXTitle: test test test
test test test
AXDescription:
-AXValue:
AXFocused: 0
AXEnabled: 1
AXWindow: <AXButton: 'test test test
@@ -37,7 +36,6 @@ test test test
'>
AXTitleUIElement: (null)
AXAccessKey: (null)
-AXRequired: 0
------------
AXRole: AXMenu
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 450a638..a65c969 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-04 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: AX: buttons now extremely repetitive
+ https://bugs.webkit.org/show_bug.cgi?id=32164
+
+ Test: platform/mac/accessibility/button-shouldnot-have-axvalue.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isButton):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+
2009-12-04 Zoltan Herczeg <zherczeg at inf.u-szeged.hu>
Reviewed by Darin Adler.
diff --git a/WebCore/accessibility/AccessibilityObject.h b/WebCore/accessibility/AccessibilityObject.h
index e02982c..8e46311 100644
--- a/WebCore/accessibility/AccessibilityObject.h
+++ b/WebCore/accessibility/AccessibilityObject.h
@@ -286,6 +286,7 @@ public:
bool isTree() const { return roleValue() == TreeRole; }
bool isTreeItem() const { return roleValue() == TreeItemRole; }
bool isScrollbar() const { return roleValue() == ScrollBarRole; }
+ bool isButton() const { return roleValue() == ButtonRole; }
virtual bool isChecked() const { return false; }
virtual bool isEnabled() const { return false; }
diff --git a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index 7ae470a..6099b3d 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -637,6 +637,7 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
static NSArray* comboBoxAttrs = nil;
static NSArray* outlineAttrs = nil;
static NSArray* outlineRowAttrs = nil;
+ static NSArray* buttonAttrs = nil;
NSMutableArray* tempArray;
if (attributes == nil) {
attributes = [[NSArray alloc] initWithObjects: NSAccessibilityRoleAttribute,
@@ -776,6 +777,15 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
controlAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release];
}
+ if (buttonAttrs == nil) {
+ tempArray = [[NSMutableArray alloc] initWithArray:attributes];
+ // Buttons should not expose AXValue.
+ [tempArray removeObject:NSAccessibilityValueAttribute];
+ [tempArray addObject:NSAccessibilityTitleUIElementAttribute];
+ [tempArray addObject:NSAccessibilityAccessKeyAttribute];
+ buttonAttrs = [[NSArray alloc] initWithArray:tempArray];
+ [tempArray release];
+ }
if (comboBoxAttrs == nil) {
tempArray = [[NSMutableArray alloc] initWithArray:controlAttrs];
[tempArray addObject:NSAccessibilityExpandedAttribute];
@@ -824,9 +834,8 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
[tempArray release];
}
if (inputImageAttrs == nil) {
- tempArray = [[NSMutableArray alloc] initWithArray:controlAttrs];
+ tempArray = [[NSMutableArray alloc] initWithArray:buttonAttrs];
[tempArray addObject:NSAccessibilityURLAttribute];
- [tempArray addObject:NSAccessibilityAccessKeyAttribute];
inputImageAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release];
}
@@ -900,9 +909,11 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
else if (m_object->isProgressIndicator() || m_object->isSlider())
objectAttributes = rangeAttrs;
+ // These are processed in order because an input image is a button, and a button is a control.
else if (m_object->isInputImage())
objectAttributes = inputImageAttrs;
-
+ else if (m_object->isButton())
+ objectAttributes = buttonAttrs;
else if (m_object->isControl())
objectAttributes = controlAttrs;
@@ -921,10 +932,8 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
objectAttributes = menuItemAttrs;
NSArray *additionalAttributes = [self additionalAccessibilityAttributeNames];
- if ( [additionalAttributes count] > 0 )
- {
+ if ([additionalAttributes count])
objectAttributes = [objectAttributes arrayByAddingObjectsFromArray:additionalAttributes];
- }
return objectAttributes;
}
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 85dc830..5b633aa 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-04 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: AX: buttons now extremely repetitive
+ https://bugs.webkit.org/show_bug.cgi?id=32164
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (isAttributeSupportedCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::isAttributeSupported):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::isAttributeSupported):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::isAttributeSupported):
+
2009-12-03 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by David Levin.
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
index 9268b46..8c59252 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -220,9 +220,20 @@ static JSValueRef elementAtPointCallback(JSContextRef context, JSObjectRef funct
return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->elementAtPoint(x, y));
}
+static JSValueRef isAttributeSupportedCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSStringRef attribute = 0;
+ if (argumentCount == 1)
+ attribute = JSValueToStringCopy(context, arguments[0], exception);
+ JSValueRef result = JSValueMakeBoolean(context, toAXElement(thisObject)->isAttributeSupported(attribute));
+ if (attribute)
+ JSStringRelease(attribute);
+ return result;
+}
+
static JSValueRef isAttributeSettableCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- JSStringRef attribute = NULL;
+ JSStringRef attribute = 0;
if (argumentCount == 1)
attribute = JSValueToStringCopy(context, arguments[0], exception);
JSValueRef result = JSValueMakeBoolean(context, toAXElement(thisObject)->isAttributeSettable(attribute));
@@ -245,7 +256,7 @@ static JSValueRef isActionSupportedCallback(JSContextRef context, JSObjectRef fu
static JSValueRef attributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- JSStringRef attribute = NULL;
+ JSStringRef attribute = 0;
if (argumentCount == 1)
attribute = JSValueToStringCopy(context, arguments[0], exception);
JSRetainPtr<JSStringRef> attributeValue(Adopt, toAXElement(thisObject)->attributeValue(attribute));
@@ -569,6 +580,7 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "titleUIElement", titleUIElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setSelectedTextRange", setSelectedTextRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "attributeValue", attributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isAttributeSupported", isAttributeSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isAttributeSettable", isAttributeSettableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isActionSupported", isActionSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "parentElement", parentElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
index 10529f6..9985523 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
@@ -86,6 +86,7 @@ public:
// Attributes - platform-independent implementations
JSStringRef attributeValue(JSStringRef attribute);
+ bool isAttributeSupported(JSStringRef attribute);
bool isAttributeSettable(JSStringRef attribute);
bool isActionSupported(JSStringRef action);
JSStringRef role();
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index a92d68c..13d313d 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -460,6 +460,11 @@ bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
return false;
}
+bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
+{
+ return false;
+}
+
void AccessibilityUIElement::increment()
{
// FIXME: implement
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index 2512aa9..948f379 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -350,6 +350,11 @@ bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
return [m_element accessibilityIsAttributeSettable:[NSString stringWithJSStringRef:attribute]];
}
+bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
+{
+ return [[m_element accessibilityAttributeNames] containsObject:[NSString stringWithJSStringRef:attribute]];
+}
+
JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
{
NSArray* supportedParameterizedAttributes = [m_element accessibilityParameterizedAttributeNames];
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index 2acc4a4..163abb1 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -413,6 +413,11 @@ bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
return false;
}
+bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
+{
+ return false;
+}
+
void AccessibilityUIElement::increment()
{
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list