Bug 1404917 - Use request.mimeType instead of request.responseContent.content.mimeType. r=Honza

MozReview-Commit-ID: EIaS1CFKzVn

--HG--
extra : rebase_source : 814ac3fd2713c89387049b92e0c857e8b9b2f8e4
This commit is contained in:
Alexandre Poirot 2017-10-05 17:42:51 +02:00
Родитель 85d099995a
Коммит 533133afc6
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -126,8 +126,8 @@ RequestListContextMenu.prototype = {
label: L10N.getStr("netmonitor.context.copyImageAsDataUri"),
accesskey: L10N.getStr("netmonitor.context.copyImageAsDataUri.accesskey"),
visible: !!(selectedRequest &&
selectedRequest.responseContent &&
selectedRequest.responseContent.content.mimeType.includes("image/")),
selectedRequest.mimeType &&
selectedRequest.mimeType.includes("image/")),
click: () => this.copyImageAsDataUri(),
});
@ -164,8 +164,8 @@ RequestListContextMenu.prototype = {
label: L10N.getStr("netmonitor.context.saveImageAs"),
accesskey: L10N.getStr("netmonitor.context.saveImageAs.accesskey"),
visible: !!(selectedRequest &&
selectedRequest.responseContent &&
selectedRequest.responseContent.content.mimeType.includes("image/")),
selectedRequest.mimeType &&
selectedRequest.mimeType.includes("image/")),
click: () => this.saveImageAs(),
});
@ -200,8 +200,8 @@ RequestListContextMenu.prototype = {
label: L10N.getStr("netmonitor.context.openInDebugger"),
accesskey: L10N.getStr("netmonitor.context.openInDebugger.accesskey"),
visible: !!(selectedRequest &&
selectedRequest.responseContent &&
selectedRequest.responseContent.content.mimeType.includes("javascript")),
selectedRequest.mimeType &&
selectedRequest.mimeType.includes("javascript")),
click: () => this.openInDebugger()
});
@ -210,9 +210,9 @@ RequestListContextMenu.prototype = {
label: L10N.getStr("netmonitor.context.openInStyleEditor"),
accesskey: L10N.getStr("netmonitor.context.openInStyleEditor.accesskey"),
visible: !!(selectedRequest &&
selectedRequest.responseContent &&
Services.prefs.getBoolPref("devtools.styleeditor.enabled") &&
selectedRequest.responseContent.content.mimeType.includes("css")),
selectedRequest.mimeType &&
selectedRequest.mimeType.includes("css")),
click: () => this.openInStyleEditor()
});