Changeset 69651 in webkit


Ignore:
Timestamp:
Oct 13, 2010 5:27:51 AM (14 years ago)
Author:
yael.aharon@nokia.com
Message:

2010-10-13 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Andreas Kling.

Wrong ASSERT when select element has size 0
https://bugs.webkit.org/show_bug.cgi?id=47567

  • fast/dom/HTMLSelectElement/click-size-zero-no-crash-expected.txt: Added.
  • fast/dom/HTMLSelectElement/click-size-zero-no-crash.html: Added.

2010-10-13 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Andreas Kling.

Wrong ASSERT when select element has size 0
https://bugs.webkit.org/show_bug.cgi?id=47567

Keep the ASSERT only if the size of the element list is more than 0
Test: fast/dom/HTMLSelectElement/click-size-zero-no-crash.html

  • dom/SelectElement.cpp: (WebCore::SelectElement::updateListBoxSelection): (WebCore::SelectElement::listBoxDefaultEventHandler):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69647 r69651  
     12010-10-13  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Wrong ASSERT when select element has size 0
     6        https://bugs.webkit.org/show_bug.cgi?id=47567
     7
     8        * fast/dom/HTMLSelectElement/click-size-zero-no-crash-expected.txt: Added.
     9        * fast/dom/HTMLSelectElement/click-size-zero-no-crash.html: Added.
     10
    1112010-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
    212
  • trunk/WebCore/ChangeLog

    r69646 r69651  
     12010-10-13  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Wrong ASSERT when select element has size 0
     6        https://bugs.webkit.org/show_bug.cgi?id=47567
     7
     8        Keep the ASSERT only if the size of the element list is more than 0
     9        Test: fast/dom/HTMLSelectElement/click-size-zero-no-crash.html
     10
     11        * dom/SelectElement.cpp:
     12        (WebCore::SelectElement::updateListBoxSelection):
     13        (WebCore::SelectElement::listBoxDefaultEventHandler):
     14
    1152010-10-13  Steve Block  <steveblock@google.com>
    216
  • trunk/WebCore/dom/SelectElement.cpp

    r69437 r69651  
    153153{
    154154    ASSERT(element->renderer() && (element->renderer()->isListBox() || data.multiple()));
    155     ASSERT(data.activeSelectionAnchorIndex() >= 0);
     155    ASSERT(!data.listItems(element).size() || data.activeSelectionAnchorIndex() >= 0);
    156156
    157157    unsigned start = min(data.activeSelectionAnchorIndex(), data.activeSelectionEndIndex());
     
    753753            saveLastSelection(data, element);
    754754
    755             ASSERT_UNUSED(listItems, endIndex >= 0 && (unsigned) endIndex < listItems.size());
     755            ASSERT_UNUSED(listItems, !listItems.size() || (endIndex >= 0 && (unsigned) endIndex < listItems.size()));
    756756            setActiveSelectionEndIndex(data, endIndex);
    757757           
Note: See TracChangeset for help on using the changeset viewer.