Bug 1596800 - Remove document.getBindingParent usage from PluginChild.jsm. r=mconley
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 18 Nov 2019 19:06:50 +0000
changeset 502471 5bc4fbe48df7276c4b6da448e9b85953620ac913
parent 502470 85408aaba4a32de2ecf495093f24643e93154292
child 502472 cceae677e859c9915d895bee2783ca1c0c34a296
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1596800
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596800 - Remove document.getBindingParent usage from PluginChild.jsm. r=mconley It wants to get the containing shadow host of the target to get to the plugin. Do that explicitly. Depends on D53337 Differential Revision: https://phabricator.services.mozilla.com/D53338
browser/actors/PluginChild.jsm
--- a/browser/actors/PluginChild.jsm
+++ b/browser/actors/PluginChild.jsm
@@ -702,18 +702,17 @@ class PluginChild extends JSWindowActorC
     }
 
     if (overlay) {
       overlay.addEventListener("click", this, true);
     }
   }
 
   onOverlayClick(event) {
-    let document = event.target.ownerDocument;
-    let plugin = document.getBindingParent(event.target);
+    let plugin = event.target.containingShadowRoot.host;
     let overlay = this.getPluginUI(plugin, "main");
     // Have to check that the target is not the link to update the plugin
     if (
       !(
         ChromeUtils.getClassName(event.originalTarget) === "HTMLAnchorElement"
       ) &&
       event.originalTarget.getAttribute("anonid") != "closeIcon" &&
       event.originalTarget.id != "closeIcon" &&