Skip to content
Commit 81e69d5e authored by jchaffraix@webkit.org's avatar jchaffraix@webkit.org
Browse files

REGRESSION(r124168): Null crash in RenderLayer::createScrollbar

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
parent bc69e92e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment