Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2631853002: Give OOPIF FrameViews their own scroll animation timelines and hosts (Closed)
Patch Set: Fixes from bokan comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698