• rwlbuis@webkit.org's avatar
    REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter · f02f5da6
    rwlbuis@webkit.org authored
    Reviewed by Ryosuke Niwa.
    The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
    includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
    This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
    assertion, which the testcase verifies.
    To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
    Tests: svg/custom/document-all-includes-svg.html
    * html/HTMLCollection.cpp:
    Add test to verify that SVG and HTML elements with id's are both found when using document.all or named properties.
    * svg/custom/document-all-includes-svg-expected.txt: Added.
    * svg/custom/document-all-includes-svg.html: Added.
    * svg/custom/window-named-item-lookup-expected.txt: Added.
    * svg/custom/window-named-item-lookup.html: Added.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog 2.13 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.