Title: [252601] trunk/Source/WebKit
- Revision
- 252601
- Author
- achristen...@apple.com
- Date
- 2019-11-18 15:31:02 -0800 (Mon, 18 Nov 2019)
Log Message
Fix assertion in layout test after r252492.
https://bugs.webkit.org/show_bug.cgi?id=204199
There is still a case in a test where there is no frame identifier, so keep the status quo.
This is a partial revert of r252492.
This fixes layout test http/tests/navigation/window-open-redirect-and-remove-opener.html
* Shared/FrameInfoData.cpp:
(WebKit::FrameInfoData::decode):
* Shared/FrameInfoData.h:
* UIProcess/API/APIFrameInfo.cpp:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (252600 => 252601)
--- trunk/Source/WebKit/ChangeLog 2019-11-18 23:25:00 UTC (rev 252600)
+++ trunk/Source/WebKit/ChangeLog 2019-11-18 23:31:02 UTC (rev 252601)
@@ -1,5 +1,22 @@
2019-11-18 Alex Christensen <achristen...@webkit.org>
+ Fix assertion in layout test after r252492.
+ https://bugs.webkit.org/show_bug.cgi?id=204199
+
+ There is still a case in a test where there is no frame identifier, so keep the status quo.
+ This is a partial revert of r252492.
+ This fixes layout test http/tests/navigation/window-open-redirect-and-remove-opener.html
+
+ * Shared/FrameInfoData.cpp:
+ (WebKit::FrameInfoData::decode):
+ * Shared/FrameInfoData.h:
+ * UIProcess/API/APIFrameInfo.cpp:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+ (WebKit::WebPageProxy::createNewPage):
+
+2019-11-18 Alex Christensen <achristen...@webkit.org>
+
Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
https://bugs.webkit.org/show_bug.cgi?id=204159
Modified: trunk/Source/WebKit/Shared/FrameInfoData.cpp (252600 => 252601)
--- trunk/Source/WebKit/Shared/FrameInfoData.cpp 2019-11-18 23:25:00 UTC (rev 252600)
+++ trunk/Source/WebKit/Shared/FrameInfoData.cpp 2019-11-18 23:31:02 UTC (rev 252601)
@@ -55,7 +55,7 @@
if (!securityOrigin)
return WTF::nullopt;
- Optional<WebCore::FrameIdentifier> frameID;
+ Optional<Optional<WebCore::FrameIdentifier>> frameID;
decoder >> frameID;
if (!frameID)
return WTF::nullopt;
Modified: trunk/Source/WebKit/Shared/FrameInfoData.h (252600 => 252601)
--- trunk/Source/WebKit/Shared/FrameInfoData.h 2019-11-18 23:25:00 UTC (rev 252600)
+++ trunk/Source/WebKit/Shared/FrameInfoData.h 2019-11-18 23:31:02 UTC (rev 252601)
@@ -43,7 +43,7 @@
bool isMainFrame { false };
WebCore::ResourceRequest request;
WebCore::SecurityOriginData securityOrigin;
- WebCore::FrameIdentifier frameID;
+ Optional<WebCore::FrameIdentifier> frameID;
};
}
Modified: trunk/Source/WebKit/UIProcess/API/APIFrameInfo.cpp (252600 => 252601)
--- trunk/Source/WebKit/UIProcess/API/APIFrameInfo.cpp 2019-11-18 23:25:00 UTC (rev 252600)
+++ trunk/Source/WebKit/UIProcess/API/APIFrameInfo.cpp 2019-11-18 23:31:02 UTC (rev 252601)
@@ -53,7 +53,7 @@
: m_isMainFrame { frameInfoData.isMainFrame }
, m_request { frameInfoData.request }
, m_securityOrigin { SecurityOrigin::create(frameInfoData.securityOrigin.securityOrigin()) }
- , m_handle { API::FrameHandle::create(frameInfoData.frameID) }
+ , m_handle { API::FrameHandle::create(frameInfoData.frameID ? *frameInfoData.frameID : WebCore::FrameIdentifier{ }) }
, m_page { page }
{
}
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (252600 => 252601)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-11-18 23:25:00 UTC (rev 252600)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-11-18 23:31:02 UTC (rev 252601)
@@ -4888,7 +4888,7 @@
beginSafeBrowsingCheck(request.url(), frame.isMainFrame(), listener);
API::Navigation* mainFrameNavigation = frame.isMainFrame() ? navigation.get() : nullptr;
- WebFrameProxy* originatingFrame = originatingFrameInfoData.frameID ? process->webFrame(originatingFrameInfoData.frameID) : nullptr;
+ WebFrameProxy* originatingFrame = originatingFrameInfoData.frameID ? process->webFrame(*originatingFrameInfoData.frameID) : nullptr;
#if ENABLE(RESOURCE_LOAD_STATISTICS)
if (auto* resourceLoadStatisticsStore = websiteDataStore().resourceLoadStatistics())
@@ -5228,7 +5228,7 @@
void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, Optional<WebPageProxyIdentifier> originatingPageID, ResourceRequest&& request, WindowFeatures&& windowFeatures, NavigationActionData&& navigationActionData, Messages::WebPageProxy::CreateNewPage::DelayedReply&& reply)
{
MESSAGE_CHECK(m_process, originatingFrameInfoData.frameID);
- MESSAGE_CHECK(m_process, m_process->webFrame(originatingFrameInfoData.frameID));
+ MESSAGE_CHECK(m_process, m_process->webFrame(*originatingFrameInfoData.frameID));
auto* originatingPage = m_process->webPage(*originatingPageID);
auto originatingFrameInfo = API::FrameInfo::create(WTFMove(originatingFrameInfoData), originatingPage);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes