Changeset 220084 in webkit


Ignore:
Timestamp:
Jul 31, 2017 5:18:00 PM (7 years ago)
Author:
n_wang@apple.com
Message:

AX: CFEqual is failing on text markers with exact same data
https://bugs.webkit.org/show_bug.cgi?id=175002
<rdar://problem/33636985>

Reviewed by Chris Fleizach.

We should zero the memory of the TextMarkerData instance so that it
can be tested for byte-equivalence.

Made sure this change won't break any of the existing tests.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r220077 r220084  
     12017-07-31  Nan Wang  <n_wang@apple.com>
     2
     3        AX: CFEqual is failing on text markers with exact same data
     4        https://bugs.webkit.org/show_bug.cgi?id=175002
     5        <rdar://problem/33636985>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        We should zero the memory of the TextMarkerData instance so that it
     10        can be tested for byte-equivalence.
     11
     12        Made sure this change won't break any of the existing tests.
     13
     14        * accessibility/AXObjectCache.cpp:
     15        (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
     16        (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
     17
    1182017-07-28  Matt Rajca  <mrajca@apple.com>
    219
  • trunk/Source/WebCore/accessibility/AXObjectCache.cpp

    r219638 r220084  
    21612161    RefPtr<AccessibilityObject> obj = cache->getOrCreate(domNode);
    21622162
     2163    // This memory must be zero'd so instances of TextMarkerData can be tested for byte-equivalence.
    21632164    TextMarkerData textMarkerData;
     2165    memset(&textMarkerData, 0, sizeof(TextMarkerData));
     2166   
    21642167    textMarkerData.axID = obj.get()->axObjectID();
    21652168    textMarkerData.node = domNode;
     
    21862189        return std::nullopt;
    21872190
     2191    // This memory must be zero'd so instances of TextMarkerData can be tested for byte-equivalence.
    21882192    TextMarkerData textMarkerData;
     2193    memset(&textMarkerData, 0, sizeof(TextMarkerData));
     2194   
    21892195    textMarkerData.axID = obj.get()->axObjectID();
    21902196    textMarkerData.node = &textControl;
Note: See TracChangeset for help on using the changeset viewer.