Changeset 216980 in webkit


Ignore:
Timestamp:
May 17, 2017 10:34:27 AM (7 years ago)
Author:
n_wang@apple.com
Message:

ASSERTION FAILED in WebCore::AccessibilityNodeObject::insertChild()
https://bugs.webkit.org/show_bug.cgi?id=171927
<rdar://problem/32109781>

Reviewed by Chris Fleizach.

Source/WebCore:

The nextSibling() logic might include the continuation sibling that's not
the child of the current renderer. Make sure we only insert the valid child.

Test: accessibility/insert-children-assert.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::nextSibling):

LayoutTests:

  • accessibility/insert-children-assert-expected.txt: Added.
  • accessibility/insert-children-assert.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r216979 r216980  
     12017-05-17  Nan Wang  <n_wang@apple.com>
     2
     3        ASSERTION FAILED in WebCore::AccessibilityNodeObject::insertChild()
     4        https://bugs.webkit.org/show_bug.cgi?id=171927
     5        <rdar://problem/32109781>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        * accessibility/insert-children-assert-expected.txt: Added.
     10        * accessibility/insert-children-assert.html: Added.
     11
    1122017-05-17  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r216978 r216980  
     12017-05-17  Nan Wang  <n_wang@apple.com>
     2
     3        ASSERTION FAILED in WebCore::AccessibilityNodeObject::insertChild()
     4        https://bugs.webkit.org/show_bug.cgi?id=171927
     5        <rdar://problem/32109781>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        The nextSibling() logic might include the continuation sibling that's not
     10        the child of the current renderer. Make sure we only insert the valid child.
     11
     12        Test: accessibility/insert-children-assert.html
     13
     14        * accessibility/AccessibilityObject.cpp:
     15        (WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):
     16        * accessibility/AccessibilityRenderObject.cpp:
     17        (WebCore::AccessibilityRenderObject::nextSibling):
     18
    1192017-05-17  Ryosuke Niwa  <rniwa@webkit.org>
    220
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r216457 r216980  
    33163316void AccessibilityObject::setIsIgnoredFromParentDataForChild(AccessibilityObject* child)
    33173317{
    3318     if (!child || child->parentObject() != this)
     3318    if (!child)
    33193319        return;
     3320   
     3321    if (child->parentObject() != this) {
     3322        child->clearIsIgnoredFromParentData();
     3323        return;
     3324    }
    33203325   
    33213326    AccessibilityIsIgnoredFromParentData result = AccessibilityIsIgnoredFromParentData(this);
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r216825 r216980  
    411411        return nullptr;
    412412   
    413     return axObjectCache()->getOrCreate(nextSibling);
     413    // Make sure next sibling has the same parent.
     414    AccessibilityObject* nextObj = axObjectCache()->getOrCreate(nextSibling);
     415    if (nextObj && nextObj->parentObject() != this->parentObject())
     416        return nullptr;
     417   
     418    return nextObj;
    414419}
    415420
Note: See TracChangeset for help on using the changeset viewer.