Changeset 124997 in webkit


Ignore:
Timestamp:
Aug 7, 2012 11:47:46 PM (12 years ago)
Author:
mario@webkit.org
Message:

REGRESSION(r65062): out of bound access in TextIterator (5 editing tests) on GTK
https://bugs.webkit.org/show_bug.cgi?id=63611

Reviewed by Ryosuke Niwa.

Ensure document's layout is up-to-date before using TextIterator
to properly calculate the offset for a text change when emitting
accessibility related signals in GTK.

  • accessibility/gtk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Call
to document->updateLayout() before using TextIterator.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r124992 r124997  
     12012-08-08  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        REGRESSION(r65062): out of bound access in TextIterator (5 editing tests) on GTK
     4        https://bugs.webkit.org/show_bug.cgi?id=63611
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Ensure document's layout is up-to-date before using TextIterator
     9        to properly calculate the offset for a text change when emitting
     10        accessibility related signals in GTK.
     11
     12        * accessibility/gtk/AXObjectCacheAtk.cpp:
     13        (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Call
     14        to document->updateLayout() before using TextIterator.
     15
    1162012-08-07  Hayato Ito  <hayato@chromium.org>
    217
  • trunk/Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp

    r112911 r124997  
    186186
    187187    Node* node = object->node();
    188     RefPtr<Range> range = Range::create(node->document(), node->parentNode(), 0, node, 0);
     188    if (!node)
     189        return;
     190
     191    // Ensure document's layout is up-to-date before using TextIterator.
     192    Document* document = node->document();
     193    document->updateLayout();
     194
     195    RefPtr<Range> range = Range::create(document, node->parentNode(), 0, node, 0);
    189196    emitTextChanged(object, textChange, offset + TextIterator::rangeLength(range.get()), text);
    190197}
Note: See TracChangeset for help on using the changeset viewer.