• jchaffraix@webkit.org's avatar
    REGRESSION(r124168): Null crash in RenderLayer::createScrollbar · 81e69d5e
    jchaffraix@webkit.org authored
    Reviewed by Abhishek Arya.
    After r124168, we synchronously create any overflow:scroll scrollbar on the first style change - we used to wait
    until layout was called. The issue is that the logic in RenderLayer assumes that our node is completely attached
    when the style change is dispatched. The crash occured because the 'content' image code path in
    RenderObject::createObject triggered a style change too early.
    Test: scrollbars/scrollbar-content-crash.html
    * rendering/RenderObject.cpp:
    We need a style associated with the new RenderImage to call setImageResource but we don't need to trigger a
    style change.
    * scrollbars/scrollbar-content-crash-expected.txt: Added.
    * scrollbars/scrollbar-content-crash.html: Added.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129955 268f45cc-cd09-0410-ab3c-d52691b4dbfc