Changeset 44567 in webkit


Ignore:
Timestamp:
Jun 10, 2009 10:17:12 AM (15 years ago)
Author:
xan@webkit.org
Message:

2009-06-10 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

https://bugs.webkit.org/show_bug.cgi?id=25609
[GTK] Implement support for get_selection and get_n_selections

Implement atk_text_get_selection.

  • accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_text_get_selection):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r44566 r44567  
     12009-06-10  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25609
     6        [GTK] Implement support for get_selection and get_n_selections
     7
     8        Implement atk_text_get_selection.
     9
     10        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     11        (webkit_accessible_text_get_selection):
     12
    1132009-06-10  Xan Lopez  <xlopez@igalia.com>
    214
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r44566 r44567  
    619619static gchar* webkit_accessible_text_get_selection(AtkText* text, gint selection_num, gint* start_offset, gint* end_offset)
    620620{
    621     notImplemented();
    622     return NULL;
     621    if (selection_num != 0) {
     622        // WebCore does not support multiple selection, so anything but 0 does not make sense for now.
     623        *start_offset = *end_offset = 0;
     624        return NULL;
     625    }
     626
     627    AccessibilityObject* coreObject = core(text);
     628    VisibleSelection selection = coreObject->selection();
     629    *start_offset = selection.start().offsetInContainerNode();
     630    *end_offset = selection.end().offsetInContainerNode();
     631
     632    return webkit_accessible_text_get_text(text, *start_offset, *end_offset);
    623633}
    624634
Note: See TracChangeset for help on using the changeset viewer.