1. 28 Sep, 2012 1 commit
    • jchaffraix@webkit.org's avatar
      REGRESSION(r124168): Null crash in RenderLayer::createScrollbar · 81e69d5e
      jchaffraix@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96863
      
      Reviewed by Abhishek Arya.
      
      Source/WebCore:
      
      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:
      (WebCore::RenderObject::createObject):
      We need a style associated with the new RenderImage to call setImageResource but we don't need to trigger a
      style change.
      
      LayoutTests:
      
      * 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
      81e69d5e