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 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 } | 1907 } |
1908 | 1908 |
1909 bool FrameView::shouldRubberBandInDirection(ScrollDirection direction) const | 1909 bool FrameView::shouldRubberBandInDirection(ScrollDirection direction) const |
1910 { | 1910 { |
1911 Page* page = frame() ? frame()->page() : 0; | 1911 Page* page = frame() ? frame()->page() : 0; |
1912 if (!page) | 1912 if (!page) |
1913 return ScrollView::shouldRubberBandInDirection(direction); | 1913 return ScrollView::shouldRubberBandInDirection(direction); |
1914 return page->chrome()->client()->shouldRubberBandInDirection(direction); | 1914 return page->chrome()->client()->shouldRubberBandInDirection(direction); |
1915 } | 1915 } |
1916 | 1916 |
1917 bool FrameView::isRubberBandInProgress() const | |
1918 { | |
1919 if (scrollbarsSuppressed()) | |
1920 return false; | |
1921 | |
1922 // If the scrolling thread updates the scroll position for this FrameView, t
hen we should return | |
1923 // ScrollingCoordinator::isRubberBandInProgress(). | |
1924 if (Page* page = m_frame->page()) { | |
1925 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) { | |
1926 if (!scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThre
ad()) | |
1927 return scrollingCoordinator->isRubberBandInProgress(); | |
1928 } | |
1929 } | |
1930 | |
1931 // If the main thread updates the scroll position for this FrameView, we sho
uld return | |
1932 // ScrollAnimator::isRubberBandInProgress(). | |
1933 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) | |
1934 return scrollAnimator->isRubberBandInProgress(); | |
1935 | |
1936 return false; | |
1937 } | |
1938 | |
1939 bool FrameView::requestScrollPositionUpdate(const IntPoint& position) | 1917 bool FrameView::requestScrollPositionUpdate(const IntPoint& position) |
1940 { | 1918 { |
1941 #if ENABLE(THREADED_SCROLLING) | 1919 #if ENABLE(THREADED_SCROLLING) |
1942 if (TiledBacking* tiledBacking = this->tiledBacking()) { | 1920 if (TiledBacking* tiledBacking = this->tiledBacking()) { |
1943 IntRect visibleRect = visibleContentRect(); | 1921 IntRect visibleRect = visibleContentRect(); |
1944 visibleRect.setLocation(position); | 1922 visibleRect.setLocation(position); |
1945 tiledBacking->prepopulateRect(visibleRect); | 1923 tiledBacking->prepopulateRect(visibleRect); |
1946 } | 1924 } |
1947 | 1925 |
1948 if (Page* page = m_frame->page()) { | 1926 if (Page* page = m_frame->page()) { |
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3899 { | 3877 { |
3900 #if USE(ACCELERATED_COMPOSITING) | 3878 #if USE(ACCELERATED_COMPOSITING) |
3901 if (TiledBacking* tiledBacking = this->tiledBacking()) | 3879 if (TiledBacking* tiledBacking = this->tiledBacking()) |
3902 tiledBacking->setScrollingPerformanceLoggingEnabled(flag); | 3880 tiledBacking->setScrollingPerformanceLoggingEnabled(flag); |
3903 #else | 3881 #else |
3904 UNUSED_PARAM(flag); | 3882 UNUSED_PARAM(flag); |
3905 #endif | 3883 #endif |
3906 } | 3884 } |
3907 | 3885 |
3908 } // namespace WebCore | 3886 } // namespace WebCore |
OLD | NEW |