Title: [258296] trunk/Source/WebKit
- Revision
- 258296
- Author
- katherine_che...@apple.com
- Date
- 2020-03-11 16:53:58 -0700 (Wed, 11 Mar 2020)
Log Message
Add a parameter to allow ignoring app-bound domain categorization
https://bugs.webkit.org/show_bug.cgi?id=208949
<rdar://problem/60239187>
Reviewed by Brent Fulgham.
Introduce a new parameter to ignore app-bound domain categorization
for specific WebViews.
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::ignoresAppBoundDomains const):
(API::PageConfiguration::setIgnoresAppBoundDomains):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _ignoresAppBoundDomains]):
(-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (258295 => 258296)
--- trunk/Source/WebKit/ChangeLog 2020-03-11 23:49:59 UTC (rev 258295)
+++ trunk/Source/WebKit/ChangeLog 2020-03-11 23:53:58 UTC (rev 258296)
@@ -1,3 +1,24 @@
+2020-03-11 Kate Cheney <katherine_che...@apple.com>
+
+ Add a parameter to allow ignoring app-bound domain categorization
+ https://bugs.webkit.org/show_bug.cgi?id=208949
+ <rdar://problem/60239187>
+
+ Reviewed by Brent Fulgham.
+
+ Introduce a new parameter to ignore app-bound domain categorization
+ for specific WebViews.
+
+ * UIProcess/API/APIPageConfiguration.h:
+ (API::PageConfiguration::ignoresAppBoundDomains const):
+ (API::PageConfiguration::setIgnoresAppBoundDomains):
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+ (-[WKWebViewConfiguration _ignoresAppBoundDomains]):
+ (-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]):
+ * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
+
2020-03-11 Per Arne Vollan <pvol...@apple.com>
[macOS] _AXSApplicationAccessibilityEnabled should not be called
Modified: trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp (258295 => 258296)
--- trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp 2020-03-11 23:49:59 UTC (rev 258295)
+++ trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp 2020-03-11 23:53:58 UTC (rev 258296)
@@ -94,6 +94,7 @@
copy->m_webViewCategory = this->m_webViewCategory;
copy->m_processDisplayName = this->m_processDisplayName;
+ copy->m_ignoresAppBoundDomains = this->m_ignoresAppBoundDomains;
return copy;
}
Modified: trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.h (258295 => 258296)
--- trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.h 2020-03-11 23:49:59 UTC (rev 258295)
+++ trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.h 2020-03-11 23:53:58 UTC (rev 258296)
@@ -147,6 +147,9 @@
WebKit::WebViewCategory webViewCategory() const { return m_webViewCategory; }
void setWebViewCategory(WebKit::WebViewCategory category) { m_webViewCategory = category; }
+ bool ignoresAppBoundDomains() const { return m_ignoresAppBoundDomains; }
+ void setIgnoresAppBoundDomains(bool shouldIgnore) { m_ignoresAppBoundDomains = shouldIgnore; }
+
private:
RefPtr<WebKit::WebProcessPool> m_processPool;
@@ -187,6 +190,7 @@
bool m_crossOriginAccessControlCheckEnabled { true };
WTF::String m_processDisplayName;
WebKit::WebViewCategory m_webViewCategory { WebKit::WebViewCategory::AppBoundDomain };
+ bool m_ignoresAppBoundDomains { false };
};
} // namespace API
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (258295 => 258296)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2020-03-11 23:49:59 UTC (rev 258295)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2020-03-11 23:53:58 UTC (rev 258296)
@@ -1210,6 +1210,16 @@
_pageConfiguration->setWebViewCategory(toWebKitWebViewCategory(category));
}
+- (BOOL)_ignoresAppBoundDomains
+{
+ return _pageConfiguration->ignoresAppBoundDomains();
+}
+
+- (void)_setIgnoresAppBoundDomains:(BOOL)ignoresAppBoundDomains
+{
+ _pageConfiguration->setIgnoresAppBoundDomains(ignoresAppBoundDomains);
+}
+
- (NSString *)_processDisplayName
{
return _pageConfiguration->processDisplayName();
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (258295 => 258296)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h 2020-03-11 23:49:59 UTC (rev 258295)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h 2020-03-11 23:53:58 UTC (rev 258296)
@@ -122,6 +122,7 @@
@property (nonatomic, setter=_setEditableImagesEnabled:) BOOL _editableImagesEnabled WK_API_AVAILABLE(macos(10.14.4), ios(12.2));
@property (nonatomic, setter=_setUndoManagerAPIEnabled:) BOOL _undoManagerAPIEnabled WK_API_AVAILABLE(macos(10.15), ios(13.0));
@property (nonatomic, setter=_setWebViewCategory:) _WKWebViewCategory _webViewCategory WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setIgnoresAppBoundDomains:) BOOL _ignoresAppBoundDomains WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, setter=_setProcessDisplayName:) NSString *_processDisplayName WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (258295 => 258296)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-03-11 23:49:59 UTC (rev 258295)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-03-11 23:53:58 UTC (rev 258296)
@@ -3100,6 +3100,8 @@
void WebPageProxy::setIsNavigatingToAppBoundDomain(bool isMainFrame, const URL& requestURL, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain)
{
if (isMainFrame && (m_preferences->isInAppBrowserPrivacyEnabled() || WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN_2)) {
+ if (m_configuration->ignoresAppBoundDomains())
+ return;
WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN
if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::No && shouldBeTreatedAsAppBound(requestURL))
isNavigatingToAppBoundDomain = NavigatingToAppBoundDomain::Yes;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes