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:
@@ -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:");
|
||||
};
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user