[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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Tests passing after r158273 and r158352
and rebaseline needed after r158195.

* platform/gtk/TestExpectations: Removed tests now passing.
* platform/gtk/accessibility/media-element-expected.txt: Rebaseline.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, EFL gardening. css3 text tests are failing since r158389

* platform/efl/TestExpectations: Add failure tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, EFL gardening. Skip webgl tests because EFL port doesn't fully support webgl yet.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Buildfix for !ENABLE(INSPECTOR) after 157288.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158432 268f45cc-cd09-0410-ab3c-d52691b4dbfc