Diff
Modified: trunk/LayoutTests/ChangeLog (137591 => 137592)
--- trunk/LayoutTests/ChangeLog 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/ChangeLog 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1,3 +1,24 @@
+2012-12-13 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r137512.
+ http://trac.webkit.org/changeset/137512
+ https://bugs.webkit.org/show_bug.cgi?id=104912
+
+ The entire GTK+ layout test step has been failing for hours
+ (Requested by mrobinson on #webkit).
+
+ * accessibility/button-title-uses-inner-img-alt-expected.txt: Removed.
+ * accessibility/button-title-uses-inner-img-alt.html: Removed.
+ * accessibility/focusable-div-expected.txt:
+ * accessibility/focusable-div.html:
+ * platform/chromium/TestExpectations:
+ * platform/chromium/accessibility/image-link-expected.txt:
+ * platform/mac/accessibility/image-link-expected.txt:
+ * platform/mac/accessibility/internal-link-anchors2-expected.txt:
+ * platform/mac/accessibility/static-text-role-uses-text-under-element-expected.txt:
+ * platform/mac/accessibility/static-text-role-uses-text-under-element.html:
+ * platform/mac/accessibility/table-with-aria-role-expected.txt:
+
2012-12-13 Kentaro Hara <[email protected]>
Unreviewed. Rebaselined compositor-touch-hit-rects.html.
Deleted: trunk/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt (137591 => 137592)
--- trunk/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1,12 +0,0 @@
-Button with image of
-This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS document.activeElement == button is true
-PASS axButton.title.indexOf('Button with image of cake') >= 0 is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/accessibility/button-title-uses-inner-img-alt.html (137591 => 137592)
--- trunk/LayoutTests/accessibility/button-title-uses-inner-img-alt.html 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/accessibility/button-title-uses-inner-img-alt.html 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<script src=""
-
-<style>
-button {
- padding: 30px;
-}
-</style>
-
-<button id="cake">Button with image of <img alt="cake" src="" width="40px"></button>
-
-<div id="console"></div>
-<script>
-description("This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..");
-
-if (window.testRunner && window.accessibilityController) {
- window.testRunner.dumpAsText();
-
- var button = document.getElementById('cake');
- button.focus();
- shouldBe("document.activeElement == button", "true");
- window.axButton = accessibilityController.focusedElement;
- shouldBe("axButton.title.indexOf('Button with image of cake') >= 0", "true");
-}
-
-</script>
-
-<script src=""
-</body>
-</html>
Modified: trunk/LayoutTests/accessibility/focusable-div-expected.txt (137591 => 137592)
--- trunk/LayoutTests/accessibility/focusable-div-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/accessibility/focusable-div-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1,12 +1,7 @@
A
B
C
-Link
-Initial text before linkLink
-List item
-Initial text before list
-List item
-This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..
+This test makes sure that a generic focusable div can get accessibility focus.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -19,16 +14,6 @@
PASS lastChar(axDiv2.title) is "C"
PASS document.activeElement == div3 is true
PASS lastChar(axDiv3.description) is "D"
-PASS document.activeElement == div4 is true
-PASS axDiv4.title.indexOf('Link') is -1
-PASS document.activeElement == div5 is true
-PASS axDiv5.title.indexOf('Link') is -1
-PASS axDiv5.title.indexOf('Initial text before link') >= 0 is true
-PASS document.activeElement == div6 is true
-PASS axDiv6.title.indexOf('List item') is -1
-PASS document.activeElement == div7 is true
-PASS axDiv7.title.indexOf('List item') is -1
-PASS axDiv7.title.indexOf('Initial text before list') >= 0 is true
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/accessibility/focusable-div.html (137591 => 137592)
--- trunk/LayoutTests/accessibility/focusable-div.html 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/accessibility/focusable-div.html 2012-12-13 15:09:29 UTC (rev 137592)
@@ -3,23 +3,14 @@
<body>
<script src=""
-<!-- A link always gets its accessible text from contents. -->
<a id="link" href=""
-
-<!-- A generic focusable div should also get its accessible text from contents. -->
<div id="div" tabindex="0">B</div>
<div id="div2" tabindex="0"><div></div>C</div>
<div id="div3" tabindex="0" aria-label="D"></div>
-<!-- A generic focusable div should not get accessible text from children that are focusable or containers. -->
-<div id="div4" tabindex="0"><a href=""
-<div id="div5" tabindex="0">Initial text before link<a href=""
-<div id="div6" tabindex="0"><ul><li>List item</li></ul></div>
-<div id="div7" tabindex="0">Initial text before list<ul><li>List item</li></ul></div>
-
<div id="console"></div>
<script>
-description("This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..");
+description("This test makes sure that a generic focusable div can get accessibility focus.");
if (window.testRunner && window.accessibilityController) {
window.testRunner.dumpAsText();
@@ -51,32 +42,6 @@
shouldBe("document.activeElement == div3", "true");
window.axDiv3 = accessibilityController.focusedElement;
shouldBe("lastChar(axDiv3.description)", "\"D\"");
-
- var div4 = document.getElementById('div4');
- div4.focus();
- shouldBe("document.activeElement == div4", "true");
- window.axDiv4 = accessibilityController.focusedElement;
- shouldBe("axDiv4.title.indexOf('Link')", "-1");
-
- var div5 = document.getElementById('div5');
- div5.focus();
- shouldBe("document.activeElement == div5", "true");
- window.axDiv5 = accessibilityController.focusedElement;
- shouldBe("axDiv5.title.indexOf('Link')", "-1");
- shouldBe("axDiv5.title.indexOf('Initial text before link') >= 0", "true");
-
- var div6 = document.getElementById('div6');
- div6.focus();
- shouldBe("document.activeElement == div6", "true");
- window.axDiv6 = accessibilityController.focusedElement;
- shouldBe("axDiv6.title.indexOf('List item')", "-1");
-
- var div7 = document.getElementById('div7');
- div7.focus();
- shouldBe("document.activeElement == div7", "true");
- window.axDiv7 = accessibilityController.focusedElement;
- shouldBe("axDiv7.title.indexOf('List item')", "-1");
- shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "true");
}
</script>
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (137591 => 137592)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1396,6 +1396,7 @@
crbug.com/10322 accessibility/deleting-iframe-destroys-axcache.html [ Skip ]
crbug.com/10322 accessibility/document-attributes.html [ Skip ]
crbug.com/10322 accessibility/iframe-bastardization.html [ Skip ]
+crbug.com/10322 accessibility/image-link.html [ Skip ]
crbug.com/10322 accessibility/image-map-update-parent-crash.html [ Skip ]
crbug.com/10322 accessibility/image-map2.html [ Skip ]
crbug.com/10322 accessibility/internal-link-anchors2.html [ Skip ]
Modified: trunk/LayoutTests/platform/chromium/accessibility/image-link-expected.txt (137591 => 137592)
--- trunk/LayoutTests/platform/chromium/accessibility/image-link-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/chromium/accessibility/image-link-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -3,13 +3,55 @@
This test checks that the right accessibility tree is generated for a link inside an image
-AXTitle: Delicious cake
AXRole: AXLink
+AXSubrole: (null)
+AXRoleDescription: link
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXLink>
+AXSize: NSSize: {280, 213}
+AXTitle:
AXDescription:
+AXValue:
+AXFocused: 1
+AXEnabled: 1
+AXWindow: <AXLink>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXLink>
+AXEndTextMarker: <AXLink>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXLink>
+AXURL: http://www.wowhead.com/?item=33924
+AXAccessKey: (null)
+
Child 0:
+AXRole: AXImage
+AXSubrole: (null)
+AXRoleDescription: image
+AXChildren: <array of size 0>
+AXHelp:
+AXParent: <AXImage>
+AXSize: NSSize: {280, 209}
AXTitle:
-AXRole: AXImage
AXDescription: Delicious cake
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXImage>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXImage>
+AXEndTextMarker: <AXImage>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXImage>
+AXURL: LayoutTests/accessibility/resources/cake.png
+AXAccessKey: (null)
+
Modified: trunk/LayoutTests/platform/mac/accessibility/image-link-expected.txt (137591 => 137592)
--- trunk/LayoutTests/platform/mac/accessibility/image-link-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/mac/accessibility/image-link-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -8,22 +8,22 @@
AXRoleDescription: link
AXChildren: <array of size 1>
AXHelp:
-AXParent: <AXLink: 'Delicious cake'>
+AXParent: <AXLink>
AXSize: NSSize: {280, 213}
-AXTitle: Delicious cake
+AXTitle:
AXDescription:
AXValue:
AXFocused: 1
AXEnabled: 1
-AXWindow: <AXLink: 'Delicious cake'>
+AXWindow: <AXLink>
AXSelectedTextMarkerRange: (null)
-AXStartTextMarker: <AXLink: 'Delicious cake'>
-AXEndTextMarker: <AXLink: 'Delicious cake'>
+AXStartTextMarker: <AXLink>
+AXEndTextMarker: <AXLink>
AXVisited: 0
AXLinkedUIElements: (null)
AXSelected: 0
AXBlockQuoteLevel: 0
-AXTopLevelUIElement: <AXLink: 'Delicious cake'>
+AXTopLevelUIElement: <AXLink>
AXURL: http://www.wowhead.com/?item=33924
AXAccessKey: (null)
AXARIABusy: 0
Modified: trunk/LayoutTests/platform/mac/accessibility/internal-link-anchors2-expected.txt (137591 => 137592)
--- trunk/LayoutTests/platform/mac/accessibility/internal-link-anchors2-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/mac/accessibility/internal-link-anchors2-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -5,17 +5,17 @@
AXRoleDescription: heading
AXChildren: <array of size 4>
AXHelp:
-AXParent: <AXHeading: '[] Tourette syndrome'>
+AXParent: <AXHeading: '[edit] Tourette syndrome'>
AXSize: NSSize: {769, 22}
-AXTitle: [] Tourette syndrome
+AXTitle: [edit] Tourette syndrome
AXDescription:
AXValue: 3
AXFocused: 0
AXEnabled: 1
-AXWindow: <AXHeading: '[] Tourette syndrome'>
+AXWindow: <AXHeading: '[edit] Tourette syndrome'>
AXSelectedTextMarkerRange: (null)
-AXStartTextMarker: <AXHeading: '[] Tourette syndrome'>
-AXEndTextMarker: <AXHeading: '[] Tourette syndrome'>
+AXStartTextMarker: <AXHeading: '[edit] Tourette syndrome'>
+AXEndTextMarker: <AXHeading: '[edit] Tourette syndrome'>
AXVisited: 0
AXLinkedUIElements: (null)
AXSelected: 0
Modified: trunk/LayoutTests/platform/mac/accessibility/static-text-role-uses-text-under-element-expected.txt (137591 => 137592)
--- trunk/LayoutTests/platform/mac/accessibility/static-text-role-uses-text-under-element-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/mac/accessibility/static-text-role-uses-text-under-element-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -4,7 +4,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS text.stringValue is 'AXValue: Text 3'
+PASS text.stringValue is 'AXValue: Text 1 Text 2 Text 3'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/platform/mac/accessibility/static-text-role-uses-text-under-element.html (137591 => 137592)
--- trunk/LayoutTests/platform/mac/accessibility/static-text-role-uses-text-under-element.html 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/mac/accessibility/static-text-role-uses-text-under-element.html 2012-12-13 15:09:29 UTC (rev 137592)
@@ -26,7 +26,7 @@
if (window.accessibilityController) {
document.getElementById("text1").focus();
var text = accessibilityController.focusedElement;
- shouldBe("text.stringValue", "'AXValue: Text 3'");
+ shouldBe("text.stringValue", "'AXValue: Text 1 Text 2 Text 3'");
}
</script>
Modified: trunk/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt (137591 => 137592)
--- trunk/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/LayoutTests/platform/mac/accessibility/table-with-aria-role-expected.txt 2012-12-13 15:09:29 UTC (rev 137592)
@@ -7,21 +7,33 @@
AXRoleDescription: button
AXChildren: <array of size 0>
AXHelp:
-AXParent: <AXButton: 'testtesttesttesttesttest'>
+AXParent: <AXButton: 'test test test
+test test test
+'>
AXSize: NSSize: {85, 52}
-AXTitle: testtesttesttesttesttest
+AXTitle: test test test
+test test test
+
AXDescription:
AXFocused: 0
AXEnabled: 1
-AXWindow: <AXButton: 'testtesttesttesttesttest'>
+AXWindow: <AXButton: 'test test test
+test test test
+'>
AXSelectedTextMarkerRange: (null)
-AXStartTextMarker: <AXButton: 'testtesttesttesttesttest'>
-AXEndTextMarker: <AXButton: 'testtesttesttesttesttest'>
+AXStartTextMarker: <AXButton: 'test test test
+test test test
+'>
+AXEndTextMarker: <AXButton: 'test test test
+test test test
+'>
AXVisited: 0
AXLinkedUIElements: (null)
AXSelected: 0
AXBlockQuoteLevel: 0
-AXTopLevelUIElement: <AXButton: 'testtesttesttesttesttest'>
+AXTopLevelUIElement: <AXButton: 'test test test
+test test test
+'>
AXTitleUIElement: (null)
AXAccessKey: (null)
AXARIABusy: 0
Modified: trunk/Source/WebCore/ChangeLog (137591 => 137592)
--- trunk/Source/WebCore/ChangeLog 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/Source/WebCore/ChangeLog 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1,3 +1,17 @@
+2012-12-13 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r137512.
+ http://trac.webkit.org/changeset/137512
+ https://bugs.webkit.org/show_bug.cgi?id=104912
+
+ The entire GTK+ layout test step has been failing for hours
+ (Requested by mrobinson on #webkit).
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::textUnderElement):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::textUnderElement):
+
2012-12-13 Tamas Czene <[email protected]>
OpenCL version of FEColorMatrix.
Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (137591 => 137592)
--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2012-12-13 15:09:29 UTC (rev 137592)
@@ -1434,62 +1434,20 @@
return level;
}
-// When building the textUnderElement for an object, determine whether or not
-// we should include the inner text of this given descendant object or skip it.
-static bool shouldUseAccessiblityObjectInnerText(AccessibilityObject* obj)
-{
- // Consider this hypothetical example:
- // <div tabindex=0>
- // <h2>
- // Table of contents
- // </h2>
- // <a href="" to start of book</a>
- // <ul>
- // <li><a href="" 1</a></li>
- // <li><a href="" 2</a></li>
- // </ul>
- // </div>
- //
- // The goal is to return a reasonable title for the outer container div, because
- // it's focusable - but without making its title be the full inner text, which is
- // quite long. As a heuristic, skip links, controls, and elements that are usually
- // containers with lots of children.
-
- // Skip focusable children, so we don't include the text of links and controls.
- if (obj->canSetFocusAttribute())
- return false;
-
- // Skip big container elements like lists, tables, etc.
- if (obj->isList() || obj->isAccessibilityTable() || obj->isTree() || obj->isCanvas())
- return false;
-
- return true;
-}
-
String AccessibilityNodeObject::textUnderElement() const
{
Node* node = this->node();
- if (node && node->isTextNode())
- return toText(node)->wholeText();
+ if (!node)
+ return String();
- String result;
- for (AccessibilityObject* child = firstChild(); child; child = child->nextSibling()) {
- if (!shouldUseAccessiblityObjectInnerText(child))
- continue;
-
- if (child->isAccessibilityNodeObject()) {
- Vector<AccessibilityText> textOrder;
- toAccessibilityNodeObject(child)->alternativeText(textOrder);
- if (textOrder.size() > 0) {
- result.append(textOrder[0].text);
- continue;
- }
- }
-
- result.append(child->textUnderElement());
- }
-
- return result;
+ // Note: TextIterator doesn't return any text for nodes that don't have renderers.
+ // If this could be fixed, it'd be more accurate use TextIterator here.
+ if (node->isElementNode())
+ return toElement(node)->innerText();
+ else if (node->isTextNode())
+ return toText(node)->wholeText();
+
+ return String();
}
String AccessibilityNodeObject::title() const
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (137591 => 137592)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2012-12-13 15:06:39 UTC (rev 137591)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2012-12-13 15:09:29 UTC (rev 137592)
@@ -624,10 +624,12 @@
{
if (!m_renderer)
return String();
-
+
if (m_renderer->isFileUploadControl())
return toRenderFileUploadControl(m_renderer)->buttonValue();
+ Node* node = m_renderer->node();
+
#if ENABLE(MATHML)
// Math operators create RenderText nodes on the fly that are not tied into the DOM in a reasonable way,
// so rangeOfContents does not work for them (nor does regular text selection).
@@ -638,28 +640,28 @@
}
}
#endif
+
+ if (node) {
+ if (Frame* frame = node->document()->frame()) {
+ // catch stale WebCoreAXObject (see <rdar://problem/3960196>)
+ if (frame->document() != node->document())
+ return String();
- if (m_renderer->isText()) {
- // If possible, use a text iterator to get the text, so that whitespace
- // is handled consistently.
- if (Node* node = this->node()) {
- if (Frame* frame = node->document()->frame()) {
- // catch stale WebCoreAXObject (see <rdar://problem/3960196>)
- if (frame->document() != node->document())
- return String();
-
- return plainText(rangeOfContents(node).get(), textIteratorBehaviorForTextRange());
- }
+ return plainText(rangeOfContents(node).get(), textIteratorBehaviorForTextRange());
}
+ }
- // Sometimes text fragments don't have Nodes associated with them (like when
- // CSS content is used to insert text).
+ // Sometimes text fragments don't have Node's associated with them (like when
+ // CSS content is used to insert text).
+ if (m_renderer->isText()) {
RenderText* renderTextObject = toRenderText(m_renderer);
if (renderTextObject->isTextFragment())
return String(static_cast<RenderTextFragment*>(m_renderer)->contentString());
}
- return AccessibilityNodeObject::textUnderElement();
+ // return the null string for anonymous text because it is non-trivial to get
+ // the actual text and, so far, that is not needed
+ return String();
}
Node* AccessibilityRenderObject::node() const