Index: Source/WebCore/rendering/RenderLayer.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderLayer.cpp (revision 118271) |
+++ Source/WebCore/rendering/RenderLayer.cpp (working copy) |
@@ -2194,7 +2194,7 @@ |
RenderObject* actualRenderer = renderer()->node() ? renderer()->node()->shadowAncestorNode()->renderer() : renderer(); |
bool hasCustomScrollbarStyle = actualRenderer->isBox() && actualRenderer->style()->hasPseudoStyle(SCROLLBAR); |
if (hasCustomScrollbarStyle) |
- widget = RenderScrollbar::createCustomScrollbar(this, orientation, toRenderBox(actualRenderer)); |
+ widget = RenderScrollbar::createCustomScrollbar(this, orientation, actualRenderer->node()); |
else { |
widget = Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar); |
if (orientation == HorizontalScrollbar) |
@@ -2210,14 +2210,10 @@ |
{ |
RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar; |
if (scrollbar) { |
- if (scrollbar->isCustomScrollbar()) |
- toRenderScrollbar(scrollbar.get())->clearOwningRenderer(); |
- else { |
- if (orientation == HorizontalScrollbar) |
- willRemoveHorizontalScrollbar(scrollbar.get()); |
- else |
- willRemoveVerticalScrollbar(scrollbar.get()); |
- } |
+ if (orientation == HorizontalScrollbar) |
+ willRemoveHorizontalScrollbar(scrollbar.get()); |
+ else |
+ willRemoveVerticalScrollbar(scrollbar.get()); |
scrollbar->removeFromParent(); |
scrollbar->disconnectFromScrollableArea(); |