OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 LayoutViewItem FrameView::layoutViewItem() const { | 562 LayoutViewItem FrameView::layoutViewItem() const { |
563 return LayoutViewItem(frame().contentLayoutObject()); | 563 return LayoutViewItem(frame().contentLayoutObject()); |
564 } | 564 } |
565 | 565 |
566 ScrollingCoordinator* FrameView::scrollingCoordinator() const { | 566 ScrollingCoordinator* FrameView::scrollingCoordinator() const { |
567 Page* p = page(); | 567 Page* p = page(); |
568 return p ? p->scrollingCoordinator() : 0; | 568 return p ? p->scrollingCoordinator() : 0; |
569 } | 569 } |
570 | 570 |
571 CompositorAnimationHost* FrameView::compositorAnimationHost() const { | 571 CompositorAnimationHost* FrameView::compositorAnimationHost() const { |
| 572 // When m_animationHost is not nullptr, this is the FrameView for an OOPIF. |
| 573 if (m_animationHost) |
| 574 return m_animationHost.get(); |
| 575 |
| 576 if (m_frame->localFrameRoot() != m_frame) |
| 577 return m_frame->localFrameRoot()->view()->compositorAnimationHost(); |
| 578 |
| 579 if (!m_frame->isMainFrame()) |
| 580 return nullptr; |
| 581 |
572 ScrollingCoordinator* c = scrollingCoordinator(); | 582 ScrollingCoordinator* c = scrollingCoordinator(); |
573 return c ? c->compositorAnimationHost() : nullptr; | 583 return c ? c->compositorAnimationHost() : nullptr; |
574 } | 584 } |
575 | 585 |
576 CompositorAnimationTimeline* FrameView::compositorAnimationTimeline() const { | 586 CompositorAnimationTimeline* FrameView::compositorAnimationTimeline() const { |
| 587 if (m_animationTimeline) |
| 588 return m_animationTimeline.get(); |
| 589 |
| 590 if (m_frame->localFrameRoot() != m_frame) |
| 591 return m_frame->localFrameRoot()->view()->compositorAnimationTimeline(); |
| 592 |
| 593 if (!m_frame->isMainFrame()) |
| 594 return nullptr; |
| 595 |
577 ScrollingCoordinator* c = scrollingCoordinator(); | 596 ScrollingCoordinator* c = scrollingCoordinator(); |
578 return c ? c->compositorAnimationTimeline() : nullptr; | 597 return c ? c->compositorAnimationTimeline() : nullptr; |
579 } | 598 } |
580 | 599 |
581 LayoutBox* FrameView::layoutBox() const { | 600 LayoutBox* FrameView::layoutBox() const { |
582 return layoutView(); | 601 return layoutView(); |
583 } | 602 } |
584 | 603 |
585 FloatQuad FrameView::localToVisibleContentQuad( | 604 FloatQuad FrameView::localToVisibleContentQuad( |
586 const FloatQuad& quad, | 605 const FloatQuad& quad, |
(...skipping 4398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4985 void FrameView::applyTransformForTopFrameSpace(TransformState& transformState) { | 5004 void FrameView::applyTransformForTopFrameSpace(TransformState& transformState) { |
4986 // This is the top-level frame, so no mapping necessary. | 5005 // This is the top-level frame, so no mapping necessary. |
4987 if (m_frame->isMainFrame()) | 5006 if (m_frame->isMainFrame()) |
4988 return; | 5007 return; |
4989 | 5008 |
4990 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); | 5009 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); |
4991 transformState.move( | 5010 transformState.move( |
4992 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); | 5011 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); |
4993 } | 5012 } |
4994 | 5013 |
| 5014 void FrameView::setAnimationTimeline( |
| 5015 std::unique_ptr<CompositorAnimationTimeline> timeline) { |
| 5016 m_animationTimeline = std::move(timeline); |
| 5017 } |
| 5018 |
| 5019 void FrameView::setAnimationHost( |
| 5020 std::unique_ptr<CompositorAnimationHost> host) { |
| 5021 m_animationHost = std::move(host); |
| 5022 } |
| 5023 |
4995 } // namespace blink | 5024 } // namespace blink |
OLD | NEW |