- Revision
- 158273
- Author
- commit-qu...@webkit.org
- Date
- 2013-10-30 09:06:07 -0700 (Wed, 30 Oct 2013)
Log Message
[EFL] accessibility/textarea-selected-text-range.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112016
Patch by Robert Plociennik <r.plocien...@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.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (158272 => 158273)
--- trunk/LayoutTests/ChangeLog 2013-10-30 16:05:40 UTC (rev 158272)
+++ trunk/LayoutTests/ChangeLog 2013-10-30 16:06:07 UTC (rev 158273)
@@ -1,5 +1,17 @@
2013-10-30 Robert Plociennik <r.plocien...@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.plocien...@samsung.com>
+
[EFL] accessibility/svg-remote-element.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112013
Modified: trunk/LayoutTests/platform/efl-wk1/TestExpectations (158272 => 158273)
--- trunk/LayoutTests/platform/efl-wk1/TestExpectations 2013-10-30 16:05:40 UTC (rev 158272)
+++ trunk/LayoutTests/platform/efl-wk1/TestExpectations 2013-10-30 16:06:07 UTC (rev 158273)
@@ -164,7 +164,6 @@
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 ]
Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (158272 => 158273)
--- trunk/LayoutTests/platform/efl-wk2/TestExpectations 2013-10-30 16:05:40 UTC (rev 158272)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations 2013-10-30 16:06:07 UTC (rev 158273)
@@ -164,7 +164,6 @@
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 ]
Modified: trunk/Tools/ChangeLog (158272 => 158273)
--- trunk/Tools/ChangeLog 2013-10-30 16:05:40 UTC (rev 158272)
+++ trunk/Tools/ChangeLog 2013-10-30 16:06:07 UTC (rev 158273)
@@ -1,5 +1,22 @@
2013-10-30 Robert Plociennik <r.plocien...@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.plocien...@samsung.com>
+
[GTK] accessibility/svg-remote-element.html is failing
https://bugs.webkit.org/show_bug.cgi?id=101185
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (158272 => 158273)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-10-30 16:05:40 UTC (rev 158272)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-10-30 16:06:07 UTC (rev 158273)
@@ -1035,13 +1035,22 @@
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)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (158272 => 158273)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-10-30 16:05:40 UTC (rev 158272)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-10-30 16:06:07 UTC (rev 158273)
@@ -1175,13 +1175,22 @@
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()