diff options
Diffstat (limited to 'Source/WebKit/blackberry/Api/InRegionScroller.cpp')
-rw-r--r-- | Source/WebKit/blackberry/Api/InRegionScroller.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/WebKit/blackberry/Api/InRegionScroller.cpp b/Source/WebKit/blackberry/Api/InRegionScroller.cpp index 1c1508f7f..24da9d678 100644 --- a/Source/WebKit/blackberry/Api/InRegionScroller.cpp +++ b/Source/WebKit/blackberry/Api/InRegionScroller.cpp @@ -42,7 +42,6 @@ namespace BlackBerry { namespace WebKit { static bool canScrollInnerFrame(Frame*); -static bool canScrollRenderBox(RenderBox*); static RenderLayer* parentLayer(RenderLayer*); static bool isNonRenderViewFixedPositionedContainer(RenderLayer*); @@ -360,25 +359,24 @@ static bool canScrollInnerFrame(Frame* frame) // with overflow-y: hidden and overflow-x: auto set. // The version below fixes it. // FIXME: Fix RenderBox::canBeScrolledAndHasScrollableArea method instead. -static bool canScrollRenderBox(RenderBox* box) +bool InRegionScrollerPrivate::canScrollRenderBox(RenderBox* box) { if (!box) return false; // We use this to make non-overflown contents layers to actually // be overscrollable. - if (box->layer() && box->layer()->usesCompositedScrolling() - && box->layer()->enclosingElement() && box->layer()->enclosingElement()->isElementNode()) { - DEFINE_STATIC_LOCAL(QualifiedName, forceOverscrollAttr, (nullAtom, "data-blackberry-force-overscroll", nullAtom)); - - Element* element = static_cast<Element*>(box->layer()->enclosingElement()); - if (element->fastHasAttribute(forceOverscrollAttr)) + if (box->layer() && box->layer()->usesCompositedScrolling()) { + if (box->style()->overflowScrolling() == OSBlackberryTouch) return true; } if (!box->hasOverflowClip()) return false; + if (box->scrollHeight() == box->clientHeight() && box->scrollWidth() == box->clientWidth()) + return false; + if (box->scrollsOverflowX() && (box->scrollWidth() != box->clientWidth()) || box->scrollsOverflowY() && (box->scrollHeight() != box->clientHeight())) return true; |