Title: [243461] trunk/Source/WebKit
- Revision
- 243461
- Author
- [email protected]
- Date
- 2019-03-25 14:28:09 -0700 (Mon, 25 Mar 2019)
Log Message
Get rid of WebPage::m_shouldResetDrawingAreaAfterSuspend flag
https://bugs.webkit.org/show_bug.cgi?id=196210
<rdar://problem/48681326>
Reviewed by Geoffrey Garen.
Get rid of WebPage::m_shouldResetDrawingAreaAfterSuspend flag and use the drawing area identifier
instead to reset the DrawingArea in the WebProcess whenever the UIProcess did.
This is less error-prone and guarantees that the WebProcess and the UIProcess can reliably
communicate via DrawingArea IPC.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setIsSuspended):
* WebProcess/WebPage/WebPage.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (243460 => 243461)
--- trunk/Source/WebKit/ChangeLog 2019-03-25 21:23:15 UTC (rev 243460)
+++ trunk/Source/WebKit/ChangeLog 2019-03-25 21:28:09 UTC (rev 243461)
@@ -1,3 +1,22 @@
+2019-03-25 Chris Dumez <[email protected]>
+
+ Get rid of WebPage::m_shouldResetDrawingAreaAfterSuspend flag
+ https://bugs.webkit.org/show_bug.cgi?id=196210
+ <rdar://problem/48681326>
+
+ Reviewed by Geoffrey Garen.
+
+ Get rid of WebPage::m_shouldResetDrawingAreaAfterSuspend flag and use the drawing area identifier
+ instead to reset the DrawingArea in the WebProcess whenever the UIProcess did.
+
+ This is less error-prone and guarantees that the WebProcess and the UIProcess can reliably
+ communicate via DrawingArea IPC.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::reinitializeWebPage):
+ (WebKit::WebPage::setIsSuspended):
+ * WebProcess/WebPage/WebPage.h:
+
2019-03-25 Alex Christensen <[email protected]>
Enable IPC sending and receiving non-default-constructible types
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (243460 => 243461)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2019-03-25 21:23:15 UTC (rev 243460)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2019-03-25 21:28:09 UTC (rev 243461)
@@ -724,10 +724,10 @@
setSize(parameters.viewSize);
- if (m_shouldResetDrawingAreaAfterSuspend) {
+ // If the UIProcess created a new DrawingArea, then we need to do the same.
+ if (m_drawingArea->identifier() != parameters.drawingAreaIdentifier) {
auto oldDrawingArea = std::exchange(m_drawingArea, nullptr);
oldDrawingArea->removeMessageReceiverIfNeeded();
- m_shouldResetDrawingAreaAfterSuspend = false;
m_drawingArea = DrawingArea::create(*this, parameters);
m_drawingArea->setPaintingEnabled(false);
@@ -739,7 +739,6 @@
unfreezeLayerTree(LayerTreeFreezeReason::PageSuspended);
}
- RELEASE_ASSERT(m_drawingArea->identifier() == parameters.drawingAreaIdentifier);
setViewLayoutSize(parameters.viewLayoutSize);
@@ -6321,15 +6320,15 @@
m_isSuspended = suspended;
- if (m_isSuspended) {
- // Unfrozen on drawing area reset.
- freezeLayerTree(LayerTreeFreezeReason::PageSuspended);
+ if (!suspended)
+ return;
- WebProcess::singleton().sendPrewarmInformation(mainWebFrame()->url());
+ // Unfrozen on drawing area reset.
+ freezeLayerTree(LayerTreeFreezeReason::PageSuspended);
- suspendForProcessSwap();
- } else
- m_shouldResetDrawingAreaAfterSuspend = true;
+ WebProcess::singleton().sendPrewarmInformation(mainWebFrame()->url());
+
+ suspendForProcessSwap();
}
void WebPage::frameBecameRemote(uint64_t frameID, GlobalFrameIdentifier&& remoteFrameIdentifier, GlobalWindowIdentifier&& remoteWindowIdentifier)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (243460 => 243461)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-03-25 21:23:15 UTC (rev 243460)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-03-25 21:28:09 UTC (rev 243461)
@@ -1561,7 +1561,6 @@
WebCore::IntSize m_viewSize;
std::unique_ptr<DrawingArea> m_drawingArea;
- bool m_shouldResetDrawingAreaAfterSuspend { false };
HashSet<PluginView*> m_pluginViews;
bool m_hasSeenPlugin { false };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes