Chromium Code Reviews| 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 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 adjustedScrollPosition = clampScrollPosition(scrollPositionDoubl e()); |
| 3650 | |
| 3651 if (adjustedScrollPosition != scrollPositionDouble() || scrollOriginChanged( )) { | 3650 if (adjustedScrollPosition != scrollPositionDouble() || scrollOriginChanged( )) { |
| 3652 ScrollableArea::setScrollPosition(adjustedScrollPosition, ProgrammaticSc roll); | 3651 // Since the scroll bounds have changed and the scroller is at a positio n |
| 3652 // that is outside its new bounds. Calling ScrollAnchor::restore | |
|
skobes
2016/07/14 14:49:25
If the scroll bounds have changed, we will relayou
| |
| 3653 // ensures that no visible jump is seen when clamping. | |
| 3654 if (shouldPerformScrollAnchoring() && m_scrollAnchor.hasScroller()) { | |
| 3655 m_scrollAnchor.restore(); | |
| 3656 adjustedScrollPosition = clampScrollPosition(scrollPositionDouble()) ; | |
| 3657 } | |
| 3658 if (adjustedScrollPosition != scrollPositionDouble()) | |
| 3659 ScrollableArea::setScrollPosition(adjustedScrollPosition, Programmat icScroll); | |
| 3653 resetScrollOriginChanged(); | 3660 resetScrollOriginChanged(); |
| 3654 } | 3661 } |
| 3655 } | 3662 } |
| 3656 | 3663 |
| 3657 IntRect FrameView::rectToCopyOnScroll() const | 3664 IntRect FrameView::rectToCopyOnScroll() const |
| 3658 { | 3665 { |
| 3659 IntRect scrollViewRect = convertToRootFrame(IntRect((shouldPlaceVerticalScro llbarOnLeft() && verticalScrollbar()) ? verticalScrollbar()->width() : 0, 0, vis ibleWidth(), visibleHeight())); | 3666 IntRect scrollViewRect = convertToRootFrame(IntRect((shouldPlaceVerticalScro llbarOnLeft() && verticalScrollbar()) ? verticalScrollbar()->width() : 0, 0, vis ibleWidth(), visibleHeight())); |
| 3660 if (hasOverlayScrollbars()) { | 3667 if (hasOverlayScrollbars()) { |
| 3661 int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVertica lScrollbar()) ? verticalScrollbar()->width() : 0; | 3668 int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVertica lScrollbar()) ? verticalScrollbar()->width() : 0; |
| 3662 int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHo rizontalScrollbar()) ? horizontalScrollbar()->height() : 0; | 3669 int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHo rizontalScrollbar()) ? horizontalScrollbar()->height() : 0; |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4275 } | 4282 } |
| 4276 | 4283 |
| 4277 bool FrameView::canThrottleRendering() const | 4284 bool FrameView::canThrottleRendering() const |
| 4278 { | 4285 { |
| 4279 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4286 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4280 return false; | 4287 return false; |
| 4281 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4288 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
| 4282 } | 4289 } |
| 4283 | 4290 |
| 4284 } // namespace blink | 4291 } // namespace blink |
| OLD | NEW |