⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259438 in webkit


Ignore:
Timestamp:
Apr 2, 2020, 6:51:16 PM (6 years ago)
Author:
Andres Gonzalez
Message:

Crash in RenderMenuList::didUpdateActiveOption.
https://bugs.webkit.org/show_bug.cgi?id=208867
<rdar://problem/60035390>

Reviewed by Chris Fleizach.

Source/WebCore:

Enabled test accessibility/menu-list-sends-change-notification.html.

  • Check the type of the AccessibilityObject before downcasting in RenderMenuList.
  • Fixed handling of the AXMenuListValueChanged notification on the Mac.

This notification was previously ignored and hence the LayoutTest was failing.

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

  • rendering/RenderMenuList.cpp:

(RenderMenuList::didUpdateActiveOption):

LayoutTests:

Enabled accessibility/menu-list-sends-change-notification.html test
and added the expected.txt file for it.

  • accessibility/menu-list-sends-change-notification-expected.txt: Added.
  • accessibility/menu-list-sends-change-notification.html:
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259434 r259438  
     12020-04-02  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        Crash in RenderMenuList::didUpdateActiveOption.
     4        https://bugs.webkit.org/show_bug.cgi?id=208867
     5        <rdar://problem/60035390>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        Enabled accessibility/menu-list-sends-change-notification.html test
     10        and added the expected.txt file for it.
     11
     12        * accessibility/menu-list-sends-change-notification-expected.txt: Added.
     13        * accessibility/menu-list-sends-change-notification.html:
     14
    1152020-04-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
    216
  • trunk/LayoutTests/accessibility/menu-list-sends-change-notification.html

    r217171 r259438  
    11<html>
    22<head>
    3 <script src="../resources/js-test.js"></script>
     3<script src="../resources/js-test-pre.js"></script>
    44<script>
    55    jsTestIsAsync = true;
     
    1313
    1414        function listener(notification) {
    15             document.getElementById("console").innerText += "Got notification: " + notification + "\n";
     15            debug("MenuList received notification: " + notification);
    1616            accessibleMenulist.removeNotificationListener(listener);
    1717            finishJSTest();
     
    2121        // Change the selected index.
    2222        menulist.selectedIndex = 1;
    23 
    24         // Make the test finish quickly whether we get the notification or not.
    25         window.setTimeout(function() {
    26             finishJSTest();
    27         }, 10);
    2823    }
    2924
    3025    if (window.testRunner && window.accessibilityController) {
    3126        window.addEventListener('load', function() {
     27            debug("Load event notification received.");
    3228            setTimeout(runTest, 10);
    3329        }, false);
     
    4642<div id="console"></div>
    4743
     44<script src="../resources/js-test-post.js"></script>
    4845</body>
    4946</html>
  • trunk/LayoutTests/platform/mac/TestExpectations

    r259391 r259438  
    6868accessibility/combo-box-collapsed-selection-changed.html
    6969accessibility/children-changed-sends-notification.html
    70 accessibility/menu-list-sends-change-notification.html
    7170accessibility/multiselect-list-reports-active-option.html
    7271
  • trunk/Source/WebCore/ChangeLog

    r259435 r259438  
     12020-04-02  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        Crash in RenderMenuList::didUpdateActiveOption.
     4        https://bugs.webkit.org/show_bug.cgi?id=208867
     5        <rdar://problem/60035390>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        Enabled test accessibility/menu-list-sends-change-notification.html.
     10
     11        - Check the type of the AccessibilityObject before downcasting in RenderMenuList.
     12        - Fixed handling of the AXMenuListValueChanged notification on the Mac.
     13        This notification was previously ignored and hence the LayoutTest was failing.
     14
     15        * accessibility/mac/AXObjectCacheMac.mm:
     16        (WebCore::AXObjectCache::postPlatformNotification):
     17        * rendering/RenderMenuList.cpp:
     18        (RenderMenuList::didUpdateActiveOption):
     19
    1202020-04-02  Eric Carlson  <eric.carlson@apple.com>
    221
  • trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm

    r258673 r259438  
    342342            break;
    343343        case AXMenuListItemSelected:
     344        case AXMenuListValueChanged:
    344345            macNotification = (id)kAXMenuItemSelectedNotification;
    345346            break;
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r243601 r259438  
    421421        return;
    422422
    423     if (auto* menuList = downcast<AccessibilityMenuList>(axCache->get(this)))
    424         menuList->didUpdateActiveOption(optionIndex);
     423    auto* axObject = axCache->get(this);
     424    if (is<AccessibilityMenuList>(axObject))
     425        downcast<AccessibilityMenuList>(*axObject).didUpdateActiveOption(optionIndex);
    425426}
    426427
Note: See TracChangeset for help on using the changeset viewer.