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