Bug 1365626 - Remove View MathML Source feature. r=mconley

The in-tree version of View MathML Source appears to have low usage, so it seems
reasonable to remove.  A similar feature is available as an add-on.

In recent months, the in-tree version has actually been broken, which wasn't
noticed for quite a while.  This adds further evidence for removal given the
lack of maintenance and interest in this feature.

Differential Revision: https://phabricator.services.mozilla.com/D1830
This commit is contained in:
J. Ryan Stinnett
2018-06-28 20:45:31 +00:00
parent 4c419470f4
commit 0dcd6d60ba
9 changed files with 9 additions and 187 deletions

View File

@@ -320,6 +320,5 @@ ViewSourceBrowser.prototype = {
* String containing the URI
*/
ViewSourceBrowser.isViewSource = function(uri) {
return uri.startsWith("view-source:") ||
(uri.startsWith("data:") && uri.includes("MathML"));
return uri.startsWith("view-source:");
};

View File

@@ -50,8 +50,7 @@ var ViewSourceContent = {
get isViewSource() {
let uri = content.document.documentURI;
return uri.startsWith("view-source:") ||
(uri.startsWith("data:") && uri.includes("MathML"));
return uri.startsWith("view-source:");
},
get isAboutBlank() {

View File

@@ -110,12 +110,10 @@ var gViewSourceUtils = {
*
* @param aViewSourceInBrowser
* The browser containing the page to view the source of.
* @param aTarget
* Set to the target node for MathML. Null for other types of elements.
* @param aGetBrowserFn
* A function that will return a browser to open the source in.
*/
viewPartialSourceInBrowser(aViewSourceInBrowser, aTarget, aGetBrowserFn) {
viewPartialSourceInBrowser(aViewSourceInBrowser, aGetBrowserFn) {
let mm = aViewSourceInBrowser.messageManager;
mm.addMessageListener("ViewSource:GetSelectionDone", function gotSelection(message) {
mm.removeMessageListener("ViewSource:GetSelectionDone", gotSelection);
@@ -125,10 +123,10 @@ var gViewSourceUtils = {
let viewSourceBrowser = new ViewSourceBrowser(aGetBrowserFn());
viewSourceBrowser.loadViewSourceFromSelection(message.data.uri, message.data.drawSelection,
message.data.baseURI);
message.data.baseURI);
});
mm.sendAsyncMessage("ViewSource:GetSelection", { }, { target: aTarget });
mm.sendAsyncMessage("ViewSource:GetSelection");
},
buildEditorArgs(aPath, aLineNumber) {