| Index: third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
|
| index 509cc8627efd3f1f5cdfacd2f5610235bb648734..fc2d76bd21e50cb6aeeec2b7c369bae4cc4115f9 100644
|
| --- a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
|
| @@ -120,9 +120,10 @@ IntRect RootFrameViewport::visibleContentRect(
|
| }
|
|
|
| bool RootFrameViewport::shouldUseIntegerScrollOffset() const {
|
| - // Fractionals are floored in the ScrollAnimatorBase but it's important that the ScrollAnimators of the
|
| - // visual and layout viewports get the precise fractional number so never use integer scrolling for
|
| - // RootFrameViewport, we'll let the truncation happen in the subviewports.
|
| + // Fractionals are floored in the ScrollAnimatorBase but it's important that
|
| + // the ScrollAnimators of the visual and layout viewports get the precise
|
| + // fractional number so never use integer scrolling for RootFrameViewport,
|
| + // we'll let the truncation happen in the subviewports.
|
| return false;
|
| }
|
|
|
| @@ -181,9 +182,10 @@ LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent,
|
| const ScrollAlignment& alignX,
|
| const ScrollAlignment& alignY,
|
| ScrollType scrollType) {
|
| - // We want to move the rect into the viewport that excludes the scrollbars so we intersect
|
| - // the visual viewport with the scrollbar-excluded frameView content rect. However, we don't
|
| - // use visibleContentRect directly since it floors the scroll position. Instead, we use
|
| + // We want to move the rect into the viewport that excludes the scrollbars so
|
| + // we intersect the visual viewport with the scrollbar-excluded frameView
|
| + // content rect. However, we don't use visibleContentRect directly since it
|
| + // floors the scroll position. Instead, we use
|
| // ScrollAnimatorBase::currentPosition and construct a LayoutRect from that.
|
|
|
| LayoutRect frameRectInContent =
|
| @@ -193,7 +195,8 @@ LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent,
|
| LayoutRect(scrollOffsetFromScrollAnimators(),
|
| visualViewport().visibleContentRect().size());
|
|
|
| - // Intersect layout and visual rects to exclude the scrollbar from the view rect.
|
| + // Intersect layout and visual rects to exclude the scrollbar from the view
|
| + // rect.
|
| LayoutRect viewRectInContent =
|
| intersection(visualRectInContent, frameRectInContent);
|
| LayoutRect targetViewport = ScrollAlignment::getRectToExpose(
|
| @@ -202,8 +205,8 @@ LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent,
|
| setScrollPosition(DoublePoint(targetViewport.x(), targetViewport.y()),
|
| scrollType);
|
|
|
| - // RootFrameViewport only changes the viewport relative to the document so we can't change the input
|
| - // rect's location relative to the document origin.
|
| + // RootFrameViewport only changes the viewport relative to the document so we
|
| + // can't change the input rect's location relative to the document origin.
|
| return rectInContent;
|
| }
|
|
|
| @@ -218,8 +221,9 @@ void RootFrameViewport::distributeScrollBetweenViewports(
|
| ScrollType scrollType,
|
| ScrollBehavior behavior,
|
| ViewportToScrollFirst scrollFirst) {
|
| - // Make sure we use the scroll positions as reported by each viewport's ScrollAnimatorBase, since its
|
| - // ScrollableArea's position may have the fractional part truncated off.
|
| + // Make sure we use the scroll positions as reported by each viewport's
|
| + // ScrollAnimatorBase, since its ScrollableArea's position may have the
|
| + // fractional part truncated off.
|
| DoublePoint oldPosition = scrollOffsetFromScrollAnimators();
|
|
|
| DoubleSize delta = offset - oldPosition;
|
|
|