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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp

Issue 1749383002: Eliminate uncalled will___LiveResize and inLiveResize from RenderViewImpl through WebWidget down to… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return kMinFractionToStepWhenPaging; 73 return kMinFractionToStepWhenPaging;
74 } 74 }
75 75
76 int ScrollableArea::maxOverlapBetweenPages() 76 int ScrollableArea::maxOverlapBetweenPages()
77 { 77 {
78 static int maxOverlapBetweenPages = ScrollbarTheme::theme().maxOverlapBetwee nPages(); 78 static int maxOverlapBetweenPages = ScrollbarTheme::theme().maxOverlapBetwee nPages();
79 return maxOverlapBetweenPages; 79 return maxOverlapBetweenPages;
80 } 80 }
81 81
82 ScrollableArea::ScrollableArea() 82 ScrollableArea::ScrollableArea()
83 : m_inLiveResize(false) 83 : m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault)
84 , m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault)
85 , m_scrollOriginChanged(false) 84 , m_scrollOriginChanged(false)
86 , m_horizontalScrollbarNeedsPaintInvalidation(false) 85 , m_horizontalScrollbarNeedsPaintInvalidation(false)
87 , m_verticalScrollbarNeedsPaintInvalidation(false) 86 , m_verticalScrollbarNeedsPaintInvalidation(false)
88 , m_scrollCornerNeedsPaintInvalidation(false) 87 , m_scrollCornerNeedsPaintInvalidation(false)
89 { 88 {
90 } 89 }
91 90
92 ScrollableArea::~ScrollableArea() 91 ScrollableArea::~ScrollableArea()
93 { 92 {
94 } 93 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 301
303 return true; 302 return true;
304 } 303 }
305 304
306 // NOTE: Only called from Internals for testing. 305 // NOTE: Only called from Internals for testing.
307 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset) 306 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
308 { 307 {
309 scrollPositionChanged(DoublePoint(offset), ProgrammaticScroll); 308 scrollPositionChanged(DoublePoint(offset), ProgrammaticScroll);
310 } 309 }
311 310
312 void ScrollableArea::willStartLiveResize()
313 {
314 if (m_inLiveResize)
315 return;
316 m_inLiveResize = true;
317 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
318 scrollAnimator->willStartLiveResize();
319 }
320
321 void ScrollableArea::willEndLiveResize()
322 {
323 if (!m_inLiveResize)
324 return;
325 m_inLiveResize = false;
326 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
327 scrollAnimator->willEndLiveResize();
328 }
329
330 void ScrollableArea::contentAreaWillPaint() const 311 void ScrollableArea::contentAreaWillPaint() const
331 { 312 {
332 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 313 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
333 scrollAnimator->contentAreaWillPaint(); 314 scrollAnimator->contentAreaWillPaint();
334 } 315 }
335 316
336 void ScrollableArea::mouseEnteredContentArea() const 317 void ScrollableArea::mouseEnteredContentArea() const
337 { 318 {
338 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 319 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
339 scrollAnimator->mouseEnteredContentArea(); 320 scrollAnimator->mouseEnteredContentArea();
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 std::max(0, size.height() - horizontalScrollbarHeight)); 612 std::max(0, size.height() - horizontalScrollbarHeight));
632 } 613 }
633 614
634 DEFINE_TRACE(ScrollableArea) 615 DEFINE_TRACE(ScrollableArea)
635 { 616 {
636 visitor->trace(m_scrollAnimator); 617 visitor->trace(m_scrollAnimator);
637 visitor->trace(m_programmaticScrollAnimator); 618 visitor->trace(m_programmaticScrollAnimator);
638 } 619 }
639 620
640 } // namespace blink 621 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698