Skip to content
  • mitz@apple.com's avatar
    <rdar://problem/7576663> Crash caused by anonymous list item · 9feca281
    mitz@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=34183
    
    Reviewed by Beth Dakin.
    
    WebCore: 
    
    Test: fast/lists/anonymous-items.html
    
    enclosingList() and previousListItem() were DOM-based, but in order to work with anonymous
    list items, they need to work with rthe render tree.
    
    * rendering/RenderListItem.cpp:
    (WebCore::isList): Factored out.
    (WebCore::enclosingList): Added this variant that takes a RenderObject.
    (WebCore::previousListItem): Changed to travers the render tree.
    (WebCore::RenderListItem::calcValue): Use the RenderObject version of enclosingList()
    (WebCore::RenderListItem::setExplicitValue): Added an assertion.
    (WebCore::RenderListItem::clearExplicitValue): Ditto.
    
    LayoutTests: 
    
    * fast/lists/anonymous-items.html: Added.
    * platform/mac/fast/lists/anonymous-items-expected.checksum: Added.
    * platform/mac/fast/lists/anonymous-items-expected.png: Added.
    * platform/mac/fast/lists/anonymous-items-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    9feca281