| 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 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 return toLocalFrame(parentFrame)->view(); | 2793 return toLocalFrame(parentFrame)->view(); |
| 2794 | 2794 |
| 2795 return nullptr; | 2795 return nullptr; |
| 2796 } | 2796 } |
| 2797 | 2797 |
| 2798 void FrameView::didChangeGlobalRootScroller() { | 2798 void FrameView::didChangeGlobalRootScroller() { |
| 2799 if (!m_frame->settings() || !m_frame->settings()->getViewportEnabled()) | 2799 if (!m_frame->settings() || !m_frame->settings()->getViewportEnabled()) |
| 2800 return; | 2800 return; |
| 2801 | 2801 |
| 2802 // Avoid drawing two sets of scrollbars when visual viewport is enabled. | 2802 // Avoid drawing two sets of scrollbars when visual viewport is enabled. |
| 2803 visualViewportScrollbarsChanged(); |
| 2804 } |
| 2805 |
| 2806 // TODO(pdr): This logic is similar to adjustScrollbarExistence and the common |
| 2807 // logic should be factored into a helper. |
| 2808 void FrameView::visualViewportScrollbarsChanged() { |
| 2803 bool hasHorizontalScrollbar = horizontalScrollbar(); | 2809 bool hasHorizontalScrollbar = horizontalScrollbar(); |
| 2804 bool hasVerticalScrollbar = verticalScrollbar(); | 2810 bool hasVerticalScrollbar = verticalScrollbar(); |
| 2805 bool shouldHaveHorizontalScrollbar = false; | 2811 bool shouldHaveHorizontalScrollbar = false; |
| 2806 bool shouldHaveVerticalScrollbar = false; | 2812 bool shouldHaveVerticalScrollbar = false; |
| 2807 computeScrollbarExistence(shouldHaveHorizontalScrollbar, | 2813 computeScrollbarExistence(shouldHaveHorizontalScrollbar, |
| 2808 shouldHaveVerticalScrollbar, contentsSize()); | 2814 shouldHaveVerticalScrollbar, contentsSize()); |
| 2809 m_scrollbarManager.setHasHorizontalScrollbar(shouldHaveHorizontalScrollbar); | 2815 m_scrollbarManager.setHasHorizontalScrollbar(shouldHaveHorizontalScrollbar); |
| 2810 m_scrollbarManager.setHasVerticalScrollbar(shouldHaveVerticalScrollbar); | 2816 m_scrollbarManager.setHasVerticalScrollbar(shouldHaveVerticalScrollbar); |
| 2811 | 2817 |
| 2812 if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar || | 2818 if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar || |
| 2813 hasVerticalScrollbar != shouldHaveVerticalScrollbar) | 2819 hasVerticalScrollbar != shouldHaveVerticalScrollbar) { |
| 2814 scrollbarExistenceDidChange(); | 2820 scrollbarExistenceDidChange(); |
| 2821 |
| 2822 if (!visualViewportSuppliesScrollbars()) |
| 2823 updateScrollbarGeometry(); |
| 2824 } |
| 2815 } | 2825 } |
| 2816 | 2826 |
| 2817 void FrameView::updateWidgetGeometriesIfNeeded() { | 2827 void FrameView::updateWidgetGeometriesIfNeeded() { |
| 2818 if (!m_needsUpdateWidgetGeometries) | 2828 if (!m_needsUpdateWidgetGeometries) |
| 2819 return; | 2829 return; |
| 2820 | 2830 |
| 2821 m_needsUpdateWidgetGeometries = false; | 2831 m_needsUpdateWidgetGeometries = false; |
| 2822 | 2832 |
| 2823 updateWidgetGeometries(); | 2833 updateWidgetGeometries(); |
| 2824 } | 2834 } |
| (...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5159 std::unique_ptr<CompositorAnimationTimeline> timeline) { | 5169 std::unique_ptr<CompositorAnimationTimeline> timeline) { |
| 5160 m_animationTimeline = std::move(timeline); | 5170 m_animationTimeline = std::move(timeline); |
| 5161 } | 5171 } |
| 5162 | 5172 |
| 5163 void FrameView::setAnimationHost( | 5173 void FrameView::setAnimationHost( |
| 5164 std::unique_ptr<CompositorAnimationHost> host) { | 5174 std::unique_ptr<CompositorAnimationHost> host) { |
| 5165 m_animationHost = std::move(host); | 5175 m_animationHost = std::move(host); |
| 5166 } | 5176 } |
| 5167 | 5177 |
| 5168 } // namespace blink | 5178 } // namespace blink |
| OLD | NEW |