Bug 1495588 - Prevent the parent frame from getting handled UA Widget events r=kmag,smaug
authorTimothy Guan-tin Chien <timdream@gmail.com>
Wed, 03 Oct 2018 15:14:46 +0000
changeset 495151 edfd1b8910f6f6762607fe9431f6905deba4b73a
parent 495150 8660ad891a23c389512aa8d9d1fb122096df6741
child 495152 ba9d952a37de83181cbf5e2ab3f35032401c75c8
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, smaug
bugs1495588
milestone64.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 1495588 - Prevent the parent frame from getting handled UA Widget events r=kmag,smaug This can happen when the message manager is associated to an embedded frame, like an <iframe mozbrowser>. Differential Revision: https://phabricator.services.mozilla.com/D7362
browser/actors/UAWidgetsChild.jsm
--- a/browser/actors/UAWidgetsChild.jsm
+++ b/browser/actors/UAWidgetsChild.jsm
@@ -21,16 +21,20 @@ class UAWidgetsChild extends ActorChild 
       case "UAWidgetBindToTree":
       case "UAWidgetAttributeChanged":
         this.setupOrNotifyWidget(aEvent.target);
         break;
       case "UAWidgetUnbindFromTree":
         this.teardownWidget(aEvent.target);
         break;
     }
+
+    // In case we are a nested frame, prevent the message manager of the
+    // parent frame from receving the event.
+    aEvent.stopPropagation();
   }
 
   setupOrNotifyWidget(aElement) {
     let widget = this.widgets.get(aElement);
     if (!widget) {
       this.setupWidget(aElement);
       return;
     }