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

Side by Side Diff: sky/engine/platform/scroll/ScrollableArea.cpp

Issue 770223002: Remove lots of code from the WebWidget/WebView/WebFrame layer. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 int ScrollableArea::maxOverlapBetweenPages() 68 int ScrollableArea::maxOverlapBetweenPages()
69 { 69 {
70 static int maxOverlapBetweenPages = std::numeric_limits<int>::max(); 70 static int maxOverlapBetweenPages = std::numeric_limits<int>::max();
71 return maxOverlapBetweenPages; 71 return maxOverlapBetweenPages;
72 } 72 }
73 73
74 ScrollableArea::ScrollableArea() 74 ScrollableArea::ScrollableArea()
75 : m_constrainsScrollingToContentEdge(true) 75 : m_constrainsScrollingToContentEdge(true)
76 , m_inLiveResize(false)
77 , m_verticalScrollElasticity(ScrollElasticityNone) 76 , m_verticalScrollElasticity(ScrollElasticityNone)
78 , m_horizontalScrollElasticity(ScrollElasticityNone) 77 , m_horizontalScrollElasticity(ScrollElasticityNone)
79 , m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault) 78 , m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault)
80 , m_scrollOriginChanged(false) 79 , m_scrollOriginChanged(false)
81 { 80 {
82 } 81 }
83 82
84 ScrollableArea::~ScrollableArea() 83 ScrollableArea::~ScrollableArea()
85 { 84 {
86 } 85 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset) 219 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
221 { 220 {
222 setScrollOffsetFromAnimation(offset); 221 setScrollOffsetFromAnimation(offset);
223 } 222 }
224 223
225 void ScrollableArea::setScrollOffsetFromAnimation(const IntPoint& offset) 224 void ScrollableArea::setScrollOffsetFromAnimation(const IntPoint& offset)
226 { 225 {
227 scrollPositionChanged(offset); 226 scrollPositionChanged(offset);
228 } 227 }
229 228
230 void ScrollableArea::willStartLiveResize()
231 {
232 if (m_inLiveResize)
233 return;
234 m_inLiveResize = true;
235 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
236 scrollAnimator->willStartLiveResize();
237 }
238
239 void ScrollableArea::willEndLiveResize()
240 {
241 if (!m_inLiveResize)
242 return;
243 m_inLiveResize = false;
244 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
245 scrollAnimator->willEndLiveResize();
246 }
247
248 void ScrollableArea::mouseEnteredContentArea() const 229 void ScrollableArea::mouseEnteredContentArea() const
249 { 230 {
250 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 231 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
251 scrollAnimator->mouseEnteredContentArea(); 232 scrollAnimator->mouseEnteredContentArea();
252 } 233 }
253 234
254 void ScrollableArea::mouseExitedContentArea() const 235 void ScrollableArea::mouseExitedContentArea() const
255 { 236 {
256 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 237 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
257 scrollAnimator->mouseEnteredContentArea(); 238 scrollAnimator->mouseEnteredContentArea();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 { 355 {
375 return scrollSize(orientation); 356 return scrollSize(orientation);
376 } 357 }
377 358
378 float ScrollableArea::pixelStep(ScrollbarOrientation) const 359 float ScrollableArea::pixelStep(ScrollbarOrientation) const
379 { 360 {
380 return 1; 361 return 1;
381 } 362 }
382 363
383 } // namespace blink 364 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698