Changeset 158273 in webkit


Ignore:
Timestamp:
Oct 30, 2013 9:06:07 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[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.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r158271 r158273  
     12013-10-30  Robert Plociennik  <r.plociennik@samsung.com>
     2
     3        [EFL] accessibility/textarea-selected-text-range.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=112016
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Removed failure expectations.
     9
     10        * platform/efl-wk1/TestExpectations: The test is no longer failing.
     11        * platform/efl-wk2/TestExpectations: The test is no longer failing.
     12
    1132013-10-30  Robert Plociennik  <r.plociennik@samsung.com>
    214
  • trunk/LayoutTests/platform/efl-wk1/TestExpectations

    r158271 r158273  
    165165webkit.org/b/112014 accessibility/textarea-insertion-point-line-number.html [ Failure ]
    166166webkit.org/b/112015 accessibility/textarea-line-for-index.html [ Failure ]
    167 webkit.org/b/112016 accessibility/textarea-selected-text-range.html [ Failure ]
    168167webkit.org/b/112017 accessibility/textbox-role-reports-selection.html [ Failure ]
    169168webkit.org/b/112018 accessibility/th-as-title-ui.html [ Failure ]
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r158271 r158273  
    165165webkit.org/b/112014 accessibility/textarea-insertion-point-line-number.html [ Failure ]
    166166webkit.org/b/112015 accessibility/textarea-line-for-index.html [ Failure ]
    167 webkit.org/b/112016 accessibility/textarea-selected-text-range.html [ Failure ]
    168167webkit.org/b/112017 accessibility/textbox-role-reports-selection.html [ Failure ]
    169168webkit.org/b/112018 accessibility/th-as-title-ui.html [ Failure ]
  • trunk/Tools/ChangeLog

    r158267 r158273  
     12013-10-30  Robert Plociennik  <r.plociennik@samsung.com>
     2
     3        [EFL] accessibility/textarea-selected-text-range.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=112016
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Provided implementation for AccessibilityUIElement::selectedTextRange() and
     9        AccessibilityUIElement::setSelectedTextRange().
     10
     11        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
     12        (AccessibilityUIElement::selectedTextRange): Implemented.
     13        (AccessibilityUIElement::setSelectedTextRange): Implemented
     14        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
     15        (WTR::AccessibilityUIElement::selectedTextRange): Implemented.
     16        (WTR::AccessibilityUIElement::setSelectedTextRange): Implemented.
     17
    1182013-10-30  Robert Plociennik  <r.plociennik@samsung.com>
    219
  • trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp

    r158267 r158273  
    10361036JSStringRef AccessibilityUIElement::selectedTextRange()
    10371037{
    1038     // FIXME: implement
    1039     return JSStringCreateWithCharacters(0, 0);
     1038    if (!ATK_IS_TEXT(m_element))
     1039        return JSStringCreateWithCharacters(0, 0);
     1040
     1041    gint start, end;
     1042    g_free(atk_text_get_selection(ATK_TEXT(m_element), 0, &start, &end));
     1043
     1044    GOwnPtr<gchar> selection(g_strdup_printf("{%d, %d}", start, end - start));
     1045    return JSStringCreateWithUTF8CString(selection.get());
    10401046}
    10411047
    10421048void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
    10431049{
    1044     // FIXME: implement
     1050    if (!ATK_IS_TEXT(m_element))
     1051        return;
     1052
     1053    atk_text_set_selection(ATK_TEXT(m_element), 0, location, location + length);
    10451054}
    10461055
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r158267 r158273  
    11761176JSRetainPtr<JSStringRef> AccessibilityUIElement::selectedTextRange()
    11771177{
    1178     // FIXME: implement
    1179     return JSStringCreateWithCharacters(0, 0);
     1178    if (!ATK_IS_TEXT(m_element.get()))
     1179        return JSStringCreateWithCharacters(0, 0);
     1180
     1181    gint start, end;
     1182    g_free(atk_text_get_selection(ATK_TEXT(m_element.get()), 0, &start, &end));
     1183
     1184    GOwnPtr<gchar> selection(g_strdup_printf("{%d, %d}", start, end - start));
     1185    return JSStringCreateWithUTF8CString(selection.get());
    11801186}
    11811187
    11821188void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
    11831189{
    1184     // FIXME: implement
     1190    if (!ATK_IS_TEXT(m_element.get()))
     1191        return;
     1192
     1193    atk_text_set_selection(ATK_TEXT(m_element.get()), 0, location, location + length);
    11851194}
    11861195
Note: See TracChangeset for help on using the changeset viewer.