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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2834393003: Re-enable ScrollbarAnimationController::DidRequestShowFromMainThread. (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 } 537 }
538 538
539 // TODO(szager): Handle fractional scroll offsets correctly. 539 // TODO(szager): Handle fractional scroll offsets correctly.
540 return IntRect( 540 return IntRect(
541 FlooredIntPoint(ScrollPosition()), 541 FlooredIntPoint(ScrollPosition()),
542 IntSize(max(0, Layer()->size().Width() - vertical_scrollbar_width), 542 IntSize(max(0, Layer()->size().Width() - vertical_scrollbar_width),
543 max(0, Layer()->size().Height() - horizontal_scrollbar_height))); 543 max(0, Layer()->size().Height() - horizontal_scrollbar_height)));
544 } 544 }
545 545
546 void PaintLayerScrollableArea::VisibleSizeChanged() { 546 void PaintLayerScrollableArea::VisibleSizeChanged() {
547 // TODO(skobes): For reasons not fully understood, showing scrollbars from
548 // main on viewport size changes regresses memory and perf tests on Android
549 // (crbug.com/706927, crbug.com/712453).
550 #if !OS(ANDROID)
547 ShowOverlayScrollbars(); 551 ShowOverlayScrollbars();
552 #endif
548 } 553 }
549 554
550 int PaintLayerScrollableArea::VisibleHeight() const { 555 int PaintLayerScrollableArea::VisibleHeight() const {
551 return Layer()->size().Height(); 556 return Layer()->size().Height();
552 } 557 }
553 558
554 int PaintLayerScrollableArea::VisibleWidth() const { 559 int PaintLayerScrollableArea::VisibleWidth() const {
555 return Layer()->size().Width(); 560 return Layer()->size().Width();
556 } 561 }
557 562
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 2128
2124 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2129 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2125 ClampScrollableAreas() { 2130 ClampScrollableAreas() {
2126 for (auto& scrollable_area : *needs_clamp_) 2131 for (auto& scrollable_area : *needs_clamp_)
2127 scrollable_area->ClampScrollOffsetAfterOverflowChange(); 2132 scrollable_area->ClampScrollOffsetAfterOverflowChange();
2128 delete needs_clamp_; 2133 delete needs_clamp_;
2129 needs_clamp_ = nullptr; 2134 needs_clamp_ = nullptr;
2130 } 2135 }
2131 2136
2132 } // namespace blink 2137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698