diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-08-17 16:04:48 +0300 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-08-17 16:04:48 +0300 |
commit | d601fa8064092837387b0b34704ac4dc3eaaebdb (patch) | |
tree | e57e145aff90d0c50f59ee71ea04fc60158c02fd /application | |
parent | 8f4da03e626a75a24f4e33834f379d5191495c6e (diff) | |
download | aura-central-d601fa8064092837387b0b34704ac4dc3eaaebdb.tar.gz |
[PALEMOON] Align viewPartialSource with the UXP codebase
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/base/content/nsContextMenu.js | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js index 19b2fac77..1d4f88816 100644 --- a/application/palemoon/base/content/nsContextMenu.js +++ b/application/palemoon/base/content/nsContextMenu.js @@ -838,30 +838,8 @@ nsContextMenu.prototype = { // View Partial Source viewPartialSource: function(aContext) { - var focusedWindow = document.commandDispatcher.focusedWindow; - if (focusedWindow == window) - focusedWindow = content; - - var docCharset = null; - if (focusedWindow) - docCharset = "charset=" + focusedWindow.document.characterSet; - - // "View Selection Source" and others such as "View MathML Source" - // are mutually exclusive, with the precedence given to the selection - // when there is one - var reference = null; - if (aContext == "selection") - reference = focusedWindow.getSelection(); - else if (aContext == "mathml") - reference = this.target; - else - throw "not reached"; - - // unused (and play nice for fragments generated via XSLT too) - var docUrl = null; - window.openDialog("chrome://global/content/viewPartialSource.xul", - "_blank", "scrollbars,resizable,chrome,dialog=no", - docUrl, docCharset, reference, aContext); + let target = aContext == "mathml" ? this.target : null; + top.gViewSourceUtils.viewPartialSourceInBrowser(gBrowser.selectedBrowser, target); }, // Open new "view source" window with the frame's URL. |