Diff
Modified: trunk/Source/WebCore/ChangeLog (271010 => 271011)
--- trunk/Source/WebCore/ChangeLog 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/ChangeLog 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1,3 +1,27 @@
+2020-12-19 Rob Buis <[email protected]>
+
+ Move FrameLoader::arePluginsEnabled to Frame
+ https://bugs.webkit.org/show_bug.cgi?id=220022
+
+ Reviewed by Sam Weinig.
+
+ The arePluginsEnabled functionality is not tied
+ to FrameLoader, so move it to Frame to save
+ some indirections.
+
+ * dom/DOMImplementation.cpp:
+ (WebCore::DOMImplementation::createDocument):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::rendererIsEverNeeded):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::arePluginsEnabled): Deleted.
+ * loader/FrameLoader.h:
+ * loader/SubframeLoader.cpp:
+ (WebCore::FrameLoader::SubframeLoader::requestPlugin):
+ * page/Frame.cpp:
+ (WebCore::Frame::arePluginsEnabled):
+ * page/Frame.h:
+
2020-12-19 Zalan Bujtas <[email protected]>
[LFC][Integration] Remove redundant InlineContent::InlineBox
Modified: trunk/Source/WebCore/dom/DOMImplementation.cpp (271010 => 271011)
--- trunk/Source/WebCore/dom/DOMImplementation.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/dom/DOMImplementation.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -172,7 +172,7 @@
// The following is the relatively costly lookup that requires initializing the plug-in database.
if (frame && frame->page()) {
- auto allowedPluginTypes = frame->loader().arePluginsEnabled()
+ auto allowedPluginTypes = frame->arePluginsEnabled()
? PluginData::AllPlugins : PluginData::OnlyApplicationPlugins;
if (frame->page()->pluginData().supportsWebVisibleMimeType(contentType, allowedPluginTypes))
return PluginDocument::create(*frame, url);
Modified: trunk/Source/WebCore/html/HTMLElement.cpp (271010 => 271011)
--- trunk/Source/WebCore/html/HTMLElement.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -783,7 +783,7 @@
return false;
} else if (hasTagName(noembedTag)) {
RefPtr<Frame> frame = document().frame();
- if (frame && frame->loader().arePluginsEnabled())
+ if (frame && frame->arePluginsEnabled())
return false;
}
return StyledElement::rendererIsEverNeeded();
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (271010 => 271011)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -4179,11 +4179,6 @@
return m_frame.settings().shouldSuppressTextInputFromEditingDuringProvisionalNavigation() && m_state == FrameStateProvisional;
}
-bool FrameLoader::arePluginsEnabled()
-{
- return m_frame.settings().arePluginsEnabled();
-}
-
} // namespace WebCore
#undef PAGE_ID
Modified: trunk/Source/WebCore/loader/FrameLoader.h (271010 => 271011)
--- trunk/Source/WebCore/loader/FrameLoader.h 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/loader/FrameLoader.h 2020-12-20 07:15:48 UTC (rev 271011)
@@ -321,8 +321,6 @@
// For subresource requests the FrameLoadType parameter has no effect and can be skipped.
void addExtraFieldsToRequest(ResourceRequest&, IsMainResource, FrameLoadType = FrameLoadType::Standard);
- WEBCORE_EXPORT bool arePluginsEnabled();
-
private:
enum FormSubmissionCacheLoadPolicy {
MayAttemptCacheOnlyLoadForFormSubmissionItem,
Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (271010 => 271011)
--- trunk/Source/WebCore/loader/SubframeLoader.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -177,7 +177,7 @@
// Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
// as opposed to third-party code such as Flash. The user agent decides whether or not they are
// permitted, rather than WebKit.
- if (!(m_frame.settings().arePluginsEnabled() || MIMETypeRegistry::isApplicationPluginMIMEType(mimeType)))
+ if (!(m_frame.arePluginsEnabled() || MIMETypeRegistry::isApplicationPluginMIMEType(mimeType)))
return false;
if (!pluginIsLoadable(url, explicitMIMEType))
Modified: trunk/Source/WebCore/page/Frame.cpp (271010 => 271011)
--- trunk/Source/WebCore/page/Frame.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/page/Frame.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1149,6 +1149,11 @@
return ts;
}
+bool Frame::arePluginsEnabled()
+{
+ return settings().arePluginsEnabled();
+}
+
} // namespace WebCore
#undef RELEASE_LOG_ERROR_IF_ALLOWED
Modified: trunk/Source/WebCore/page/Frame.h (271010 => 271011)
--- trunk/Source/WebCore/page/Frame.h 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebCore/page/Frame.h 2020-12-20 07:15:48 UTC (rev 271011)
@@ -317,6 +317,8 @@
void selfOnlyRef();
void selfOnlyDeref();
+ WEBCORE_EXPORT bool arePluginsEnabled();
+
private:
friend class NavigationDisabler;
Modified: trunk/Source/WebKit/ChangeLog (271010 => 271011)
--- trunk/Source/WebKit/ChangeLog 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKit/ChangeLog 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1,3 +1,22 @@
+2020-12-19 Rob Buis <[email protected]>
+
+ Move FrameLoader::arePluginsEnabled to Frame
+ https://bugs.webkit.org/show_bug.cgi?id=220022
+
+ Reviewed by Sam Weinig.
+
+ Adapt to API change.
+
+ * WebProcess/Plugins/WebPluginInfoProvider.cpp:
+ (WebKit::WebPluginInfoProvider::pluginInfo):
+ (WebKit::WebPluginInfoProvider::populatePluginCache):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::objectContentType):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::createPlugin):
+ (WebKit::WebPage::canPluginHandleResponse):
+ (WebKit::WebPage::canShowMIMEType const):
+
2020-12-19 Brent Fulgham <[email protected]>
REGRESSION(r270575): [iOS] Correct GPU Process sandbox syntax error
Modified: trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp (271010 => 271011)
--- trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -78,7 +78,7 @@
if (m_cachedSupportedPluginIdentifiers)
supportedPluginIdentifiers = *m_cachedSupportedPluginIdentifiers;
- return page.mainFrame().loader().arePluginsEnabled() ? m_cachedPlugins : m_cachedApplicationPlugins;
+ return page.mainFrame().arePluginsEnabled() ? m_cachedPlugins : m_cachedApplicationPlugins;
#else
UNUSED_PARAM(page);
UNUSED_PARAM(supportedPluginIdentifiers);
@@ -121,7 +121,7 @@
// Application plugins are not affected by enablePlugins setting, so we always need to scan plugins to get them.
bool shouldScanPlugins = true;
#else
- bool shouldScanPlugins = page.mainFrame().loader().arePluginsEnabled();
+ bool shouldScanPlugins = page.mainFrame().arePluginsEnabled();
#endif
if (shouldScanPlugins) {
HangDetectionDisabler hangDetectionDisabler;
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (271010 => 271011)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1693,7 +1693,7 @@
return ObjectContentType::Image;
if (WebPage* webPage = m_frame->page()) {
- auto allowedPluginTypes = webFrame().coreFrame()->loader().arePluginsEnabled()
+ auto allowedPluginTypes = webFrame().coreFrame()->arePluginsEnabled()
? PluginData::AllPlugins : PluginData::OnlyApplicationPlugins;
if (webPage->corePage()->pluginData().supportsMimeType(mimeType, allowedPluginTypes))
return ObjectContentType::PlugIn;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (271010 => 271011)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1072,7 +1072,7 @@
String frameURLString = frame->coreFrame()->loader().documentLoader()->responseURL().string();
String pageURLString = m_page->mainFrame().loader().documentLoader()->responseURL().string();
- bool allowOnlyApplicationPlugins = !frame->coreFrame()->loader().arePluginsEnabled();
+ bool allowOnlyApplicationPlugins = !frame->coreFrame()->arePluginsEnabled();
uint64_t pluginProcessToken;
uint32_t pluginLoadPolicy;
@@ -5437,7 +5437,7 @@
{
#if ENABLE(NETSCAPE_PLUGIN_API)
uint32_t pluginLoadPolicy;
- bool allowOnlyApplicationPlugins = !m_mainFrame->coreFrame()->loader().arePluginsEnabled();
+ bool allowOnlyApplicationPlugins = !m_mainFrame->coreFrame()->arePluginsEnabled();
uint64_t pluginProcessToken;
String newMIMEType;
@@ -5974,7 +5974,7 @@
if (!mimeType.isNull() && m_mimeTypesWithCustomContentProviders.contains(mimeType))
return true;
- if (corePage()->mainFrame().loader().arePluginsEnabled() && pluginsSupport(mimeType, PluginData::AllPlugins))
+ if (corePage()->mainFrame().arePluginsEnabled() && pluginsSupport(mimeType, PluginData::AllPlugins))
return true;
// We can use application plugins even if plugins aren't enabled.
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (271010 => 271011)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1,3 +1,17 @@
+2020-12-19 Rob Buis <[email protected]>
+
+ Move FrameLoader::arePluginsEnabled to Frame
+ https://bugs.webkit.org/show_bug.cgi?id=220022
+
+ Reviewed by Sam Weinig.
+
+ Adapt to API change.
+
+ * WebCoreSupport/WebPluginInfoProvider.mm:
+ (WebPluginInfoProvider::pluginInfo):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _canProvideDocumentSource]):
+
2020-12-18 Megan Gardner <[email protected]>
Gate all of the code associated with app highlights
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm (271010 => 271011)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm 2020-12-20 07:15:48 UTC (rev 271011)
@@ -62,7 +62,7 @@
// WebKit1 has no application plug-ins, so we don't need to add them here.
- if (!page.mainFrame().loader().arePluginsEnabled())
+ if (!page.mainFrame().arePluginsEnabled())
return plugins;
for (WebPluginPackage *plugin in [WebPluginDatabase sharedDatabase].plugins)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm (271010 => 271011)
--- trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2020-12-20 07:15:48 UTC (rev 271011)
@@ -967,7 +967,7 @@
if (WebCore::MIMETypeRegistry::isTextMIMEType(mimeType)
|| WebCore::Image::supportsType(mimeType)
- || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::AllPlugins) && frame->loader().arePluginsEnabled())
+ || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::AllPlugins) && frame->arePluginsEnabled())
|| (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::OnlyApplicationPlugins)))
return NO;
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (271010 => 271011)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2020-12-20 07:15:48 UTC (rev 271011)
@@ -1,3 +1,15 @@
+2020-12-19 Rob Buis <[email protected]>
+
+ Move FrameLoader::arePluginsEnabled to Frame
+ https://bugs.webkit.org/show_bug.cgi?id=220022
+
+ Reviewed by Sam Weinig.
+
+ Adapt to API change.
+
+ * WebView.cpp:
+ (WebView::canShowMIMEType):
+
2020-12-14 Chris Dumez <[email protected]>
Unreviewed, reverting r270768.
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (271010 => 271011)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2020-12-20 04:17:02 UTC (rev 271010)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2020-12-20 07:15:48 UTC (rev 271011)
@@ -2974,7 +2974,7 @@
bool WebView::canShowMIMEType(const String& mimeType)
{
Frame* coreFrame = core(m_mainFrame);
- bool arePluginsEnabled = coreFrame && coreFrame->loader().arePluginsEnabled();
+ bool arePluginsEnabled = coreFrame && coreFrame->arePluginsEnabled();
bool canShow = MIMETypeRegistry::isSupportedImageMIMEType(mimeType)
|| MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)