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

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: 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 284
286 return true; 285 return true;
287 } 286 }
288 287
289 // NOTE: Only called from Internals for testing. 288 // NOTE: Only called from Internals for testing.
290 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset) 289 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
291 { 290 {
292 scrollPositionChanged(DoublePoint(offset), ProgrammaticScroll); 291 scrollPositionChanged(DoublePoint(offset), ProgrammaticScroll);
293 } 292 }
294 293
295 void ScrollableArea::willStartLiveResize()
296 {
297 if (m_inLiveResize)
298 return;
299 m_inLiveResize = true;
300 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
301 scrollAnimator->willStartLiveResize();
302 }
303
304 void ScrollableArea::willEndLiveResize()
305 {
306 if (!m_inLiveResize)
307 return;
308 m_inLiveResize = false;
309 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
310 scrollAnimator->willEndLiveResize();
311 }
312
313 void ScrollableArea::contentAreaWillPaint() const 294 void ScrollableArea::contentAreaWillPaint() const
314 { 295 {
315 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 296 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
316 scrollAnimator->contentAreaWillPaint(); 297 scrollAnimator->contentAreaWillPaint();
317 } 298 }
318 299
319 void ScrollableArea::mouseEnteredContentArea() const 300 void ScrollableArea::mouseEnteredContentArea() const
320 { 301 {
321 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 302 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
322 scrollAnimator->mouseEnteredContentArea(); 303 scrollAnimator->mouseEnteredContentArea();
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 std::max(0, size.height() - horizontalScrollbarHeight)); 598 std::max(0, size.height() - horizontalScrollbarHeight));
618 } 599 }
619 600
620 DEFINE_TRACE(ScrollableArea) 601 DEFINE_TRACE(ScrollableArea)
621 { 602 {
622 visitor->trace(m_scrollAnimator); 603 visitor->trace(m_scrollAnimator);
623 visitor->trace(m_programmaticScrollAnimator); 604 visitor->trace(m_programmaticScrollAnimator);
624 } 605 }
625 606
626 } // namespace blink 607 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698