• jchaffraix@webkit.org's avatar
    Crash in RenderTableCell::borderTop() due to custom scrollbars after r124168 · 5cdaa404
    jchaffraix@webkit.org authored
    Reviewed by Tony Chang.
    r124168 changed when we create scrollbars so that it happens (rightly) at style change time.
    However the RenderScrollbar code assumes that any overflow: scroll RenderScrollbar would be
    created at layout time as it directly tries to layout to scrollbar parts. The big issues with
    the move is that the first style change operates on a detached renderer which means that we
    could crash in some situation.
    Test: scrollbars/custom-scrollbar-table-cell.html
    * rendering/RenderScrollbarPart.cpp:
    Fixed the crash by using style information instead of calling the renderer. This is guaranteed
    to be safe but it also means that custom scrollbars sizing is not right on table cells with
    collapsing borders. The existing logic was querying layout information at style change so I
    wouldn't bet on it working properly anyway.
    * scrollbars/custom-scrollbar-table-cell-expected.png: Added.
    * scrollbars/custom-scrollbar-table-cell-expected.txt: Added.
    * scrollbars/custom-scrollbar-table-cell.html: Added.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
custom-scrollbar-table-cell-expected.txt 1 Byte