Skip to content

Commit

Permalink
Sever window opener on manual navigation
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266354
rdar://118951619

Reviewed by Alex Christensen.

When a user does a cross-origin manual navigation (e.g. navigating via the address bar, opening a
bookmark, ...), then we should sever the window.opener reference. This should be safe since other
browsers are already doing this: whatwg/html#6356.

This requires propagating the existing isRequestFromClientOrUserInput flag from more callsites.
Previously we were only setting that flag on NavigationAction after a fragment navigation.

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::createWindow):
* Source/WebCore/loader/NavigationAction.cpp:
(WebCore::NavigationAction::NavigationAction):
* Source/WebCore/loader/NavigationAction.h:
* Source/WebCore/loader/PolicyChecker.cpp:
(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):
* Source/WebCore/page/ContextMenuController.cpp:
(WebCore::openNewWindow):
* Source/WebKit/Shared/NavigationActionData.h:
* Source/WebKit/Shared/NavigationActionData.serialization.in:
* Source/WebKit/UIProcess/API/APINavigation.h:
(API::Navigation::isRequestFromClientOrUserInput const):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::didSameDocumentNavigationForFrameViaJSHistoryAPI):
(WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::changeLocation):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

Canonical link: https://commits.webkit.org/272321@main
  • Loading branch information
bnham committed Dec 20, 2023
1 parent 633fbf1 commit e0471a8
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 29 deletions.
29 changes: 15 additions & 14 deletions Source/WebCore/loader/FrameLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& ref
if (!isNavigationAllowed())
return;

NavigationAction action { frameLoadRequest.requester(), request, frameLoadRequest.initiatedByMainFrame(), newLoadType, isFormSubmission, event, frameLoadRequest.shouldOpenExternalURLsPolicy(), frameLoadRequest.downloadAttribute() };
NavigationAction action { frameLoadRequest.requester(), request, frameLoadRequest.initiatedByMainFrame(), frameLoadRequest.isRequestFromClientOrUserInput(), newLoadType, isFormSubmission, event, frameLoadRequest.shouldOpenExternalURLsPolicy(), frameLoadRequest.downloadAttribute() };
action.setLockHistory(frameLoadRequest.lockHistory());
action.setLockBackForwardList(frameLoadRequest.lockBackForwardList());
action.setShouldReplaceDocumentIfJavaScriptURL(frameLoadRequest.shouldReplaceDocumentIfJavaScriptURL());
Expand Down Expand Up @@ -1585,7 +1585,7 @@ void FrameLoader::load(FrameLoadRequest&& request)
m_provisionalLoadHappeningInAnotherProcess = false;

if (request.shouldCheckNewWindowPolicy()) {
NavigationAction action { request.requester(), request.resourceRequest(), InitiatedByMainFrame::Unknown, NavigationType::Other, request.shouldOpenExternalURLsPolicy() };
NavigationAction action { request.requester(), request.resourceRequest(), InitiatedByMainFrame::Unknown, request.isRequestFromClientOrUserInput(), NavigationType::Other, request.shouldOpenExternalURLsPolicy() };
action.setNewFrameOpenerPolicy(request.newFrameOpenerPolicy());
policyChecker().checkNewWindowPolicy(WTFMove(action), WTFMove(request.resourceRequest()), { }, request.frameName(), [this] (const ResourceRequest& request, WeakPtr<FormState>&& formState, const AtomString& frameName, const NavigationAction& action, ShouldContinuePolicyCheck shouldContinue) {
continueLoadAfterNewWindowPolicy(request, formState.get(), frameName, action, shouldContinue, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Suppress);
Expand Down Expand Up @@ -1733,8 +1733,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t

if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
RefPtr oldDocumentLoader = m_documentLoader;
NavigationAction action { frame->protectedDocument().releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, policyChecker().loadType(), isFormSubmission };
action.setIsRequestFromClientOrUserInput(loader->isRequestFromClientOrUserInput());
NavigationAction action { frame->protectedDocument().releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), policyChecker().loadType(), isFormSubmission };
oldDocumentLoader->setTriggeringAction(WTFMove(action));
oldDocumentLoader->setLastCheckedRequest(ResourceRequest());
policyChecker().stopCheck();
Expand All @@ -1753,8 +1752,10 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t

policyChecker().stopCheck();
setPolicyDocumentLoader(loader);
if (loader->triggeringAction().isEmpty())
loader->setTriggeringAction({ frame->protectedDocument().releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, policyChecker().loadType(), isFormSubmission });
if (loader->triggeringAction().isEmpty()) {
NavigationAction action { frame->protectedDocument().releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), policyChecker().loadType(), isFormSubmission };
loader->setTriggeringAction(WTFMove(action));
}

frame->navigationScheduler().cancel(NewLoadInProgress::Yes);

Expand Down Expand Up @@ -1908,7 +1909,7 @@ void FrameLoader::reload(OptionSet<ReloadOption> options)

// If we're about to re-post, set up action so the application can warn the user.
if (request.httpMethod() == "POST"_s)
loader->setTriggeringAction({ m_frame->protectedDocument().releaseNonNull(), request, InitiatedByMainFrame::Unknown, NavigationType::FormResubmitted });
loader->setTriggeringAction({ m_frame->protectedDocument().releaseNonNull(), request, InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), NavigationType::FormResubmitted });

loader->setOverrideEncoding(m_documentLoader->overrideEncoding());

Expand Down Expand Up @@ -3313,7 +3314,7 @@ void FrameLoader::loadPostRequest(FrameLoadRequest&& request, const String& refe
if (RefPtr document = frame->document())
document->checkedContentSecurityPolicy()->upgradeInsecureRequestIfNeeded(workingResourceRequest, ContentSecurityPolicy::InsecureRequestType::Load);

NavigationAction action { request.requester(), workingResourceRequest, request.initiatedByMainFrame(), loadType, true, event, request.shouldOpenExternalURLsPolicy(), { } };
NavigationAction action { request.requester(), workingResourceRequest, request.initiatedByMainFrame(), request.isRequestFromClientOrUserInput(), loadType, true, event, request.shouldOpenExternalURLsPolicy(), { } };
action.setLockHistory(lockHistory);
action.setLockBackForwardList(request.lockBackForwardList());
action.setShouldReplaceDocumentIfJavaScriptURL(request.shouldReplaceDocumentIfJavaScriptURL());
Expand Down Expand Up @@ -3908,7 +3909,7 @@ void FrameLoader::continueLoadAfterNewWindowPolicy(const ResourceRequest& reques
mainFrame->protectedDocument()->setReferrerPolicy(frame->document()->referrerPolicy());
}

NavigationAction newAction { frame->protectedDocument().releaseNonNull(), request, InitiatedByMainFrame::Unknown, NavigationType::Other, action.shouldOpenExternalURLsPolicy(), nullptr, action.downloadAttribute() };
NavigationAction newAction { frame->protectedDocument().releaseNonNull(), request, InitiatedByMainFrame::Unknown, action.isRequestFromClientOrUserInput(), NavigationType::Other, action.shouldOpenExternalURLsPolicy(), nullptr, action.downloadAttribute() };
newAction.setShouldReplaceDocumentIfJavaScriptURL(action.shouldReplaceDocumentIfJavaScriptURL());
mainFrameLoader->loadWithNavigationAction(request, WTFMove(newAction), FrameLoadType::Standard, formState, allowNavigationToInvalidURL, ShouldTreatAsContinuingLoad::No);
}
Expand Down Expand Up @@ -4115,7 +4116,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem& item, HistoryItem* from
RefPtr documentLoader = cachedPage->documentLoader();
m_client->updateCachedDocumentLoader(*documentLoader);

auto action = NavigationAction { frame->protectedDocument().releaseNonNull(), documentLoader->request(), initiatedByMainFrame, loadType, false };
auto action = NavigationAction { frame->protectedDocument().releaseNonNull(), documentLoader->request(), initiatedByMainFrame, documentLoader->isRequestFromClientOrUserInput(), loadType, false };
action.setTargetBackForwardItem(item);
action.setSourceBackForwardItem(fromItem);
documentLoader->setTriggeringAction(WTFMove(action));
Expand Down Expand Up @@ -4167,10 +4168,10 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem& item, HistoryItem* from

if (cacheLoadPolicy == MayAttemptCacheOnlyLoadForFormSubmissionItem) {
request.setCachePolicy(ResourceRequestCachePolicy::ReturnCacheDataDontLoad);
action = { frame->protectedDocument().releaseNonNull(), request, initiatedByMainFrame, loadType, isFormSubmission, nullptr, shouldOpenExternalURLsPolicy };
action = { frame->protectedDocument().releaseNonNull(), request, initiatedByMainFrame, false, loadType, isFormSubmission, nullptr, shouldOpenExternalURLsPolicy };
} else {
request.setCachePolicy(ResourceRequestCachePolicy::ReturnCacheDataElseLoad);
action = { frame->protectedDocument().releaseNonNull(), request, initiatedByMainFrame, NavigationType::FormResubmitted, shouldOpenExternalURLsPolicy, nullptr };
action = { frame->protectedDocument().releaseNonNull(), request, initiatedByMainFrame, false, NavigationType::FormResubmitted, shouldOpenExternalURLsPolicy, nullptr };
}
} else {
switch (loadType) {
Expand Down Expand Up @@ -4204,7 +4205,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem& item, HistoryItem* from

ResourceRequest requestForOriginalURL(request);
requestForOriginalURL.setURL(itemOriginalURL);
action = { frame->protectedDocument().releaseNonNull(), requestForOriginalURL, initiatedByMainFrame, loadType, isFormSubmission, nullptr, shouldOpenExternalURLsPolicy };
action = { frame->protectedDocument().releaseNonNull(), requestForOriginalURL, initiatedByMainFrame, false, loadType, isFormSubmission, nullptr, shouldOpenExternalURLsPolicy };
}

action.setTargetBackForwardItem(item);
Expand Down Expand Up @@ -4486,7 +4487,7 @@ RefPtr<Frame> createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame, Fra
return nullptr;

ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLsPolicyToApply(openerFrame, request);
NavigationAction action { request.requester(), request.resourceRequest(), request.initiatedByMainFrame(), NavigationType::Other, shouldOpenExternalURLsPolicy };
NavigationAction action { request.requester(), request.resourceRequest(), request.initiatedByMainFrame(), request.isRequestFromClientOrUserInput(), NavigationType::Other, shouldOpenExternalURLsPolicy };
action.setNewFrameOpenerPolicy(features.wantsNoOpener() ? NewFrameOpenerPolicy::Suppress : NewFrameOpenerPolicy::Allow);
RefPtr page = oldPage->chrome().createWindow(openerFrame, features, action);
if (!page)
Expand Down
7 changes: 4 additions & 3 deletions Source/WebCore/loader/NavigationAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static NavigationType navigationType(FrameLoadType frameLoadType, bool isFormSub
return NavigationType::Other;
}

NavigationAction::NavigationAction(Document& requester, const ResourceRequest& originalRequest, InitiatedByMainFrame initiatedByMainFrame, NavigationType type, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Event* event, const AtomString& downloadAttribute)
NavigationAction::NavigationAction(Document& requester, const ResourceRequest& originalRequest, InitiatedByMainFrame initiatedByMainFrame, bool isRequestFromClientOrUserInput, NavigationType type, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Event* event, const AtomString& downloadAttribute)
: m_requester { NavigationRequester::from(requester) }
, m_originalRequest { originalRequest }
, m_keyStateEventData { keyStateDataForFirstEventWithKeyState(event) }
Expand All @@ -110,11 +110,11 @@ NavigationAction::NavigationAction(Document& requester, const ResourceRequest& o
, m_shouldOpenExternalURLsPolicy { shouldOpenExternalURLsPolicy }
, m_initiatedByMainFrame { initiatedByMainFrame }
, m_treatAsSameOriginNavigation { shouldTreatAsSameOriginNavigation(requester, originalRequest.url()) }

, m_isRequestFromClientOrUserInput { isRequestFromClientOrUserInput }
{
}

NavigationAction::NavigationAction(Document& requester, const ResourceRequest& originalRequest, InitiatedByMainFrame initiatedByMainFrame, FrameLoadType frameLoadType, bool isFormSubmission, Event* event, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, const AtomString& downloadAttribute)
NavigationAction::NavigationAction(Document& requester, const ResourceRequest& originalRequest, InitiatedByMainFrame initiatedByMainFrame, bool isRequestFromClientOrUserInput, FrameLoadType frameLoadType, bool isFormSubmission, Event* event, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, const AtomString& downloadAttribute)
: m_requester { NavigationRequester::from(requester) }
, m_originalRequest { originalRequest }
, m_keyStateEventData { keyStateDataForFirstEventWithKeyState(event) }
Expand All @@ -124,6 +124,7 @@ NavigationAction::NavigationAction(Document& requester, const ResourceRequest& o
, m_shouldOpenExternalURLsPolicy { shouldOpenExternalURLsPolicy }
, m_initiatedByMainFrame { initiatedByMainFrame }
, m_treatAsSameOriginNavigation { shouldTreatAsSameOriginNavigation(requester, originalRequest.url()) }
, m_isRequestFromClientOrUserInput { isRequestFromClientOrUserInput }
{
}

Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/loader/NavigationAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ enum class MouseButton : int8_t;
class NavigationAction {
public:
NavigationAction();
WEBCORE_EXPORT NavigationAction(Document&, const ResourceRequest&, InitiatedByMainFrame, NavigationType = NavigationType::Other, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, Event* = nullptr, const AtomString& downloadAttribute = nullAtom());
NavigationAction(Document&, const ResourceRequest&, InitiatedByMainFrame, FrameLoadType, bool isFormSubmission, Event* = nullptr, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, const AtomString& downloadAttribute = nullAtom());
WEBCORE_EXPORT NavigationAction(Document&, const ResourceRequest&, InitiatedByMainFrame, bool, NavigationType = NavigationType::Other, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, Event* = nullptr, const AtomString& downloadAttribute = nullAtom());
NavigationAction(Document&, const ResourceRequest&, InitiatedByMainFrame, bool, FrameLoadType, bool isFormSubmission, Event* = nullptr, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, const AtomString& downloadAttribute = nullAtom());

WEBCORE_EXPORT ~NavigationAction();

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/loader/PolicyChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void FrameLoader::PolicyChecker::checkNavigationPolicy(ResourceRequest&& request
{
NavigationAction action = loader->triggeringAction();
if (action.isEmpty()) {
action = NavigationAction { *m_frame.document(), request, InitiatedByMainFrame::Unknown, NavigationType::Other, loader->shouldOpenExternalURLsPolicyToPropagate() };
action = NavigationAction { *m_frame.document(), request, InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), NavigationType::Other, loader->shouldOpenExternalURLsPolicyToPropagate() };
loader->setTriggeringAction(NavigationAction { action });
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/page/ContextMenuController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static void openNewWindow(const URL& urlToLoad, LocalFrame& frame, Event* event,
frameLoadRequest.setShouldOpenExternalURLsPolicy(shouldOpenExternalURLsPolicy);
frameLoadRequest.setNewFrameOpenerPolicy(NewFrameOpenerPolicy::Suppress);

Page* newPage = oldPage->chrome().createWindow(frame, { }, { *frame.document(), frameLoadRequest.resourceRequest(), frameLoadRequest.initiatedByMainFrame() });
Page* newPage = oldPage->chrome().createWindow(frame, { }, { *frame.document(), frameLoadRequest.resourceRequest(), frameLoadRequest.initiatedByMainFrame(), frameLoadRequest.isRequestFromClientOrUserInput() });
if (!newPage)
return;
newPage->chrome().show();
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/Shared/NavigationActionData.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct NavigationActionData {
WTF::String downloadAttribute;
WebCore::FloatPoint clickLocationInRootViewCoordinates;
WebCore::ResourceResponse redirectResponse;
bool isRequestFromClientOrUserInput { false };
bool treatAsSameOriginNavigation { false };
bool hasOpenedFrames { false };
bool openedByDOMWithOpener { false };
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/Shared/NavigationActionData.serialization.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct WebKit::NavigationActionData {
WTF::String downloadAttribute;
WebCore::FloatPoint clickLocationInRootViewCoordinates;
WebCore::ResourceResponse redirectResponse;
bool isRequestFromClientOrUserInput;
bool treatAsSameOriginNavigation;
bool hasOpenedFrames;
bool openedByDOMWithOpener;
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/UIProcess/API/APINavigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class Navigation : public ObjectImpl<Object::Type::Navigation> {
Vector<WTF::URL> takeRedirectChain() { return WTFMove(m_redirectChain); }

bool wasUserInitiated() const { return !!m_lastNavigationAction.userGestureTokenIdentifier; }
bool isRequestFromClientOrUserInput() const { return m_lastNavigationAction.isRequestFromClientOrUserInput; }

bool shouldPerformDownload() const { return !m_lastNavigationAction.downloadAttribute.isNull(); }

Expand Down
7 changes: 6 additions & 1 deletion Source/WebKit/UIProcess/WebProcessPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,12 @@ std::tuple<Ref<WebProcessProxy>, SuspendedPageProxy*, ASCIILiteral> WebProcessPo

// FIXME: We should support process swap when a window has been opened via window.open() without 'noopener'.
// The issue is that the opener has a handle to the WindowProxy.
if (navigation.openedByDOMWithOpener() && !!page.openerFrame() && !(page.preferences().processSwapOnCrossSiteWindowOpenEnabled() || page.preferences().siteIsolationEnabled()))
//
// We may allow a process swap to occur even when the window has an opener if the request came from the client
// (e.g. a location bar navigation as opposed to a link click). If there's substitute data, then the response
// may be a response generated by the engine, so consider those navigations as non-client-initiated.
bool isRequestFromClientOrUserInput = navigation.isRequestFromClientOrUserInput() && !navigation.substituteData();
if (navigation.openedByDOMWithOpener() && !!page.openerFrame() && !(isRequestFromClientOrUserInput || page.preferences().processSwapOnCrossSiteWindowOpenEnabled() || page.preferences().siteIsolationEnabled()))
return { WTFMove(sourceProcess), nullptr, "Browsing context been opened by DOM without 'noopener'"_s };

// FIXME: We should support process swap when a window has opened other windows via window.open.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ Page* WebChromeClient::createWindow(LocalFrame& frame, const WindowFeatures& win
navigationAction.downloadAttribute(),
mouseEventData ? mouseEventData->locationInRootViewCoordinates : FloatPoint { },
{ }, /* redirectResponse */
navigationAction.isRequestFromClientOrUserInput(),
false, /* treatAsSameOriginNavigation */
false, /* hasOpenedFrames */
false, /* openedByDOMWithOpener */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const Navigat
navigationAction.downloadAttribute(),
mouseEventData ? mouseEventData->locationInRootViewCoordinates : FloatPoint(),
redirectResponse,
navigationAction.isRequestFromClientOrUserInput(),
navigationAction.treatAsSameOriginNavigation(),
navigationAction.hasOpenedFrames(),
navigationAction.openedByDOMWithOpener(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ void WebLocalFrameLoaderClient::didSameDocumentNavigationForFrameViaJSHistoryAPI
{ }, /* downloadAttribute */
{ }, /* clickLocationInRootViewCoordinates */
{ }, /* redirectResponse */
false, /* isRequestFromClientOrUserInput */
true, /* treatAsSameOriginNavigation */
false, /* hasOpenedFrames */
false, /* openedByDOMWithOpener */
Expand Down Expand Up @@ -941,6 +942,7 @@ void WebLocalFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const Nav
navigationAction.downloadAttribute(),
mouseEventData ? mouseEventData->locationInRootViewCoordinates : FloatPoint(),
{ }, /* redirectResponse */
false, /* isRequestFromClientOrUserInput */
false, /* treatAsSameOriginNavigation */
false, /* hasOpenedFrames */
false, /* openedByDOMWithOpener */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void WebRemoteFrameClient::postMessageToRemote(WebCore::FrameIdentifier source,
void WebRemoteFrameClient::changeLocation(WebCore::FrameLoadRequest&& request)
{
// FIXME: FrameLoadRequest and NavigationAction can probably be refactored to share more. <rdar://116202911>
WebCore::NavigationAction action(request.requester(), request.resourceRequest(), request.initiatedByMainFrame());
WebCore::NavigationAction action(request.requester(), request.resourceRequest(), request.initiatedByMainFrame(), request.isRequestFromClientOrUserInput());
// FIXME: action.request and request are probably duplicate information. <rdar://116203126>
// FIXME: PolicyCheckIdentifier should probably be pushed to another layer. <rdar://116203008>
// FIXME: Get more parameters correct and add tests for each one. <rdar://116203354>
Expand Down
Loading

0 comments on commit e0471a8

Please sign in to comment.