Changeset 171191 in webkit
- Timestamp:
- Jul 17, 2014 12:19:37 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r171182 r171191 1 2014-07-17 Tim Horton <timothy_horton@apple.com> 2 3 Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app 4 https://bugs.webkit.org/show_bug.cgi?id=135018 5 <rdar://problem/17615038> 6 7 Reviewed by Simon Fraser. 8 9 * UIProcess/DrawingAreaProxy.h: 10 (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate): 11 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: 12 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: 13 (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate): 14 * UIProcess/mac/RemoteLayerTreeHost.h: 15 * UIProcess/mac/RemoteLayerTreeHost.mm: 16 (WebKit::RemoteLayerTreeHost::detachRootLayer): 17 Add a mechanism to "hide" drawing area content until the next commit, 18 by detaching the root layer. RemoteLayerTreeHost will automatically reattach 19 it at the next commit. 20 21 * UIProcess/WebPageProxy.cpp: 22 (WebKit::WebPageProxy::viewStateDidChange): 23 * UIProcess/WebPageProxy.h: 24 Add a parameter to viewStateDidChange specifying whether dispatching the change 25 to the Web process is deferrable or not. We will also automatically use "Immediate" if 26 the view is coming in-window, like we did before. 27 28 * UIProcess/ios/WKContentView.mm: 29 (-[WKContentView _applicationWillEnterForeground:]): 30 Make use of the aforementioned new mechanisms to ensure that we immediately dispatch 31 view state changes when coming into the foreground, and will have removed the root layer 32 if a commit didn't come in while waitForDidUpdateViewState blocks. 33 1 34 2014-07-17 Sanghyup Lee <sh53.lee@samsung.com> 2 35 -
trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h
r170838 r171191 89 89 virtual void dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)>) { ASSERT_NOT_REACHED(); } 90 90 91 virtual void hideContentUntilNextUpdate() { ASSERT_NOT_REACHED(); } 92 91 93 protected: 92 94 explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy*); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r171167 r171191 1131 1131 } 1132 1132 1133 void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, bool wantsReply )1133 void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, bool wantsReply, ViewStateChangeDispatchMode dispatchMode) 1134 1134 { 1135 1135 m_potentiallyChangedViewStateFlags |= mayHaveChanged; … … 1137 1137 1138 1138 #if PLATFORM(COCOA) 1139 if (!isInWindow() && (mayHaveChanged & ViewState::IsInWindow) && m_pageClient.isViewInWindow()) { 1139 bool isNewlyInWindow = !isInWindow() && (mayHaveChanged & ViewState::IsInWindow) && m_pageClient.isViewInWindow(); 1140 if (dispatchMode == ViewStateChangeDispatchMode::Immediate || isNewlyInWindow) { 1140 1141 dispatchViewStateChange(); 1141 1142 return; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r171154 r171191 361 361 bool delegatesScrolling() const { return m_delegatesScrolling; } 362 362 363 void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, bool wantsReply = false); 363 enum class ViewStateChangeDispatchMode { Deferrable, Immediate }; 364 void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, bool wantsReply = false, ViewStateChangeDispatchMode = ViewStateChangeDispatchMode::Deferrable); 364 365 bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; } 365 366 void waitForDidUpdateViewState(); -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm
r171080 r171191 512 512 { 513 513 _page->applicationWillEnterForeground(); 514 _page->viewStateDidChange(ViewState::AllFlags & ~ViewState::IsInWindow, true); 514 _page->drawingArea()->hideContentUntilNextUpdate(); 515 _page->viewStateDidChange(ViewState::AllFlags & ~ViewState::IsInWindow, true, WebPageProxy::ViewStateChangeDispatchMode::Immediate); 515 516 } 516 517 -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h
r171068 r171191 76 76 77 77 virtual void waitForDidUpdateViewState() override; 78 virtual void hideContentUntilNextUpdate() override; 78 79 79 80 WebCore::FloatPoint indicatorLocation() const; -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
r171087 r171191 399 399 } 400 400 401 void RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate() 402 { 403 m_remoteLayerTreeHost.detachRootLayer(); 404 } 405 401 406 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h
r169851 r171191 64 64 void clearLayers(); 65 65 66 // Detach the root layer; it will be reattached upon the next incoming commit. 67 void detachRootLayer(); 68 66 69 private: 67 70 LayerOrView *createLayer(const RemoteLayerTreeTransaction::LayerCreationProperties&, const RemoteLayerTreeTransaction::LayerProperties*); -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
r170864 r171191 221 221 #endif 222 222 223 void RemoteLayerTreeHost::detachRootLayer() 224 { 225 #if PLATFORM(IOS) 226 [m_rootLayer removeFromSuperview]; 227 #else 228 [asLayer(m_rootLayer) removeFromSuperlayer]; 229 #endif 230 m_rootLayer = nullptr; 231 } 232 223 233 } // namespace WebKit
Note: See TracChangeset
for help on using the changeset viewer.