- Revision
- 240670
- Author
- [email protected]
- Date
- 2019-01-29 12:36:56 -0800 (Tue, 29 Jan 2019)
Log Message
Cherry-pick r240659. rdar://problem/47639406
Regression(r240046) VoiceOver is no longer working after a process swap
https://bugs.webkit.org/show_bug.cgi?id=193953
<rdar://problem/47612398>
Reviewed by Alex Christensen.
ProvisionalPageProxy used to forward the RegisterWebProcessAccessibilityToken IPC from
the provisional WebProcess to the WebPageProxy right away. This in turn would notify
the PageClient whose logic would rely on WebPageProxy::process(), which returns the
committed process instead of the provisional one.
To address the issue, the ProvisionalPageProxy now stores the token sent by the
provisional WebProcess and we only call registerWebProcessAccessibilityToken()
on the WebPageProxy *after* we've swapped to the provisional process.
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
(WebKit::ProvisionalPageProxy::didReceiveMessage):
* UIProcess/ProvisionalPageProxy.h:
(WebKit::ProvisionalPageProxy::takeAccessibilityToken):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::commitProvisionalPage):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (240669 => 240670)
--- branches/safari-607-branch/Source/WebKit/ChangeLog 2019-01-29 20:35:51 UTC (rev 240669)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog 2019-01-29 20:36:56 UTC (rev 240670)
@@ -1,3 +1,57 @@
+2019-01-29 Alan Coon <[email protected]>
+
+ Cherry-pick r240659. rdar://problem/47639406
+
+ Regression(r240046) VoiceOver is no longer working after a process swap
+ https://bugs.webkit.org/show_bug.cgi?id=193953
+ <rdar://problem/47612398>
+
+ Reviewed by Alex Christensen.
+
+ ProvisionalPageProxy used to forward the RegisterWebProcessAccessibilityToken IPC from
+ the provisional WebProcess to the WebPageProxy right away. This in turn would notify
+ the PageClient whose logic would rely on WebPageProxy::process(), which returns the
+ committed process instead of the provisional one.
+
+ To address the issue, the ProvisionalPageProxy now stores the token sent by the
+ provisional WebProcess and we only call registerWebProcessAccessibilityToken()
+ on the WebPageProxy *after* we've swapped to the provisional process.
+
+ * UIProcess/ProvisionalPageProxy.cpp:
+ (WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
+ (WebKit::ProvisionalPageProxy::didReceiveMessage):
+ * UIProcess/ProvisionalPageProxy.h:
+ (WebKit::ProvisionalPageProxy::takeAccessibilityToken):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::commitProvisionalPage):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-29 Chris Dumez <[email protected]>
+
+ Regression(r240046) VoiceOver is no longer working after a process swap
+ https://bugs.webkit.org/show_bug.cgi?id=193953
+ <rdar://problem/47612398>
+
+ Reviewed by Alex Christensen.
+
+ ProvisionalPageProxy used to forward the RegisterWebProcessAccessibilityToken IPC from
+ the provisional WebProcess to the WebPageProxy right away. This in turn would notify
+ the PageClient whose logic would rely on WebPageProxy::process(), which returns the
+ committed process instead of the provisional one.
+
+ To address the issue, the ProvisionalPageProxy now stores the token sent by the
+ provisional WebProcess and we only call registerWebProcessAccessibilityToken()
+ on the WebPageProxy *after* we've swapped to the provisional process.
+
+ * UIProcess/ProvisionalPageProxy.cpp:
+ (WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
+ (WebKit::ProvisionalPageProxy::didReceiveMessage):
+ * UIProcess/ProvisionalPageProxy.h:
+ (WebKit::ProvisionalPageProxy::takeAccessibilityToken):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::commitProvisionalPage):
+
2019-01-28 Alan Coon <[email protected]>
Cherry-pick r240599. rdar://problem/47609799
Modified: branches/safari-607-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp (240669 => 240670)
--- branches/safari-607-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp 2019-01-29 20:35:51 UTC (rev 240669)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp 2019-01-29 20:36:56 UTC (rev 240670)
@@ -284,6 +284,13 @@
m_page.backForwardGoToItemShared(m_process.copyRef(), identifier, handle);
}
+#if PLATFORM(COCOA)
+void ProvisionalPageProxy::registerWebProcessAccessibilityToken(const IPC::DataReference& data)
+{
+ m_accessibilityToken = data.vector();
+}
+#endif
+
void ProvisionalPageProxy::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
{
ASSERT(decoder.messageReceiverName() == Messages::WebPageProxy::messageReceiverName());
@@ -294,9 +301,6 @@
|| decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessage::name()
|| decoder.messageName() == Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacy::name()
|| decoder.messageName() == Messages::WebPageProxy::SetNetworkRequestsInProgress::name()
-#if PLATFORM(COCOA)
- || decoder.messageName() == Messages::WebPageProxy::RegisterWebProcessAccessibilityToken::name()
-#endif
)
{
m_page.didReceiveMessage(connection, decoder);
@@ -303,6 +307,13 @@
return;
}
+#if PLATFORM(COCOA)
+ if (decoder.messageName() == Messages::WebPageProxy::RegisterWebProcessAccessibilityToken::name()) {
+ IPC::handleMessage<Messages::WebPageProxy::RegisterWebProcessAccessibilityToken>(decoder, this, &ProvisionalPageProxy::registerWebProcessAccessibilityToken);
+ return;
+ }
+#endif
+
if (decoder.messageName() == Messages::WebPageProxy::StartURLSchemeTask::name()) {
IPC::handleMessage<Messages::WebPageProxy::StartURLSchemeTask>(decoder, this, &ProvisionalPageProxy::startURLSchemeTask);
return;
Modified: branches/safari-607-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.h (240669 => 240670)
--- branches/safari-607-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.h 2019-01-29 20:35:51 UTC (rev 240669)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.h 2019-01-29 20:36:56 UTC (rev 240670)
@@ -62,6 +62,10 @@
DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
std::unique_ptr<DrawingAreaProxy> takeDrawingArea();
+#if PLATFORM(COCOA)
+ Vector<uint8_t> takeAccessibilityToken() { return WTFMove(m_accessibilityToken); }
+#endif
+
void loadData(API::Navigation&, const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, Optional<WebsitePoliciesData>&& = WTF::nullopt);
void loadRequest(API::Navigation&, WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData, Optional<WebsitePoliciesData>&& = WTF::nullopt);
void goToBackForwardItem(API::Navigation&, WebBackForwardListItem&, Optional<WebsitePoliciesData>&&);
@@ -86,6 +90,9 @@
void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
void startURLSchemeTask(URLSchemeTaskParameters&&);
void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, SandboxExtension::Handle&);
+#if PLATFORM(COCOA)
+ void registerWebProcessAccessibilityToken(const IPC::DataReference&);
+#endif
void initializeWebPage();
void finishInitializingWebPageAfterProcessLaunch();
@@ -101,6 +108,9 @@
bool m_wasCommitted { false };
URL m_provisionalLoadURL;
+#if PLATFORM(COCOA)
+ Vector<uint8_t> m_accessibilityToken;
+#endif
#if PLATFORM(IOS_FAMILY)
ProcessThrottler::ForegroundActivityToken m_suspensionToken;
#endif
Modified: branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (240669 => 240670)
--- branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-01-29 20:35:51 UTC (rev 240669)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-01-29 20:36:56 UTC (rev 240670)
@@ -2774,6 +2774,12 @@
swapToWebProcess(m_provisionalPage->process(), m_provisionalPage->takeDrawingArea(), m_provisionalPage->mainFrame());
+#if PLATFORM(COCOA)
+ auto accessibilityToken = m_provisionalPage->takeAccessibilityToken();
+ if (!accessibilityToken.isEmpty())
+ registerWebProcessAccessibilityToken({ accessibilityToken.data(), accessibilityToken.size() });
+#endif
+
didCommitLoadForFrame(frameID, navigationID, mimeType, frameHasCustomContentProvider, frameLoadType, certificateInfo, containsPluginDocument, forcedHasInsecureContent, userData);
m_provisionalPage = nullptr;