[EFL] accessibility/textarea-selected-text-range.html is failing

https://bugs.webkit.org/show_bug.cgi?id=112016

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-30
Reviewed by Mario Sanchez Prada.

Tools:

Provided implementation for AccessibilityUIElement::selectedTextRange() and
AccessibilityUIElement::setSelectedTextRange().

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::selectedTextRange): Implemented.
(AccessibilityUIElement::setSelectedTextRange): Implemented
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::selectedTextRange): Implemented.
(WTR::AccessibilityUIElement::setSelectedTextRange): Implemented.

LayoutTests:

Removed failure expectations.

* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 38466816
2013-10-30 Robert Plociennik <r.plociennik@samsung.com>
[EFL] accessibility/textarea-selected-text-range.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112016
Reviewed by Mario Sanchez Prada.
Removed failure expectations.
* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.
2013-10-30 Robert Plociennik <r.plociennik@samsung.com>
[EFL] accessibility/svg-remote-element.html is failing
......
......@@ -164,7 +164,6 @@ webkit.org/b/112008 accessibility/spinbutton-value.html [ Failure ]
webkit.org/b/112012 accessibility/svg-bounds.html [ Failure ]
webkit.org/b/112014 accessibility/textarea-insertion-point-line-number.html [ Failure ]
webkit.org/b/112015 accessibility/textarea-line-for-index.html [ Failure ]
webkit.org/b/112016 accessibility/textarea-selected-text-range.html [ Failure ]
webkit.org/b/112017 accessibility/textbox-role-reports-selection.html [ Failure ]
webkit.org/b/112018 accessibility/th-as-title-ui.html [ Failure ]
webkit.org/b/112019 accessibility/title-ui-element-correctness.html [ Failure ]
......
......@@ -164,7 +164,6 @@ webkit.org/b/112008 accessibility/spinbutton-value.html [ Failure ]
webkit.org/b/112012 accessibility/svg-bounds.html [ Failure ]
webkit.org/b/112014 accessibility/textarea-insertion-point-line-number.html [ Failure ]
webkit.org/b/112015 accessibility/textarea-line-for-index.html [ Failure ]
webkit.org/b/112016 accessibility/textarea-selected-text-range.html [ Failure ]
webkit.org/b/112017 accessibility/textbox-role-reports-selection.html [ Failure ]
webkit.org/b/112018 accessibility/th-as-title-ui.html [ Failure ]
webkit.org/b/112019 accessibility/title-ui-element-correctness.html [ Failure ]
......
2013-10-30 Robert Plociennik <r.plociennik@samsung.com>
[EFL] accessibility/textarea-selected-text-range.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112016
Reviewed by Mario Sanchez Prada.
Provided implementation for AccessibilityUIElement::selectedTextRange() and
AccessibilityUIElement::setSelectedTextRange().
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::selectedTextRange): Implemented.
(AccessibilityUIElement::setSelectedTextRange): Implemented
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::selectedTextRange): Implemented.
(WTR::AccessibilityUIElement::setSelectedTextRange): Implemented.
2013-10-30 Robert Plociennik <r.plociennik@samsung.com>
[GTK] accessibility/svg-remote-element.html is failing
......
......@@ -1035,13 +1035,22 @@ AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned colu
JSStringRef AccessibilityUIElement::selectedTextRange()
{
// FIXME: implement
return JSStringCreateWithCharacters(0, 0);
if (!ATK_IS_TEXT(m_element))
return JSStringCreateWithCharacters(0, 0);
gint start, end;
g_free(atk_text_get_selection(ATK_TEXT(m_element), 0, &start, &end));
GOwnPtr<gchar> selection(g_strdup_printf("{%d, %d}", start, end - start));
return JSStringCreateWithUTF8CString(selection.get());
}
void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
{
// FIXME: implement
if (!ATK_IS_TEXT(m_element))
return;
atk_text_set_selection(ATK_TEXT(m_element), 0, location, location + length);
}
JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
......
......@@ -1175,13 +1175,22 @@ PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::verticalScrollbar() c
JSRetainPtr<JSStringRef> AccessibilityUIElement::selectedTextRange()
{
// FIXME: implement
return JSStringCreateWithCharacters(0, 0);
if (!ATK_IS_TEXT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
gint start, end;
g_free(atk_text_get_selection(ATK_TEXT(m_element.get()), 0, &start, &end));
GOwnPtr<gchar> selection(g_strdup_printf("{%d, %d}", start, end - start));
return JSStringCreateWithUTF8CString(selection.get());
}
void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
{
// FIXME: implement
if (!ATK_IS_TEXT(m_element.get()))
return;
atk_text_set_selection(ATK_TEXT(m_element.get()), 0, location, location + length);
}
void AccessibilityUIElement::increment()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment