| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3639 frameRectsChanged(); | 3639 frameRectsChanged(); |
| 3640 positionScrollbarLayers(); | 3640 positionScrollbarLayers(); |
| 3641 updateScrollCorner(); | 3641 updateScrollCorner(); |
| 3642 } | 3642 } |
| 3643 | 3643 |
| 3644 adjustScrollPositionFromUpdateScrollbars(); | 3644 adjustScrollPositionFromUpdateScrollbars(); |
| 3645 } | 3645 } |
| 3646 | 3646 |
| 3647 void FrameView::adjustScrollPositionFromUpdateScrollbars() | 3647 void FrameView::adjustScrollPositionFromUpdateScrollbars() |
| 3648 { | 3648 { |
| 3649 DoublePoint adjustedScrollPosition = clampScrollPosition(scrollPositionDoubl
e()); | 3649 DoublePoint clamped = clampScrollPosition(scrollPositionDouble()); |
| 3650 | 3650 // Restore before clamping because clamping clears the scroll anchor. |
| 3651 if (adjustedScrollPosition != scrollPositionDouble() || scrollOriginChanged(
)) { | 3651 // TODO(ymalik): This same logic exists in PaintLayerScrollableArea. |
| 3652 ScrollableArea::setScrollPosition(adjustedScrollPosition, ProgrammaticSc
roll); | 3652 // Remove when root-layer-scrolls is enabled. |
| 3653 if (clamped != scrollPositionDouble() && shouldPerformScrollAnchoring() && m
_scrollAnchor.hasScroller()) { |
| 3654 m_scrollAnchor.restore(); |
| 3655 clamped = clampScrollPosition(scrollPositionDouble()); |
| 3656 } |
| 3657 if (clamped != scrollPositionDouble() || scrollOriginChanged()) { |
| 3658 ScrollableArea::setScrollPosition(clamped, ProgrammaticScroll); |
| 3653 resetScrollOriginChanged(); | 3659 resetScrollOriginChanged(); |
| 3654 } | 3660 } |
| 3655 } | 3661 } |
| 3656 | 3662 |
| 3657 IntRect FrameView::rectToCopyOnScroll() const | 3663 IntRect FrameView::rectToCopyOnScroll() const |
| 3658 { | 3664 { |
| 3659 IntRect scrollViewRect = convertToRootFrame(IntRect((shouldPlaceVerticalScro
llbarOnLeft() && verticalScrollbar()) ? verticalScrollbar()->width() : 0, 0, vis
ibleWidth(), visibleHeight())); | 3665 IntRect scrollViewRect = convertToRootFrame(IntRect((shouldPlaceVerticalScro
llbarOnLeft() && verticalScrollbar()) ? verticalScrollbar()->width() : 0, 0, vis
ibleWidth(), visibleHeight())); |
| 3660 if (hasOverlayScrollbars()) { | 3666 if (hasOverlayScrollbars()) { |
| 3661 int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVertica
lScrollbar()) ? verticalScrollbar()->width() : 0; | 3667 int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVertica
lScrollbar()) ? verticalScrollbar()->width() : 0; |
| 3662 int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHo
rizontalScrollbar()) ? horizontalScrollbar()->height() : 0; | 3668 int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHo
rizontalScrollbar()) ? horizontalScrollbar()->height() : 0; |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4275 } | 4281 } |
| 4276 | 4282 |
| 4277 bool FrameView::canThrottleRendering() const | 4283 bool FrameView::canThrottleRendering() const |
| 4278 { | 4284 { |
| 4279 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4285 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4280 return false; | 4286 return false; |
| 4281 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4287 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4282 } | 4288 } |
| 4283 | 4289 |
| 4284 } // namespace blink | 4290 } // namespace blink |
| OLD | NEW |