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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 LayoutViewItem FrameView::layoutViewItem() const { | 559 LayoutViewItem FrameView::layoutViewItem() const { |
560 return LayoutViewItem(frame().contentLayoutObject()); | 560 return LayoutViewItem(frame().contentLayoutObject()); |
561 } | 561 } |
562 | 562 |
563 ScrollingCoordinator* FrameView::scrollingCoordinator() const { | 563 ScrollingCoordinator* FrameView::scrollingCoordinator() const { |
564 Page* p = page(); | 564 Page* p = page(); |
565 return p ? p->scrollingCoordinator() : 0; | 565 return p ? p->scrollingCoordinator() : 0; |
566 } | 566 } |
567 | 567 |
568 CompositorAnimationHost* FrameView::compositorAnimationHost() const { | 568 CompositorAnimationHost* FrameView::compositorAnimationHost() const { |
| 569 // When m_animationHost is not nullptr, this is the FrameView for an OOPIF. |
| 570 if (m_animationHost) |
| 571 return m_animationHost.get(); |
| 572 |
| 573 if (m_frame->localFrameRoot() != m_frame) |
| 574 return m_frame->localFrameRoot()->view()->compositorAnimationHost(); |
| 575 |
| 576 if (!m_frame->isMainFrame()) |
| 577 return nullptr; |
| 578 |
569 ScrollingCoordinator* c = scrollingCoordinator(); | 579 ScrollingCoordinator* c = scrollingCoordinator(); |
570 return c ? c->compositorAnimationHost() : nullptr; | 580 return c ? c->compositorAnimationHost() : nullptr; |
571 } | 581 } |
572 | 582 |
573 CompositorAnimationTimeline* FrameView::compositorAnimationTimeline() const { | 583 CompositorAnimationTimeline* FrameView::compositorAnimationTimeline() const { |
| 584 if (m_animationTimeline) |
| 585 return m_animationTimeline.get(); |
| 586 |
| 587 if (m_frame->localFrameRoot() != m_frame) |
| 588 return m_frame->localFrameRoot()->view()->compositorAnimationTimeline(); |
| 589 |
| 590 if (!m_frame->isMainFrame()) |
| 591 return nullptr; |
| 592 |
574 ScrollingCoordinator* c = scrollingCoordinator(); | 593 ScrollingCoordinator* c = scrollingCoordinator(); |
575 return c ? c->compositorAnimationTimeline() : nullptr; | 594 return c ? c->compositorAnimationTimeline() : nullptr; |
576 } | 595 } |
577 | 596 |
578 LayoutBox* FrameView::layoutBox() const { | 597 LayoutBox* FrameView::layoutBox() const { |
579 return layoutView(); | 598 return layoutView(); |
580 } | 599 } |
581 | 600 |
582 FloatQuad FrameView::localToVisibleContentQuad( | 601 FloatQuad FrameView::localToVisibleContentQuad( |
583 const FloatQuad& quad, | 602 const FloatQuad& quad, |
(...skipping 4408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4992 void FrameView::applyTransformForTopFrameSpace(TransformState& transformState) { | 5011 void FrameView::applyTransformForTopFrameSpace(TransformState& transformState) { |
4993 // This is the top-level frame, so no mapping necessary. | 5012 // This is the top-level frame, so no mapping necessary. |
4994 if (m_frame->isMainFrame()) | 5013 if (m_frame->isMainFrame()) |
4995 return; | 5014 return; |
4996 | 5015 |
4997 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); | 5016 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); |
4998 transformState.move( | 5017 transformState.move( |
4999 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); | 5018 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); |
5000 } | 5019 } |
5001 | 5020 |
| 5021 void FrameView::setAnimationTimeline( |
| 5022 std::unique_ptr<CompositorAnimationTimeline> timeline) { |
| 5023 m_animationTimeline = std::move(timeline); |
| 5024 } |
| 5025 |
| 5026 void FrameView::setAnimationHost( |
| 5027 std::unique_ptr<CompositorAnimationHost> host) { |
| 5028 m_animationHost = std::move(host); |
| 5029 } |
| 5030 |
5002 } // namespace blink | 5031 } // namespace blink |
OLD | NEW |