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

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

Issue 343663003: Revert "Enable Scroll Animation for RenderLayerScrollableArea" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix compile error in PageAnimator Created 6 years, 6 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"
53 #include "core/html/HTMLFrameOwnerElement.h" 52 #include "core/html/HTMLFrameOwnerElement.h"
54 #include "core/inspector/InspectorInstrumentation.h" 53 #include "core/inspector/InspectorInstrumentation.h"
55 #include "core/inspector/InspectorTraceEvents.h" 54 #include "core/inspector/InspectorTraceEvents.h"
56 #include "core/page/EventHandler.h" 55 #include "core/page/EventHandler.h"
57 #include "core/page/FocusController.h" 56 #include "core/page/FocusController.h"
58 #include "core/page/Page.h" 57 #include "core/page/Page.h"
59 #include "core/page/scrolling/ScrollingCoordinator.h" 58 #include "core/page/scrolling/ScrollingCoordinator.h"
60 #include "core/rendering/RenderGeometryMap.h" 59 #include "core/rendering/RenderGeometryMap.h"
61 #include "core/rendering/RenderScrollbar.h" 60 #include "core/rendering/RenderScrollbar.h"
62 #include "core/rendering/RenderScrollbarPart.h" 61 #include "core/rendering/RenderScrollbarPart.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 IntSize RenderLayerScrollableArea::overhangAmount() const 471 IntSize RenderLayerScrollableArea::overhangAmount() const
473 { 472 {
474 return IntSize(); 473 return IntSize();
475 } 474 }
476 475
477 IntPoint RenderLayerScrollableArea::lastKnownMousePosition() const 476 IntPoint RenderLayerScrollableArea::lastKnownMousePosition() const
478 { 477 {
479 return box().frame() ? box().frame()->eventHandler().lastKnownMousePosition( ) : IntPoint(); 478 return box().frame() ? box().frame()->eventHandler().lastKnownMousePosition( ) : IntPoint();
480 } 479 }
481 480
482 bool RenderLayerScrollableArea::scrollAnimatorEnabled() const
483 {
484 return box().frame()->settings() && box().frame()->settings()->scrollAnimato rEnabled();
485 }
486
487 bool RenderLayerScrollableArea::scheduleAnimation()
488 {
489 if (HostWindow* window = box().frameView()->hostWindow()) {
490 window->scheduleAnimation();
491 return true;
492 }
493 return false;
494 }
495
496 bool RenderLayerScrollableArea::shouldSuspendScrollAnimations() const 481 bool RenderLayerScrollableArea::shouldSuspendScrollAnimations() const
497 { 482 {
498 RenderView* view = box().view(); 483 RenderView* view = box().view();
499 if (!view) 484 if (!view)
500 return true; 485 return true;
501 return view->frameView()->shouldSuspendScrollAnimations(); 486 return view->frameView()->shouldSuspendScrollAnimations();
502 } 487 }
503 488
504 bool RenderLayerScrollableArea::scrollbarsCanBeActive() const 489 bool RenderLayerScrollableArea::scrollbarsCanBeActive() const
505 { 490 {
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 DisableCompositingQueryAsserts disabler; 1451 DisableCompositingQueryAsserts disabler;
1467 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()-> scrollingLayer(); 1452 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()-> scrollingLayer();
1468 } 1453 }
1469 1454
1470 bool RenderLayerScrollableArea::needsCompositedScrolling() const 1455 bool RenderLayerScrollableArea::needsCompositedScrolling() const
1471 { 1456 {
1472 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi ngForOverflowScrollEnabled(); 1457 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi ngForOverflowScrollEnabled();
1473 } 1458 }
1474 1459
1475 } // Namespace WebCore 1460 } // 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