Index: Source/core/rendering/RenderLayerScrollableArea.cpp |
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp |
index 2cee71e355c6d7b51607def7b9e48d069943bce5..375354afa55082419adf7c8c40deea9b28c2365b 100644 |
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp |
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp |
@@ -770,9 +770,9 @@ PassRefPtr<Scrollbar> RenderLayerScrollableArea::createScrollbar(ScrollbarOrient |
} else { |
widget = Scrollbar::create(this, orientation, RegularScrollbar); |
if (orientation == HorizontalScrollbar) |
- didAddHorizontalScrollbar(widget.get()); |
+ didAddScrollbar(widget.get(), HorizontalScrollbar); |
else |
- didAddVerticalScrollbar(widget.get()); |
+ didAddScrollbar(widget.get(), VerticalScrollbar); |
} |
m_box->document().view()->addChild(widget.get()); |
return widget.release(); |
@@ -784,12 +784,8 @@ void RenderLayerScrollableArea::destroyScrollbar(ScrollbarOrientation orientatio |
if (!scrollbar) |
return; |
- if (!scrollbar->isCustomScrollbar()) { |
- if (orientation == HorizontalScrollbar) |
- willRemoveHorizontalScrollbar(scrollbar.get()); |
- else |
- willRemoveVerticalScrollbar(scrollbar.get()); |
- } |
+ if (!scrollbar->isCustomScrollbar()) |
+ willRemoveScrollbar(scrollbar.get(), orientation); |
scrollbar->removeFromParent(); |
scrollbar->disconnectFromScrollableArea(); |