Diff
Modified: branches/safari-610.1.7-branch/Source/WebCore/ChangeLog (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebCore/ChangeLog 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebCore/ChangeLog 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,4 +1,4 @@
-2020-03-17 Alan Coon <[email protected]>
+b"2020-03-24 Alan Coon <[email protected]>\n\n Cherry-pick r258476. rdar://problem/60839077\n\n Add missing checks needed for AppBound Quirk\n https://bugs.webkit.org/show_bug.cgi?id=209117\n <rdar://problem/60460097>\n \n Reviewed by John Wilander.\n \n The checks for the 'NeedsInAppBrowserPrivacyQuirks' flag added in r258101 was incomplete.\n Source/WebCore:\n \n Two additional call sites need to check the state of the flag.\n \n * bindings/js/ScriptController.cpp:\n (WebCore::ScriptController::executeScriptInWorld): Add missing check for the quirk.\n * loader/FrameLoaderClient.h: Add new API for the 'NeedsInAppBrowserPrivacyQuirks'\n debug flag.\n * page/Frame.cpp:\n (WebCore::Frame::injectUserScriptImmediately): Ditto.\n \n Source/WebKit:\n \n These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\n \n * WebProcess/WebCoreSupport/WebFrameLoaderCl
ient.cpp:\n (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\n * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\n * WebProcess/WebPage/WebPage.h:\n (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Added.\n \n \n git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258476 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n 2020-03-14 Brent Fulgham <[email protected]>\n\n Add missing checks needed for AppBound Quirk\n https://bugs.webkit.org/show_bug.cgi?id=209117\n <rdar://problem/60460097>\n\n Reviewed by John Wilander.\n\n The checks for the 'NeedsInAppBrowserPrivacyQuirks' flag added in r258101 was incomplete.\n Two additional call sites need to check the state of the flag.\n\n * bindings/js/ScriptController.cpp:\n (WebCore::ScriptController::executeScriptInWorld): Add missing check for the quirk.\n * loader/FrameLoad
erClient.h: Add new API for the 'NeedsInAppBrowserPrivacyQuirks'\n debug flag.\n * page/Frame.cpp:\n (WebCore::Frame::injectUserScriptImmediately): Ditto.\n\n"2020-03-17 Alan Coon <[email protected]>
Cherry-pick r258359. rdar://problem/60517387
Modified: branches/safari-610.1.7-branch/Source/WebCore/bindings/js/ScriptController.cpp (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebCore/bindings/js/ScriptController.cpp 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebCore/bindings/js/ScriptController.cpp 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1999-2001 Harri Porten ([email protected])
* Copyright (C) 2001 Peter Kelly ([email protected])
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -576,7 +576,7 @@
ValueOrException ScriptController::executeScriptInWorld(DOMWrapperWorld& world, RunJavaScriptParameters&& parameters)
{
- if (m_frame.loader().client().hasNavigatedAwayFromAppBoundDomain())
+ if (m_frame.loader().client().hasNavigatedAwayFromAppBoundDomain() && !m_frame.loader().client().needsInAppBrowserPrivacyQuirks())
return jsNull();
UserGestureIndicator gestureIndicator(parameters.forceUserGesture == ForceUserGesture::Yes ? Optional<ProcessingUserGestureState>(ProcessingUserGesture) : WTF::nullopt);
Modified: branches/safari-610.1.7-branch/Source/WebCore/loader/FrameLoaderClient.h (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebCore/loader/FrameLoaderClient.h 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebCore/loader/FrameLoaderClient.h 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -382,7 +382,7 @@
virtual AllowsContentJavaScript allowsContentJavaScriptFromMostRecentNavigation() const { return AllowsContentJavaScript::Yes; }
virtual bool hasNavigatedAwayFromAppBoundDomain() { return false; }
-
+ virtual bool needsInAppBrowserPrivacyQuirks() const { return false; }
};
} // namespace WebCore
Modified: branches/safari-610.1.7-branch/Source/WebCore/page/Frame.cpp (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebCore/page/Frame.cpp 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebCore/page/Frame.cpp 2020-03-24 20:34:47 UTC (rev 258936)
@@ -5,7 +5,7 @@
* 2000 Simon Hausmann <[email protected]>
* 2000 Stefan Schimanski <[email protected]>
* 2001 George Staikos <[email protected]>
- * Copyright (C) 2004-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2020 Apple Inc. All rights reserved.
* Copyright (C) 2005 Alexey Proskuryakov <[email protected]>
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Eric Seidel <[email protected]>
@@ -625,7 +625,7 @@
void Frame::injectUserScriptImmediately(DOMWrapperWorld& world, const UserScript& script)
{
- if (loader().client().hasNavigatedAwayFromAppBoundDomain())
+ if (loader().client().hasNavigatedAwayFromAppBoundDomain() && !loader().client().needsInAppBrowserPrivacyQuirks())
return;
auto* document = this->document();
Modified: branches/safari-610.1.7-branch/Source/WebKit/ChangeLog (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebKit/ChangeLog 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebKit/ChangeLog 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,4 +1,4 @@
-2020-03-17 Alan Coon <[email protected]>
+b"2020-03-24 Alan Coon <[email protected]>\n\n Cherry-pick r258476. rdar://problem/60839077\n\n Add missing checks needed for AppBound Quirk\n https://bugs.webkit.org/show_bug.cgi?id=209117\n <rdar://problem/60460097>\n \n Reviewed by John Wilander.\n \n The checks for the 'NeedsInAppBrowserPrivacyQuirks' flag added in r258101 was incomplete.\n Source/WebCore:\n \n Two additional call sites need to check the state of the flag.\n \n * bindings/js/ScriptController.cpp:\n (WebCore::ScriptController::executeScriptInWorld): Add missing check for the quirk.\n * loader/FrameLoaderClient.h: Add new API for the 'NeedsInAppBrowserPrivacyQuirks'\n debug flag.\n * page/Frame.cpp:\n (WebCore::Frame::injectUserScriptImmediately): Ditto.\n \n Source/WebKit:\n \n These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\n \n * WebProcess/WebCoreSupport/WebFrameLoaderCl
ient.cpp:\n (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\n * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\n * WebProcess/WebPage/WebPage.h:\n (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Added.\n \n \n git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258476 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n 2020-03-14 Brent Fulgham <[email protected]>\n\n Add missing checks needed for AppBound Quirk\n https://bugs.webkit.org/show_bug.cgi?id=209117\n <rdar://problem/60460097>\n\n Reviewed by John Wilander.\n\n The checks for the 'NeedsInAppBrowserPrivacyQuirks' flag added in r258101 was incomplete.\n These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\n\n * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:\n (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\n
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\n * WebProcess/WebPage/WebPage.h:\n (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Added.\n\n"2020-03-17 Alan Coon <[email protected]>
Cherry-pick r258515. rdar://problem/60551856
Modified: branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1962,6 +1962,16 @@
return webPage->hasNavigatedAwayFromAppBoundDomain() == NavigatedAwayFromAppBoundDomain::Yes;
}
+bool WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks() const
+{
+ auto* webPage = m_frame->page();
+ if (!webPage)
+ return false;
+
+ return webPage->needsInAppBrowserPrivacyQuirks();
+}
+
+
} // namespace WebKit
#undef PREFIX_PARAMETERS
Modified: branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -292,6 +292,7 @@
#endif
bool hasNavigatedAwayFromAppBoundDomain() final;
+ bool needsInAppBrowserPrivacyQuirks() const final;
};
// As long as EmptyFrameLoaderClient exists in WebCore, this can return 0.
Modified: branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (258935 => 258936)
--- branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-03-24 20:32:09 UTC (rev 258935)
+++ branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-03-24 20:34:47 UTC (rev 258936)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1300,7 +1300,8 @@
NavigatingToAppBoundDomain isNavigatingToAppBoundDomain() const { return m_isNavigatingToAppBoundDomain; }
NavigatedAwayFromAppBoundDomain hasNavigatedAwayFromAppBoundDomain() const { return m_hasNavigatedAwayFromAppBoundDomain; }
void setHasNavigatedAwayFromAppBoundDomain(NavigatedAwayFromAppBoundDomain navigatedAwayFromAppBoundDomain) { m_hasNavigatedAwayFromAppBoundDomain = navigatedAwayFromAppBoundDomain; }
-
+ bool needsInAppBrowserPrivacyQuirks() const { return m_needsInAppBrowserPrivacyQuirks; }
+
bool shouldUseRemoteRenderingFor(WebCore::RenderingPurpose);
private: