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

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

Issue 2735543002: Separate VisualViewport layer tree creation from attachment. (Closed)
Patch Set: Created 3 years, 9 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/core/loader/EmptyClients.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 3826 matching lines...) Expand 10 before | Expand all | Expand 10 after
3837 } 3837 }
3838 3838
3839 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* graphicsLayer) { 3839 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* graphicsLayer) {
3840 if (!m_layerTreeView) 3840 if (!m_layerTreeView)
3841 return; 3841 return;
3842 3842
3843 // In SPv2, setRootLayer is used instead. 3843 // In SPv2, setRootLayer is used instead.
3844 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 3844 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
3845 3845
3846 VisualViewport& visualViewport = page()->frameHost().visualViewport(); 3846 VisualViewport& visualViewport = page()->frameHost().visualViewport();
3847 visualViewport.attachToLayerTree(graphicsLayer); 3847 visualViewport.attachLayerTree(graphicsLayer);
3848 if (graphicsLayer) { 3848 if (graphicsLayer) {
3849 m_rootGraphicsLayer = visualViewport.rootGraphicsLayer(); 3849 m_rootGraphicsLayer = visualViewport.rootGraphicsLayer();
3850 m_visualViewportContainerLayer = visualViewport.containerLayer(); 3850 m_visualViewportContainerLayer = visualViewport.containerLayer();
3851 m_rootLayer = m_rootGraphicsLayer->platformLayer(); 3851 m_rootLayer = m_rootGraphicsLayer->platformLayer();
3852 updateDeviceEmulationTransform(); 3852 updateDeviceEmulationTransform();
3853 m_layerTreeView->setRootLayer(*m_rootLayer); 3853 m_layerTreeView->setRootLayer(*m_rootLayer);
3854 // We register viewport layers here since there may not be a layer 3854 // We register viewport layers here since there may not be a layer
3855 // tree view prior to this point. 3855 // tree view prior to this point.
3856 registerViewportLayersWithCompositor(); 3856 registerViewportLayersWithCompositor();
3857 3857
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4167 return nullptr; 4167 return nullptr;
4168 return focusedFrame; 4168 return focusedFrame;
4169 } 4169 }
4170 4170
4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4173 } 4173 }
4174 4174
4175 } // namespace blink 4175 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698