| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index 70f6a3e44e358bdcd4586651d1ec5fb1fe8afff1..f7572bb0c96460e148ce88c074ea0095a6543e6e 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -1329,6 +1329,24 @@ IntRect RenderLayer::scrollableAreaBoundingBox() const
|
| return renderer()->absoluteBoundingBoxRect();
|
| }
|
|
|
| +bool RenderLayer::isHorizontallyScrollable() const
|
| +{
|
| + RenderBox* box = renderBox();
|
| + ASSERT(box);
|
| +
|
| + EOverflow overflowStyle = renderer()->style()->overflowX();
|
| + return (overflowStyle == OSCROLL || overflowStyle == OAUTO);
|
| +}
|
| +
|
| +bool RenderLayer::isVerticallyScrollable() const
|
| +{
|
| + RenderBox* box = renderBox();
|
| + ASSERT(box);
|
| +
|
| + EOverflow overflowStyle = renderer()->style()->overflowY();
|
| + return (overflowStyle == OSCROLL || overflowStyle == OAUTO);
|
| +}
|
| +
|
| RenderLayer* RenderLayer::enclosingTransformedAncestor() const
|
| {
|
| RenderLayer* curr = parent();
|
| @@ -2489,8 +2507,13 @@ void RenderLayer::resize(const PlatformEvent& evt, const LayoutSize& oldOffset)
|
|
|
| int RenderLayer::scrollSize(ScrollbarOrientation orientation) const
|
| {
|
| - Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_hBar : m_vBar).get();
|
| - return scrollbar ? (scrollbar->totalSize() - scrollbar->visibleSize()) : 0;
|
| + RenderBox* box = renderBox();
|
| + ASSERT(box);
|
| +
|
| + if (orientation == HorizontalScrollbar)
|
| + return m_scrollSize.width() - box->pixelSnappedClientWidth();
|
| +
|
| + return m_scrollSize.height() - box->pixelSnappedClientHeight();
|
| }
|
|
|
| int RenderLayer::scrollPosition(Scrollbar* scrollbar) const
|
| @@ -2860,14 +2883,6 @@ void RenderLayer::destroyScrollbar(ScrollbarOrientation orientation)
|
| scrollbar = 0;
|
| }
|
|
|
| -bool RenderLayer::scrollsOverflow() const
|
| -{
|
| - if (!renderer()->isBox())
|
| - return false;
|
| -
|
| - return toRenderBox(renderer())->scrollsOverflow();
|
| -}
|
| -
|
| void RenderLayer::setHasHorizontalScrollbar(bool hasScrollbar)
|
| {
|
| if (hasScrollbar == hasHorizontalScrollbar())
|
|
|