Changeset 170704 in webkit


Ignore:
Timestamp:
Jul 2, 2014 2:52:38 AM (10 years ago)
Author:
mario.prada@samsung.com
Message:

REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
https://bugs.webkit.org/show_bug.cgi?id=134399

Reviewed by Chris Fleizach.

Source/WebCore:
Check that the value of optionIndex passed as a parameter is valid
before calling didUpdateActiveOption() over the item of the menu
list, to prevent crashes in platforms where renderers (and therefore
accessibility objects) might not be created for items at the time
of calling AccessibilityMenuList::didUpdateActiveOption().

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.

LayoutTests:
Removing Crash expectations for two layout tests.

  • platform/gtk/TestExpectations: Updated.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170699 r170704  
     12014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>
     2
     3        REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
     4        https://bugs.webkit.org/show_bug.cgi?id=134399
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Removing Crash expectations for two layout tests.
     9
     10        * platform/gtk/TestExpectations: Updated.
     11
    1122014-07-01  Frédéric Wang  <fred.wang@free.fr>
    213
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r170537 r170704  
    515515
    516516webkit.org/b/133797 fast/dom/NavigatorContentUtils/register-protocol-handler.html [ Crash ]
    517 
    518 webkit.org/b/134399 fast/forms/option-constructor-selected.html [ Crash ]
    519 webkit.org/b/134399 fast/forms/select-live-pseudo-selectors.html [ Crash ]
    520517
    521518#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/Source/WebCore/ChangeLog

    r170701 r170704  
     12014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>
     2
     3        REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
     4        https://bugs.webkit.org/show_bug.cgi?id=134399
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Check that the value of optionIndex passed as a parameter is valid
     9        before calling didUpdateActiveOption() over the item of the menu
     10        list, to prevent crashes in platforms where renderers (and therefore
     11        accessibility objects) might not be created for items at the time
     12        of calling AccessibilityMenuList::didUpdateActiveOption().
     13
     14        * accessibility/AccessibilityMenuList.cpp:
     15        (WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.
     16
    1172014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp

    r170008 r170704  
    121121        // You can reproduce the issue in the GTK+ port by removing this check and running
    122122        // accessibility/insert-selected-option-into-select-causes-crash.html (will crash).
    123         if (childObjects[0]->isMenuListPopup() && childObjects[0]->children().size()) {
     123        int popupChildrenSize = static_cast<int>(childObjects[0]->children().size());
     124        if (childObjects[0]->isMenuListPopup() && optionIndex >= 0 && optionIndex < popupChildrenSize) {
    124125            if (AccessibilityMenuListPopup* popup = toAccessibilityMenuListPopup(childObjects[0].get()))
    125126                popup->didUpdateActiveOption(optionIndex);
Note: See TracChangeset for help on using the changeset viewer.