| Index: Source/core/layout/LayoutBox.cpp
|
| diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
|
| index 68e6966cf196121c093c050160cac586e9237b1d..61bbef20aed9e969b580c0a9869c7babcbf521cc 100644
|
| --- a/Source/core/layout/LayoutBox.cpp
|
| +++ b/Source/core/layout/LayoutBox.cpp
|
| @@ -769,7 +769,7 @@ bool LayoutBox::usesCompositedScrolling() const
|
| return hasOverflowClip() && hasLayer() && layer()->scrollableArea()->usesCompositedScrolling();
|
| }
|
|
|
| -void LayoutBox::autoscroll(const IntPoint& position)
|
| +void LayoutBox::autoscroll(const IntPoint& positionInRootFrame)
|
| {
|
| LocalFrame* frame = this->frame();
|
| if (!frame)
|
| @@ -779,8 +779,8 @@ void LayoutBox::autoscroll(const IntPoint& position)
|
| if (!frameView)
|
| return;
|
|
|
| - IntPoint currentDocumentPosition = frameView->windowToContents(position);
|
| - scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
|
| + IntPoint positionInContent = frameView->rootFrameToContents(positionInRootFrame);
|
| + scrollRectToVisible(LayoutRect(positionInContent, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
|
| }
|
|
|
| // There are two kinds of renderer that can autoscroll.
|
| @@ -795,7 +795,7 @@ bool LayoutBox::canAutoscroll() const
|
|
|
| // If specified point is in border belt, returned offset denotes direction of
|
| // scrolling.
|
| -IntSize LayoutBox::calculateAutoscrollDirection(const IntPoint& windowPoint) const
|
| +IntSize LayoutBox::calculateAutoscrollDirection(const IntPoint& pointInRootFrame) const
|
| {
|
| if (!frame())
|
| return IntSize();
|
| @@ -806,9 +806,9 @@ IntSize LayoutBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con
|
|
|
| IntRect box(absoluteBoundingBoxRect());
|
| box.move(view()->frameView()->scrollOffset());
|
| - IntRect windowBox = view()->frameView()->contentsToWindow(box);
|
| + IntRect windowBox = view()->frameView()->contentsToRootFrame(box);
|
|
|
| - IntPoint windowAutoscrollPoint = windowPoint;
|
| + IntPoint windowAutoscrollPoint = pointInRootFrame;
|
|
|
| if (windowAutoscrollPoint.x() < windowBox.x() + autoscrollBeltSize)
|
| windowAutoscrollPoint.move(-autoscrollBeltSize, 0);
|
| @@ -820,7 +820,7 @@ IntSize LayoutBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con
|
| else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize)
|
| windowAutoscrollPoint.move(0, autoscrollBeltSize);
|
|
|
| - return windowAutoscrollPoint - windowPoint;
|
| + return windowAutoscrollPoint - pointInRootFrame;
|
| }
|
|
|
| LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* renderer)
|
|
|