Bug 936047 - Switch rule and computed view contextmenus to use openPopupAtScreen. r=paul, a=bajaj
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Tue, 12 Nov 2013 16:27:55 +0000
changeset 166542 5b41730c0818af79d044f401baf26757346c06bb
parent 166541 ca13c2892cc0676ffc1af559696536e06e4b0b1c
child 166543 54e542735ccea4921d461a186b7accc3bf01a437
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul, bajaj
bugs936047
milestone27.0a2
Bug 936047 - Switch rule and computed view contextmenus to use openPopupAtScreen. r=paul, a=bajaj
browser/devtools/styleinspector/computed-view.js
browser/devtools/styleinspector/rule-view.js
--- a/browser/devtools/styleinspector/computed-view.js
+++ b/browser/devtools/styleinspector/computed-view.js
@@ -563,20 +563,17 @@ CssHtmlTree.prototype = {
   },
 
   /**
    * Context menu handler.
    */
   _onContextMenu: function(event) {
     try {
       this.styleDocument.defaultView.focus();
-
-      this._contextmenu.openPopup(
-          event.target.ownerDocument.documentElement,
-          "overlap", event.clientX, event.clientY, true, false, null);
+      this._contextmenu.openPopupAtScreen(event.screenX, event.screenY, true);
     } catch(e) {
       console.error(e);
     }
   },
 
   /**
    * Select all text.
    */
--- a/browser/devtools/styleinspector/rule-view.js
+++ b/browser/devtools/styleinspector/rule-view.js
@@ -1610,19 +1610,19 @@ RuleEditor.prototype = {
     this.element.addEventListener("contextmenu", event => {
       try {
         // In the sidebar we do not have this.doc.popupNode so we need to save
         // the node ourselves.
         this.doc.popupNode = event.explicitOriginalTarget;
         let win = this.doc.defaultView;
         win.focus();
 
-        this.ruleView._contextmenu.openPopup(
-          event.target.ownerDocument.documentElement,
-          "overlap", event.clientX, event.clientY, true, false, null);
+        this.ruleView._contextmenu.openPopupAtScreen(
+          event.screenX, event.screenY, true);
+
       } catch(e) {
         console.error(e);
       }
     }, false);
 
     this.propertyList = createChild(code, "ul", {
       class: "ruleview-propertylist"
     });