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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 214953004: Enable Scroll Animation for RenderLayerScrollableArea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test expectation for Mac failure Created 6 years, 8 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 | « Source/core/rendering/RenderLayerScrollableArea.h ('k') | no next file » | 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 */ 42 */
43 43
44 #include "config.h" 44 #include "config.h"
45 #include "core/rendering/RenderLayer.h" 45 #include "core/rendering/RenderLayer.h"
46 46
47 #include "core/css/PseudoStyleRequest.h" 47 #include "core/css/PseudoStyleRequest.h"
48 #include "core/dom/shadow/ShadowRoot.h" 48 #include "core/dom/shadow/ShadowRoot.h"
49 #include "core/editing/FrameSelection.h" 49 #include "core/editing/FrameSelection.h"
50 #include "core/frame/FrameView.h" 50 #include "core/frame/FrameView.h"
51 #include "core/frame/LocalFrame.h" 51 #include "core/frame/LocalFrame.h"
52 #include "core/frame/Settings.h"
52 #include "core/html/HTMLFrameOwnerElement.h" 53 #include "core/html/HTMLFrameOwnerElement.h"
53 #include "core/inspector/InspectorInstrumentation.h" 54 #include "core/inspector/InspectorInstrumentation.h"
54 #include "core/page/EventHandler.h" 55 #include "core/page/EventHandler.h"
55 #include "core/page/FocusController.h" 56 #include "core/page/FocusController.h"
56 #include "core/page/Page.h" 57 #include "core/page/Page.h"
57 #include "core/page/scrolling/ScrollingCoordinator.h" 58 #include "core/page/scrolling/ScrollingCoordinator.h"
58 #include "core/rendering/RenderGeometryMap.h" 59 #include "core/rendering/RenderGeometryMap.h"
59 #include "core/rendering/RenderScrollbar.h" 60 #include "core/rendering/RenderScrollbar.h"
60 #include "core/rendering/RenderScrollbarPart.h" 61 #include "core/rendering/RenderScrollbarPart.h"
61 #include "core/rendering/RenderView.h" 62 #include "core/rendering/RenderView.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 IntSize RenderLayerScrollableArea::overhangAmount() const 470 IntSize RenderLayerScrollableArea::overhangAmount() const
470 { 471 {
471 return IntSize(); 472 return IntSize();
472 } 473 }
473 474
474 IntPoint RenderLayerScrollableArea::lastKnownMousePosition() const 475 IntPoint RenderLayerScrollableArea::lastKnownMousePosition() const
475 { 476 {
476 return m_box->frame() ? m_box->frame()->eventHandler().lastKnownMousePositio n() : IntPoint(); 477 return m_box->frame() ? m_box->frame()->eventHandler().lastKnownMousePositio n() : IntPoint();
477 } 478 }
478 479
480 bool RenderLayerScrollableArea::scrollAnimatorEnabled() const
481 {
482 return m_box->frame()->settings() && m_box->frame()->settings()->scrollAnima torEnabled();
483 }
484
485 bool RenderLayerScrollableArea::scheduleAnimation()
486 {
487 if (HostWindow* window = m_box->frameView()->hostWindow()) {
488 window->scheduleAnimation();
489 return true;
490 }
491 return false;
492 }
493
479 bool RenderLayerScrollableArea::shouldSuspendScrollAnimations() const 494 bool RenderLayerScrollableArea::shouldSuspendScrollAnimations() const
480 { 495 {
481 RenderView* view = m_box->view(); 496 RenderView* view = m_box->view();
482 if (!view) 497 if (!view)
483 return true; 498 return true;
484 return view->frameView()->shouldSuspendScrollAnimations(); 499 return view->frameView()->shouldSuspendScrollAnimations();
485 } 500 }
486 501
487 bool RenderLayerScrollableArea::scrollbarsCanBeActive() const 502 bool RenderLayerScrollableArea::scrollbarsCanBeActive() const
488 { 503 {
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) 1520 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode)
1506 { 1521 {
1507 if (m_forceNeedsCompositedScrolling == mode) 1522 if (m_forceNeedsCompositedScrolling == mode)
1508 return; 1523 return;
1509 1524
1510 m_forceNeedsCompositedScrolling = mode; 1525 m_forceNeedsCompositedScrolling = mode;
1511 layer()->didUpdateNeedsCompositedScrolling(); 1526 layer()->didUpdateNeedsCompositedScrolling();
1512 } 1527 }
1513 1528
1514 } // Namespace WebCore 1529 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698