Crash in WebCore::RenderBoxModelObject::paddingLeft
https://bugs.webkit.org/show_bug.cgi?id=83889
Patch by Takashi Sakamoto <tasak@google.com> on 2012-05-09
Reviewed by Abhishek Arya.
Source/WebCore:
RenderScrollbar creates RenderScrollbarPart without any parent
renderers. However, if the scrollbar has percent padding styles,
non-null parent renderer is required. So after creating/destroying
RenderScrollbarPart instances, set owningRenderer(creating)/0
(destroying) as its parent renderer.
Test: scrollbars/scrollbar-percent-padding-crash.html
scrollbars/scrollbar-percent-padding-crash-expected.txt
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::updateScrollbarPart):
Added setParent after creating/destroying RenderScrollbarPart.
* rendering/RenderScrollbarPart.cpp:
Made RenderScollbar friend, because setParent is protected and
RenderScrollbar is not inherited from class RenderObject.
LayoutTests:
As just invoking layoutTestController.display() invokes scrollbar's
WebCore::RenderScrollbarPart::paintIntoRect(), adding display() after
invoking layoutTestController.dumpAsText().
* scrollbars/scrollbar-percent-padding-crash.html: Added.
* scrollbars/scrollbar-percent-padding-crash-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed