Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2838513003: ScrollAnimatorMac should post contentAreaScrolled only for explicit scrolls. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 void FrameView::DidUpdateElasticOverscroll() { 1969 void FrameView::DidUpdateElasticOverscroll() {
1970 Page* page = GetFrame().GetPage(); 1970 Page* page = GetFrame().GetPage();
1971 if (!page) 1971 if (!page)
1972 return; 1972 return;
1973 FloatSize elastic_overscroll = page->GetChromeClient().ElasticOverscroll(); 1973 FloatSize elastic_overscroll = page->GetChromeClient().ElasticOverscroll();
1974 if (HorizontalScrollbar()) { 1974 if (HorizontalScrollbar()) {
1975 float delta = 1975 float delta =
1976 elastic_overscroll.Width() - HorizontalScrollbar()->ElasticOverscroll(); 1976 elastic_overscroll.Width() - HorizontalScrollbar()->ElasticOverscroll();
1977 if (delta != 0) { 1977 if (delta != 0) {
1978 HorizontalScrollbar()->SetElasticOverscroll(elastic_overscroll.Width()); 1978 HorizontalScrollbar()->SetElasticOverscroll(elastic_overscroll.Width());
1979 GetScrollAnimator().NotifyContentAreaScrolled(FloatSize(delta, 0)); 1979 GetScrollAnimator().NotifyContentAreaScrolled(FloatSize(delta, 0),
1980 kCompositorScroll);
1980 SetScrollbarNeedsPaintInvalidation(kHorizontalScrollbar); 1981 SetScrollbarNeedsPaintInvalidation(kHorizontalScrollbar);
1981 } 1982 }
1982 } 1983 }
1983 if (VerticalScrollbar()) { 1984 if (VerticalScrollbar()) {
1984 float delta = 1985 float delta =
1985 elastic_overscroll.Height() - VerticalScrollbar()->ElasticOverscroll(); 1986 elastic_overscroll.Height() - VerticalScrollbar()->ElasticOverscroll();
1986 if (delta != 0) { 1987 if (delta != 0) {
1987 VerticalScrollbar()->SetElasticOverscroll(elastic_overscroll.Height()); 1988 VerticalScrollbar()->SetElasticOverscroll(elastic_overscroll.Height());
1988 GetScrollAnimator().NotifyContentAreaScrolled(FloatSize(0, delta)); 1989 GetScrollAnimator().NotifyContentAreaScrolled(FloatSize(0, delta),
1990 kCompositorScroll);
1989 SetScrollbarNeedsPaintInvalidation(kVerticalScrollbar); 1991 SetScrollbarNeedsPaintInvalidation(kVerticalScrollbar);
1990 } 1992 }
1991 } 1993 }
1992 } 1994 }
1993 1995
1994 IntSize FrameView::GetLayoutSize( 1996 IntSize FrameView::GetLayoutSize(
1995 IncludeScrollbarsInRect scrollbar_inclusion) const { 1997 IncludeScrollbarsInRect scrollbar_inclusion) const {
1996 return scrollbar_inclusion == kExcludeScrollbars 1998 return scrollbar_inclusion == kExcludeScrollbars
1997 ? ExcludeScrollbars(layout_size_) 1999 ? ExcludeScrollbars(layout_size_)
1998 : layout_size_; 2000 : layout_size_;
(...skipping 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after
5374 void FrameView::SetAnimationHost( 5376 void FrameView::SetAnimationHost(
5375 std::unique_ptr<CompositorAnimationHost> host) { 5377 std::unique_ptr<CompositorAnimationHost> host) {
5376 animation_host_ = std::move(host); 5378 animation_host_ = std::move(host);
5377 } 5379 }
5378 5380
5379 LayoutUnit FrameView::CaretWidth() const { 5381 LayoutUnit FrameView::CaretWidth() const {
5380 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); 5382 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1));
5381 } 5383 }
5382 5384
5383 } // namespace blink 5385 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698