Title: [269985] trunk
Revision
269985
Author
[email protected]
Date
2020-11-18 14:04:27 -0800 (Wed, 18 Nov 2020)

Log Message

Remove advanced plug-in feature: small plug-in blocking
https://bugs.webkit.org/show_bug.cgi?id=219101

Reviewed by Anders Carlsson.

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::pluginIsSmall): Deleted.
(WebKit::WebPage::createPlugin): Removed code that blocks small plug-ins.

Source/WTF:

* Scripts/Preferences/WebPreferencesInternal.yaml: Removed BlockingOfSmallPluginsEnabled.

LayoutTests:

* platform/mac-wk1/TestExpectations: Removed small-plugin-blocked.html.
* plugins/small-plugin-blocked-expected.txt: Removed.
* plugins/small-plugin-blocked.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (269984 => 269985)


--- trunk/LayoutTests/ChangeLog	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/LayoutTests/ChangeLog	2020-11-18 22:04:27 UTC (rev 269985)
@@ -1,3 +1,14 @@
+2020-11-18  Darin Adler  <[email protected]>
+
+        Remove advanced plug-in feature: small plug-in blocking
+        https://bugs.webkit.org/show_bug.cgi?id=219101
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac-wk1/TestExpectations: Removed small-plugin-blocked.html.
+        * plugins/small-plugin-blocked-expected.txt: Removed.
+        * plugins/small-plugin-blocked.html: Removed.
+
 2020-11-18  Chris Dumez  <[email protected]>
 
         Unreviewed, unskip more webaudio tests on Rosetta.

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (269984 => 269985)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-11-18 22:04:27 UTC (rev 269985)
@@ -381,9 +381,6 @@
 fast/forms/validation-message-appearance.html
 fast/forms/validation-message-on-textarea.html
 
-# Disable small plugin blocking on WK1
-plugins/small-plugin-blocked.html [ Skip ]
-
 # WK1 doesn't do pending WebGL policies 
 fast/canvas/webgl/useWhilePending.html [ Skip ]
 

Deleted: trunk/LayoutTests/plugins/small-plugin-blocked-expected.txt (269984 => 269985)


--- trunk/LayoutTests/plugins/small-plugin-blocked-expected.txt	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/LayoutTests/plugins/small-plugin-blocked-expected.txt	2020-11-18 22:04:27 UTC (rev 269985)
@@ -1,17 +0,0 @@
-This tests that small plugins are blocked
-
-0x0 is BLOCKED
-
-1x1 is BLOCKED
-
-4x4 is BLOCKED
-
-5x5 is BLOCKED
-
-6x6 is RUNNING
-
-1x6 is RUNNING
-
-6x1 is RUNNING
-
-

Deleted: trunk/LayoutTests/plugins/small-plugin-blocked.html (269984 => 269985)


--- trunk/LayoutTests/plugins/small-plugin-blocked.html	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/LayoutTests/plugins/small-plugin-blocked.html	2020-11-18 22:04:27 UTC (rev 269985)
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<p>This tests that small plugins are blocked</p>
-<div id="result"></div>
-<script>
-function log(destination, msg)
-{
-    var t = document.createTextNode(msg);
-    var p = document.createElement("p");
-    p.appendChild(t);
-    destination.appendChild(p);
-}
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-    setTimeout(function () {
-        const result = document.getElementById("result");
-        for (id of ["0x0", "1x1", "4x4", "5x5", "6x6", "1x6", "6x1"]) {
-            const embed = document.getElementById(`plugin${id}`);
-            log(result, `${id} is ${internals.pluginIsBelowSizeThreshold(embed) ? "BLOCKED" : "RUNNING"}`);
-        }
-        testRunner.notifyDone();
-    }, 500);
-}
-</script>
-<embed id="plugin0x0" type="application/x-webkit-test-netscape" width="0" height="0"></embed>
-<embed id="plugin1x1" type="application/x-webkit-test-netscape" width="1" height="1"></embed>
-<embed id="plugin4x4" type="application/x-webkit-test-netscape" width="4" height="4"></embed>
-<embed id="plugin5x5" type="application/x-webkit-test-netscape" width="5" height="5"></embed>
-<embed id="plugin6x6" type="application/x-webkit-test-netscape" width="6" height="6"></embed>
-<embed id="plugin1x6" type="application/x-webkit-test-netscape" width="1" height="6"></embed>
-<embed id="plugin6x1" type="application/x-webkit-test-netscape" width="6" height="1"></embed>

Modified: trunk/Source/WTF/ChangeLog (269984 => 269985)


--- trunk/Source/WTF/ChangeLog	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/Source/WTF/ChangeLog	2020-11-18 22:04:27 UTC (rev 269985)
@@ -1,3 +1,12 @@
+2020-11-18  Darin Adler  <[email protected]>
+
+        Remove advanced plug-in feature: small plug-in blocking
+        https://bugs.webkit.org/show_bug.cgi?id=219101
+
+        Reviewed by Anders Carlsson.
+
+        * Scripts/Preferences/WebPreferencesInternal.yaml: Removed BlockingOfSmallPluginsEnabled.
+
 2020-11-18  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, relanding r269940

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (269984 => 269985)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2020-11-18 22:04:27 UTC (rev 269985)
@@ -121,19 +121,6 @@
     WebCore:
       default: false
 
-# FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
-BlockingOfSmallPluginsEnabled:
-  type: bool
-  humanReadableName: "Block small plugins"
-  humanReadableDescription: "Stop plugins smaller than a certain threshold from loading."
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: true
-    WebCore:
-      default: true
-
 CSSLogicalEnabled:
   type: bool
   humanReadableName: "CSS Logical Properties and Values"

Modified: trunk/Source/WebKit/ChangeLog (269984 => 269985)


--- trunk/Source/WebKit/ChangeLog	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/Source/WebKit/ChangeLog	2020-11-18 22:04:27 UTC (rev 269985)
@@ -1,3 +1,14 @@
+2020-11-18  Darin Adler  <[email protected]>
+
+        Remove advanced plug-in feature: small plug-in blocking
+        https://bugs.webkit.org/show_bug.cgi?id=219101
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::pluginIsSmall): Deleted.
+        (WebKit::WebPage::createPlugin): Removed code that blocks small plug-ins.
+
 2020-11-18  Simon Fraser  <[email protected]>
 
         Propagate wheel event handling back to the scrolling thread

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (269984 => 269985)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2020-11-18 22:04:09 UTC (rev 269984)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2020-11-18 22:04:27 UTC (rev 269985)
@@ -1048,18 +1048,6 @@
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
 
-constexpr int smallPluginDimensionThreshold = 5;
-
-static bool pluginIsSmall(WebCore::HTMLPlugInElement& pluginElement)
-{
-    auto* renderer = pluginElement.renderer();
-    if (!is<RenderEmbeddedObject>(*renderer))
-        return false;
-
-    auto& box = downcast<RenderBox>(*renderer);
-    return box.contentWidth() <= smallPluginDimensionThreshold && box.contentHeight() <= smallPluginDimensionThreshold;
-}
-
 RefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* pluginElement, const Plugin::Parameters& parameters, String& newMIMEType)
 {
     String frameURLString = frame->coreFrame()->loader().documentLoader()->responseURL().string();
@@ -1099,12 +1087,6 @@
     if (!pluginProcessToken)
         return nullptr;
 
-    if (m_page->settings().blockingOfSmallPluginsEnabled() && pluginIsSmall(*pluginElement)) {
-        RELEASE_LOG_IF_ALLOWED(Plugins, "createPlugin: Blocking a plugin because it is too small");
-        pluginElement->setReplacement(RenderEmbeddedObject::PluginTooSmall, pluginTooSmallText());
-        return nullptr;
-    }
-
     return PluginProxy::create(pluginProcessToken);
 }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to