Changeset 43342 in webkit


Ignore:
Timestamp:
May 7, 2009 5:36:01 AM (15 years ago)
Author:
xan@webkit.org
Message:

2009-05-07 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

https://bugs.webkit.org/show_bug.cgi?id=25610
[GTK] text.caretOffset is reportedly always 0

Use the right function to get the caret offset in an
element. selectionStart() would only work for text
controls (there's even an ASSERT when calculating the selected
text range). Instead just get the selection and get the offset of
the start position.

  • page/gtk/AccessibilityObjectWrapperAtk.cpp:
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r43340 r43342  
     12009-05-07  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25610
     6        [GTK] text.caretOffset is reportedly always 0
     7
     8        Use the right function to get the caret offset in an
     9        element. selectionStart() would only work for text
     10        controls (there's even an ASSERT when calculating the selected
     11        text range). Instead just get the selection and get the offset of
     12        the start position.
     13
     14        * page/gtk/AccessibilityObjectWrapperAtk.cpp:
     15
    1162009-05-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
    217
  • trunk/WebCore/page/gtk/AccessibilityObjectWrapperAtk.cpp

    r42907 r43342  
    488488static gint webkit_accessible_text_get_caret_offset(AtkText* text)
    489489{
    490     // TODO: Verify this, especially for RTL text.
    491     return core(text)->selectionStart();
     490    // TODO: Verify this for RTL text.
     491    return core(text)->selection().start().offsetInContainerNode();
    492492}
    493493
Note: See TracChangeset for help on using the changeset viewer.