OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |