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

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

Issue 2631853002: Give OOPIF FrameViews their own scroll animation timelines and hosts (Closed)
Patch Set: Attempt to fix tests 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 NOTIMPLEMENTED(); 644 NOTIMPLEMENTED();
645 break; 645 break;
646 } 646 }
647 } 647 }
648 648
649 bool WebFrameWidgetImpl::isAcceleratedCompositingActive() const { 649 bool WebFrameWidgetImpl::isAcceleratedCompositingActive() const {
650 return m_isAcceleratedCompositingActive; 650 return m_isAcceleratedCompositingActive;
651 } 651 }
652 652
653 void WebFrameWidgetImpl::willCloseLayerTreeView() { 653 void WebFrameWidgetImpl::willCloseLayerTreeView() {
654 if (m_layerTreeView) 654 if (m_layerTreeView) {
655 page()->willCloseLayerTreeView(*m_layerTreeView); 655 page()->willCloseLayerTreeView(*m_layerTreeView,
656 m_localRoot->frame()->view());
657 }
656 658
657 setIsAcceleratedCompositingActive(false); 659 setIsAcceleratedCompositingActive(false);
658 m_mutator = nullptr; 660 m_mutator = nullptr;
659 m_layerTreeView = nullptr; 661 m_layerTreeView = nullptr;
660 m_animationHost = nullptr; 662 m_animationHost = nullptr;
661 m_layerTreeViewClosed = true; 663 m_layerTreeViewClosed = true;
662 } 664 }
663 665
664 void WebFrameWidgetImpl::didAcquirePointerLock() { 666 void WebFrameWidgetImpl::didAcquirePointerLock() {
665 page()->pointerLockController().didAcquirePointerLock(); 667 page()->pointerLockController().didAcquirePointerLock();
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 if (m_layerTreeView && m_layerTreeView->compositorAnimationHost()) { 991 if (m_layerTreeView && m_layerTreeView->compositorAnimationHost()) {
990 m_animationHost = WTF::makeUnique<CompositorAnimationHost>( 992 m_animationHost = WTF::makeUnique<CompositorAnimationHost>(
991 m_layerTreeView->compositorAnimationHost()); 993 m_layerTreeView->compositorAnimationHost());
992 } 994 }
993 } 995 }
994 996
995 if (WebDevToolsAgentImpl* devTools = m_localRoot->devToolsAgentImpl()) 997 if (WebDevToolsAgentImpl* devTools = m_localRoot->devToolsAgentImpl())
996 devTools->layerTreeViewChanged(m_layerTreeView); 998 devTools->layerTreeViewChanged(m_layerTreeView);
997 999
998 page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView); 1000 page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView);
999 if (m_layerTreeView) 1001 if (m_layerTreeView) {
1000 page()->layerTreeViewInitialized(*m_layerTreeView); 1002 LOG(ERROR) << "WFWI::initializeLayerTreeView(), this = " << (void*)this
bokan 2017/01/17 20:40:16 Is this logging leftover from debugging?
kenrb 2017/01/19 19:07:40 Yes, sorry, removed.
bokan 2017/01/19 20:05:39 Acknowledged.
1003 << ", root frame view = " << (void*)m_localRoot->frame()->view();
1004 page()->layerTreeViewInitialized(*m_layerTreeView,
1005 m_localRoot->frame()->view());
1006 }
1001 1007
1002 // FIXME: only unittests, click to play, Android priting, and printing (for 1008 // FIXME: only unittests, click to play, Android priting, and printing (for
1003 // headers and footers) make this assert necessary. We should make them not 1009 // headers and footers) make this assert necessary. We should make them not
1004 // hit this code and then delete allowsBrokenNullLayerTreeView. 1010 // hit this code and then delete allowsBrokenNullLayerTreeView.
1005 DCHECK(m_layerTreeView || !m_client || 1011 DCHECK(m_layerTreeView || !m_client ||
1006 m_client->allowsBrokenNullLayerTreeView()); 1012 m_client->allowsBrokenNullLayerTreeView());
1007 } 1013 }
1008 1014
1009 void WebFrameWidgetImpl::setIsAcceleratedCompositingActive(bool active) { 1015 void WebFrameWidgetImpl::setIsAcceleratedCompositingActive(bool active) {
1010 // In the middle of shutting down; don't try to spin back up a compositor. 1016 // In the middle of shutting down; don't try to spin back up a compositor.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 return nullptr; 1138 return nullptr;
1133 } 1139 }
1134 1140
1135 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1141 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1136 if (!m_imeAcceptEvents) 1142 if (!m_imeAcceptEvents)
1137 return nullptr; 1143 return nullptr;
1138 return focusedLocalFrameInWidget(); 1144 return focusedLocalFrameInWidget();
1139 } 1145 }
1140 1146
1141 } // namespace blink 1147 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698