Bug 1350229 - Removing Preview side panel. r=rickychien.
☠☠ backed out by 03d602fd723a ☠ ☠
authorLocke Chen <locke12456@gmail.com>
Wed, 29 Mar 2017 23:29:00 +0800
changeset 350473 3d0faaeb8496a480c5b9ddcc43ac89aafc5999b6
parent 350472 503b627f4d4b44ad0cf494491f9e0bb7b6606007
child 350474 167d391cabb980291a96424a03e1bbe94244d2a8
push id88643
push userihsiao@mozilla.com
push dateThu, 30 Mar 2017 09:49:05 +0000
treeherdermozilla-inbound@167d391cabb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrickychien
bugs1350229
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1350229 - Removing Preview side panel. r=rickychien.
devtools/client/netmonitor/src/components/moz.build
devtools/client/netmonitor/src/components/preview-panel.js
devtools/client/netmonitor/src/components/tabbox-panel.js
--- a/devtools/client/netmonitor/src/components/moz.build
+++ b/devtools/client/netmonitor/src/components/moz.build
@@ -7,17 +7,16 @@ DevToolsModules(
     'cookies-panel.js',
     'custom-request-panel.js',
     'editor.js',
     'headers-panel.js',
     'mdn-link.js',
     'monitor-panel.js',
     'network-details-panel.js',
     'params-panel.js',
-    'preview-panel.js',
     'properties-view.js',
     'request-list-content.js',
     'request-list-empty-notice.js',
     'request-list-header.js',
     'request-list-item.js',
     'request-list.js',
     'response-panel.js',
     'security-panel.js',
deleted file mode 100644
--- a/devtools/client/netmonitor/src/components/preview-panel.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const { DOM, PropTypes } = require("devtools/client/shared/vendor/react");
-
-const { div, iframe } = DOM;
-
-/*
- * Preview panel component
- * Display HTML content within a sandbox enabled iframe
- */
-function PreviewPanel({ request }) {
-  const htmlBody = request.responseContent ?
-    request.responseContent.content.text : "";
-
-  return (
-    div({ className: "panel-container" },
-      iframe({
-        sandbox: "",
-        srcDoc: typeof htmlBody === "string" ? htmlBody : "",
-      })
-    )
-  );
-}
-
-PreviewPanel.displayName = "PreviewPanel";
-
-PreviewPanel.propTypes = {
-  request: PropTypes.object.isRequired,
-};
-
-module.exports = PreviewPanel;
--- a/devtools/client/netmonitor/src/components/tabbox-panel.js
+++ b/devtools/client/netmonitor/src/components/tabbox-panel.js
@@ -15,17 +15,16 @@ const { L10N } = require("../utils/l10n"
 const { getSelectedRequest } = require("../selectors/index");
 
 // Components
 const Tabbar = createFactory(require("devtools/client/shared/components/tabs/tabbar"));
 const TabPanel = createFactory(require("devtools/client/shared/components/tabs/tabs").TabPanel);
 const CookiesPanel = createFactory(require("./cookies-panel"));
 const HeadersPanel = createFactory(require("./headers-panel"));
 const ParamsPanel = createFactory(require("./params-panel"));
-const PreviewPanel = createFactory(require("./preview-panel"));
 const ResponsePanel = createFactory(require("./response-panel"));
 const SecurityPanel = createFactory(require("./security-panel"));
 const TimingsPanel = createFactory(require("./timings-panel"));
 
 const HEADERS_TITLE = L10N.getStr("netmonitor.tab.headers");
 const COOKIES_TITLE = L10N.getStr("netmonitor.tab.cookies");
 const PARAMS_TITLE = L10N.getStr("netmonitor.tab.params");
 const RESPONSE_TITLE = L10N.getStr("netmonitor.tab.response");
@@ -86,23 +85,16 @@ function TabboxPanel({
       ),
       request.securityState && request.securityState !== "insecure" &&
       TabPanel({
         id: "security",
         title: SECURITY_TITLE,
       },
         SecurityPanel({ request }),
       ),
-      Filters.html(request) &&
-      TabPanel({
-        id: "preview",
-        title: PREVIEW_TITLE,
-      },
-        PreviewPanel({ request }),
-      ),
     )
   );
 }
 
 TabboxPanel.displayName = "TabboxPanel";
 
 TabboxPanel.propTypes = {
   activeTabId: PropTypes.string,