2013-10-14 10:41:26 +00:00
|
|
|
Before
|
|
|
|
|
|
|
|
After
|
|
|
|
|
|
|
|
End of test
|
|
|
|
|
|
|
|
This tests that deleting an iframe doesn't cause the accessibility cache to be destroyed and recreated.
|
|
|
|
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Before:
|
2020-09-27 02:15:19 +00:00
|
|
|
AXRole: AXScrollArea
|
|
|
|
AXRole: AXWebArea
|
2013-10-14 10:41:26 +00:00
|
|
|
AXRole: AXParagraph AXValue: Before
|
|
|
|
AXRole: AXGroup AXValue: <obj>
|
2020-09-27 02:15:19 +00:00
|
|
|
AXRole: AXGroup
|
|
|
|
AXRole: AXScrollArea
|
|
|
|
AXRole: AXWebArea
|
[ATK] Avoid explicit traversal of text controls and the render tree in AtkText implementation
https://bugs.webkit.org/show_bug.cgi?id=123153
Reviewed by Chris Fleizach.
Source/WebCore:
Remove functions from the AtkText implementation that manually
walk the render tree to compose the text for a exposed objects in
certain cases (e.g. anonymous blocks, text controls).
The reason for this change is that the current implementation
follows an error-prone approach, since by doing things like
manually walking the render tree from here we are not properly
considering all the possible scenarios that might happen when
traversing text. This, however, is a task that is better suited
for the TextIterator, which is already written to consider all
those cases and to emit the proper character in every single
situation: text nodes, replaced objects and so on.
So, by removing all that too specific code (textForObject() and
textForRenderer() mainly) from WebKitAccessibleInterfaceText.cpp
and relying in AccessibilityObject::textUnderElement(), which it
ends up using the TextIterator for certain cases, we have a much
better and robust method of retrieving the text associated with an
instance of AtkObject implementing the AtkText interface.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Removed call to textForObject(), now that
we have just removed that function, together with textForRenderer().
Make AccessibilityRenderObject::textUnderElement() able to deal with
anonymous blocks directly, by creating a range based in the boundaries
defined by the first and last child renderers for that block. This will
make possible to treat an anonymous block as a whole instead of having
to rely in the concatenation of each of its children, as it does now.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Added a new code
path to deal with anonymous blocks for text renderers, or when including
all the children is explicitly requested.
Modified TextIterator so text for children of replaced objects are
ignored if we are emmiting the special character for those objects.
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement): Make sure no children are
handled a replaced object if m_emitsObjectReplacementCharacters is set.
* editing/TextIterator.h: Updated m_emitsObjectReplacementCharacters
description to reflect the new behavior.
LayoutTests:
Updated test expectations to properly reflect the new reality when it
comes to exposing replaced objects and anymous blocks.
* platform/gtk/accessibility/table-with-rules-expected.txt: Updated to
print <\n> explicitly for the two instances of <BR> that are present in the
test, that will be included as part of an anonymous block.
* platform/efl/accessibility/table-with-rules-expected.txt: Ditto.
* platform/efl-wk2/accessibility/table-with-rules-expected.txt: Ditto.
* platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated
expectations not to expect the text of a button to be shown.
* platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto.
* platform/gtk/accessibility/replaced-objects-in-anonymous-blocks-expected.txt: Ditto.
* platform/gtk/TestExpectations: Removed replaced-objects-in-anonymous-blocks.html
from the list of expected failures, as it's now being properly exposed.
Canonical link: https://commits.webkit.org/141784@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-01 10:59:33 +00:00
|
|
|
AXRole: AXGroup AXValue: <obj>
|
2020-09-27 02:15:19 +00:00
|
|
|
AXRole: AXButton
|
2013-10-14 10:41:26 +00:00
|
|
|
AXRole: AXParagraph AXValue: After
|
|
|
|
AXRole: AXParagraph AXValue: End of test
|
|
|
|
|
|
|
|
After:
|
2020-09-27 02:15:19 +00:00
|
|
|
AXRole: AXScrollArea
|
|
|
|
AXRole: AXWebArea
|
2013-10-14 10:41:26 +00:00
|
|
|
AXRole: AXParagraph AXValue: Before
|
|
|
|
AXRole: AXParagraph AXValue: After
|
|
|
|
AXRole: AXParagraph AXValue: End of test
|
|
|
|
|
|
|
|
PASS frameBodyRole == frameBody.role is false
|
|
|
|
PASS frameGroupRole == frameGroup.role is false
|
|
|
|
PASS frameButtonRole == frameButton.role is false
|
|
|
|
PASS root.isEqual(newRoot) is true
|
|
|
|
PASS body.isEqual(newBody) is true
|
|
|
|
PASS before.isEqual(newBefore) is true
|
|
|
|
PASS after.isEqual(newAfter) is true
|
|
|
|
|
|
|
|
TEST COMPLETE
|
|
|
|
|