OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 16 matching lines...) Expand all Loading... | |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 #include "web/ChromeClientImpl.h" | 33 #include "web/ChromeClientImpl.h" |
34 | 34 |
35 #include "bindings/core/v8/ScriptController.h" | 35 #include "bindings/core/v8/ScriptController.h" |
36 #include "core/HTMLNames.h" | 36 #include "core/HTMLNames.h" |
37 #include "core/animation/AnimationTimeline.h" | |
37 #include "core/dom/AXObjectCache.h" | 38 #include "core/dom/AXObjectCache.h" |
38 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
39 #include "core/dom/Fullscreen.h" | 40 #include "core/dom/Fullscreen.h" |
40 #include "core/dom/Node.h" | 41 #include "core/dom/Node.h" |
41 #include "core/frame/Console.h" | 42 #include "core/frame/Console.h" |
42 #include "core/frame/FrameHost.h" | 43 #include "core/frame/FrameHost.h" |
43 #include "core/frame/FrameView.h" | 44 #include "core/frame/FrameView.h" |
44 #include "core/frame/Settings.h" | 45 #include "core/frame/Settings.h" |
45 #include "core/html/HTMLInputElement.h" | 46 #include "core/html/HTMLInputElement.h" |
46 #include "core/html/forms/ColorChooser.h" | 47 #include "core/html/forms/ColorChooser.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 #include "web/WebPopupMenuImpl.h" | 101 #include "web/WebPopupMenuImpl.h" |
101 #include "web/WebSettingsImpl.h" | 102 #include "web/WebSettingsImpl.h" |
102 #include "web/WebViewImpl.h" | 103 #include "web/WebViewImpl.h" |
103 #include "wtf/text/CString.h" | 104 #include "wtf/text/CString.h" |
104 #include "wtf/text/StringBuilder.h" | 105 #include "wtf/text/StringBuilder.h" |
105 #include "wtf/text/StringConcatenate.h" | 106 #include "wtf/text/StringConcatenate.h" |
106 #include "wtf/unicode/CharacterNames.h" | 107 #include "wtf/unicode/CharacterNames.h" |
107 | 108 |
108 namespace blink { | 109 namespace blink { |
109 | 110 |
111 class WebCompositorAnimationTimeline; | |
112 | |
110 // Converts a AXObjectCache::AXNotification to a WebAXEvent | 113 // Converts a AXObjectCache::AXNotification to a WebAXEvent |
111 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) | 114 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
112 { | 115 { |
113 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 116 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
114 return static_cast<WebAXEvent>(notification); | 117 return static_cast<WebAXEvent>(notification); |
115 } | 118 } |
116 | 119 |
117 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou nd) | 120 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou nd) |
118 { | 121 { |
119 ASSERT(bound.layer); | 122 ASSERT(bound.layer); |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
684 return false; | 687 return false; |
685 } | 688 } |
686 | 689 |
687 GraphicsLayerFactory* ChromeClientImpl::graphicsLayerFactory() const | 690 GraphicsLayerFactory* ChromeClientImpl::graphicsLayerFactory() const |
688 { | 691 { |
689 return m_webView->graphicsLayerFactory(); | 692 return m_webView->graphicsLayerFactory(); |
690 } | 693 } |
691 | 694 |
692 void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFr ame* localRoot) | 695 void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFr ame* localRoot) |
693 { | 696 { |
697 WebCompositorAnimationTimeline* compositorTimeline = rootLayer && localRoot- >document() ? localRoot->document()->timeline().compositorTimeline() : nullptr; | |
698 | |
694 // FIXME: For top-level frames we still use the WebView as a WebWidget. This special | 699 // FIXME: For top-level frames we still use the WebView as a WebWidget. This special |
695 // case will be removed when top-level frames get WebFrameWidgets. | 700 // case will be removed when top-level frames get WebFrameWidgets. |
696 if (localRoot->isMainFrame()) { | 701 if (localRoot->isMainFrame()) { |
702 m_webView->setCompositorAnimationTimeline(compositorTimeline); | |
aelias_OOO_until_Jul13
2015/03/13 00:38:32
This looks out of place here, a better place might
loyso (OOO)
2015/03/13 01:07:01
Not sure how to do that.
1) CompositorTimeline obj
aelias_OOO_until_Jul13
2015/03/13 01:31:18
Sorry, I don't follow right now how these points r
loyso (OOO)
2015/03/13 03:37:42
I want compositor timeline to be attached/detached
aelias_OOO_until_Jul13
2015/03/17 18:12:27
OK, looking at that, the plumbing would be pretty
loyso (OOO)
2015/03/18 06:59:43
Ok. But I could put a note or TODO comment here.
| |
697 m_webView->setRootGraphicsLayer(rootLayer); | 703 m_webView->setRootGraphicsLayer(rootLayer); |
698 } else { | 704 } else { |
699 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); | 705 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); |
700 // FIXME: The following conditional is only needed for staging until the Chromium patch | 706 // FIXME: The following conditional is only needed for staging until the Chromium patch |
701 // lands that instantiates a WebFrameWidget. | 707 // lands that instantiates a WebFrameWidget. |
702 if (!webFrame->frameWidget()) { | 708 if (!webFrame->frameWidget()) { |
709 m_webView->setCompositorAnimationTimeline(compositorTimeline); | |
703 m_webView->setRootGraphicsLayer(rootLayer); | 710 m_webView->setRootGraphicsLayer(rootLayer); |
704 return; | 711 return; |
705 } | 712 } |
706 ASSERT(webFrame && webFrame->frameWidget()); | 713 ASSERT(webFrame && webFrame->frameWidget()); |
714 webFrame->frameWidget()->setCompositorAnimationTimeline(compositorTimeli ne); | |
707 webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); | 715 webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); |
708 } | 716 } |
709 } | 717 } |
710 | 718 |
711 void ChromeClientImpl::enterFullScreenForElement(Element* element) | 719 void ChromeClientImpl::enterFullScreenForElement(Element* element) |
712 { | 720 { |
713 m_webView->enterFullScreenForElement(element); | 721 m_webView->enterFullScreenForElement(element); |
714 } | 722 } |
715 | 723 |
716 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 724 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
884 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie w->pinchVirtualViewportEnabled()) | 892 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie w->pinchVirtualViewportEnabled()) |
885 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); | 893 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); |
886 } | 894 } |
887 | 895 |
888 void ChromeClientImpl::didUpdateTopControls() const | 896 void ChromeClientImpl::didUpdateTopControls() const |
889 { | 897 { |
890 m_webView->didUpdateTopControls(); | 898 m_webView->didUpdateTopControls(); |
891 } | 899 } |
892 | 900 |
893 } // namespace blink | 901 } // namespace blink |
OLD | NEW |