OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 } | 2508 } |
2509 | 2509 |
2510 void WebViewImpl::willCloseLayerTreeView() { | 2510 void WebViewImpl::willCloseLayerTreeView() { |
2511 if (m_linkHighlightsTimeline) { | 2511 if (m_linkHighlightsTimeline) { |
2512 m_linkHighlights.clear(); | 2512 m_linkHighlights.clear(); |
2513 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 2513 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
2514 m_linkHighlightsTimeline.reset(); | 2514 m_linkHighlightsTimeline.reset(); |
2515 } | 2515 } |
2516 | 2516 |
2517 if (m_layerTreeView) | 2517 if (m_layerTreeView) |
2518 page()->willCloseLayerTreeView(*m_layerTreeView); | 2518 page()->willCloseLayerTreeView(*m_layerTreeView, nullptr); |
2519 | 2519 |
2520 setRootLayer(nullptr); | 2520 setRootLayer(nullptr); |
2521 m_animationHost = nullptr; | 2521 m_animationHost = nullptr; |
2522 | 2522 |
2523 m_mutator = nullptr; | 2523 m_mutator = nullptr; |
2524 m_layerTreeView = nullptr; | 2524 m_layerTreeView = nullptr; |
2525 } | 2525 } |
2526 | 2526 |
2527 void WebViewImpl::didAcquirePointerLock() { | 2527 void WebViewImpl::didAcquirePointerLock() { |
2528 if (page()) | 2528 if (page()) |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3949 m_animationHost = WTF::makeUnique<CompositorAnimationHost>( | 3949 m_animationHost = WTF::makeUnique<CompositorAnimationHost>( |
3950 m_layerTreeView->compositorAnimationHost()); | 3950 m_layerTreeView->compositorAnimationHost()); |
3951 } | 3951 } |
3952 } | 3952 } |
3953 | 3953 |
3954 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) | 3954 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) |
3955 devTools->layerTreeViewChanged(m_layerTreeView); | 3955 devTools->layerTreeViewChanged(m_layerTreeView); |
3956 | 3956 |
3957 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 3957 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
3958 if (m_layerTreeView) | 3958 if (m_layerTreeView) |
3959 m_page->layerTreeViewInitialized(*m_layerTreeView); | 3959 m_page->layerTreeViewInitialized(*m_layerTreeView, nullptr); |
3960 | 3960 |
3961 // FIXME: only unittests, click to play, Android printing, and printing (for | 3961 // FIXME: only unittests, click to play, Android printing, and printing (for |
3962 // headers and footers) make this assert necessary. We should make them not | 3962 // headers and footers) make this assert necessary. We should make them not |
3963 // hit this code and then delete allowsBrokenNullLayerTreeView. | 3963 // hit this code and then delete allowsBrokenNullLayerTreeView. |
3964 DCHECK(m_layerTreeView || !m_client || | 3964 DCHECK(m_layerTreeView || !m_client || |
3965 m_client->widgetClient()->allowsBrokenNullLayerTreeView()); | 3965 m_client->widgetClient()->allowsBrokenNullLayerTreeView()); |
3966 | 3966 |
3967 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) { | 3967 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) { |
3968 m_linkHighlightsTimeline = CompositorAnimationTimeline::create(); | 3968 m_linkHighlightsTimeline = CompositorAnimationTimeline::create(); |
3969 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 3969 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
4192 return nullptr; | 4192 return nullptr; |
4193 return focusedFrame; | 4193 return focusedFrame; |
4194 } | 4194 } |
4195 | 4195 |
4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4198 } | 4198 } |
4199 | 4199 |
4200 } // namespace blink | 4200 } // namespace blink |
OLD | NEW |