diff --git a/devtools/client/netmonitor/src/actions/ui.js b/devtools/client/netmonitor/src/actions/ui.js index 8346a829f791..05b15b8e185e 100644 --- a/devtools/client/netmonitor/src/actions/ui.js +++ b/devtools/client/netmonitor/src/actions/ui.js @@ -7,7 +7,6 @@ const { ACTIVITY_TYPE, OPEN_NETWORK_DETAILS, - RESIZE_NETWORK_DETAILS, ENABLE_PERSISTENT_LOGS, DISABLE_BROWSER_CACHE, OPEN_STATISTICS, @@ -29,20 +28,6 @@ function openNetworkDetails(open) { }; } -/** - * Change network details panel size. - * - * @param {integer} width - * @param {integer} height - */ -function resizeNetworkDetails(width, height) { - return { - type: RESIZE_NETWORK_DETAILS, - width, - height, - }; -} - /** * Change persistent logs state. * @@ -161,7 +146,6 @@ function toggleStatistics(connector) { module.exports = { openNetworkDetails, - resizeNetworkDetails, enablePersistentLogs, disableBrowserCache, openStatistics, diff --git a/devtools/client/netmonitor/src/assets/styles/RequestList.css b/devtools/client/netmonitor/src/assets/styles/RequestList.css index 100ad21e04ee..e24749c11057 100644 --- a/devtools/client/netmonitor/src/assets/styles/RequestList.css +++ b/devtools/client/netmonitor/src/assets/styles/RequestList.css @@ -65,6 +65,7 @@ .requests-list-contents { display: table-row-group; position: absolute; + width: 100%; overflow-x: hidden; overflow-y: auto; --timings-scale: 1; diff --git a/devtools/client/netmonitor/src/components/MonitorPanel.js b/devtools/client/netmonitor/src/components/MonitorPanel.js index e671677301b7..f93a4e730b14 100644 --- a/devtools/client/netmonitor/src/components/MonitorPanel.js +++ b/devtools/client/netmonitor/src/components/MonitorPanel.js @@ -40,7 +40,6 @@ class MonitorPanel extends Component { isEmpty: PropTypes.bool.isRequired, networkDetailsOpen: PropTypes.bool.isRequired, openNetworkDetails: PropTypes.func.isRequired, - onNetworkDetailsResize: PropTypes.func.isRequired, request: PropTypes.object, selectedRequestVisible: PropTypes.bool.isRequired, sourceMapService: PropTypes.object, @@ -57,7 +56,6 @@ class MonitorPanel extends Component { }; this.onLayoutChange = this.onLayoutChange.bind(this); - this.onNetworkDetailsResized = this.onNetworkDetailsResized.bind(this); } componentDidMount() { @@ -96,16 +94,6 @@ class MonitorPanel extends Component { }); } - onNetworkDetailsResized(width, height) { - // Cleaning width and height parameters, because SplitBox passes ALWAYS two values, - // while depending on orientation ONLY ONE dimension is managed by it at a time. - let { isVerticalSpliter } = this.state; - return this.props.onNetworkDetailsResized( - isVerticalSpliter ? width : null, - isVerticalSpliter ? null : height - ) - } - render() { let { connector, @@ -140,7 +128,6 @@ class MonitorPanel extends Component { endPanelCollapsed: !networkDetailsOpen, endPanelControl: true, vert: this.state.isVerticalSpliter, - onControlledPanelResized: this.onNetworkDetailsResized, }), ) ); @@ -156,9 +143,6 @@ module.exports = connect( }), (dispatch) => ({ openNetworkDetails: (open) => dispatch(Actions.openNetworkDetails(open)), - onNetworkDetailsResized: (width, height) => dispatch( - Actions.resizeNetworkDetails(width, height) - ), updateRequest: (id, data, batch) => dispatch(Actions.updateRequest(id, data, batch)), }), )(MonitorPanel); diff --git a/devtools/client/netmonitor/src/components/RequestListContent.js b/devtools/client/netmonitor/src/components/RequestListContent.js index 4d513402b9ac..4046d817dc79 100644 --- a/devtools/client/netmonitor/src/components/RequestListContent.js +++ b/devtools/client/netmonitor/src/components/RequestListContent.js @@ -50,9 +50,6 @@ class RequestListContent extends Component { return { connector: PropTypes.object.isRequired, columns: PropTypes.object.isRequired, - networkDetailsOpen: PropTypes.bool.isRequired, - networkDetailsWidth: PropTypes.number.isRequired, - networkDetailsHeight: PropTypes.number.isRequired, cloneSelectedRequest: PropTypes.func.isRequired, displayedRequests: PropTypes.array.isRequired, firstRequestStartedMillis: PropTypes.number.isRequired, @@ -117,12 +114,6 @@ class RequestListContent extends Component { // Using maximum scroll height rather than node.scrollHeight to avoid sync reflow. node.scrollTop = MAX_SCROLL_HEIGHT; } - if (prevProps.networkDetailsOpen !== this.props.networkDetailsOpen || - prevProps.networkDetailsWidth !== this.props.networkDetailsWidth || - prevProps.networkDetailsHeight !== this.props.networkDetailsHeight - ) { - this.onResize(); - } } componentWillUnmount() { @@ -135,7 +126,6 @@ class RequestListContent extends Component { onResize() { let parent = this.refs.contentEl.parentNode; - this.refs.contentEl.style.width = parent.offsetWidth + "px"; this.refs.contentEl.style.height = parent.offsetHeight + "px"; } @@ -310,9 +300,6 @@ class RequestListContent extends Component { module.exports = connect( (state) => ({ columns: state.ui.columns, - networkDetailsOpen: state.ui.networkDetailsOpen, - networkDetailsWidth: state.ui.networkDetailsWidth, - networkDetailsHeight: state.ui.networkDetailsHeight, displayedRequests: getDisplayedRequests(state), firstRequestStartedMillis: state.requests.firstStartedMillis, selectedRequest: getSelectedRequest(state), diff --git a/devtools/client/netmonitor/src/constants.js b/devtools/client/netmonitor/src/constants.js index b3c512b85347..58b854137fe8 100644 --- a/devtools/client/netmonitor/src/constants.js +++ b/devtools/client/netmonitor/src/constants.js @@ -14,7 +14,6 @@ const actionTypes = { CLONE_SELECTED_REQUEST: "CLONE_SELECTED_REQUEST", ENABLE_REQUEST_FILTER_TYPE_ONLY: "ENABLE_REQUEST_FILTER_TYPE_ONLY", OPEN_NETWORK_DETAILS: "OPEN_NETWORK_DETAILS", - RESIZE_NETWORK_DETAILS: "RESIZE_NETWORK_DETAILS", ENABLE_PERSISTENT_LOGS: "ENABLE_PERSISTENT_LOGS", DISABLE_BROWSER_CACHE: "DISABLE_BROWSER_CACHE", OPEN_STATISTICS: "OPEN_STATISTICS", diff --git a/devtools/client/netmonitor/src/reducers/ui.js b/devtools/client/netmonitor/src/reducers/ui.js index c3bea1389fd2..8797f1e59261 100644 --- a/devtools/client/netmonitor/src/reducers/ui.js +++ b/devtools/client/netmonitor/src/reducers/ui.js @@ -8,7 +8,6 @@ const Services = require("Services"); const { CLEAR_REQUESTS, OPEN_NETWORK_DETAILS, - RESIZE_NETWORK_DETAILS, ENABLE_PERSISTENT_LOGS, DISABLE_BROWSER_CACHE, OPEN_STATISTICS, @@ -56,8 +55,6 @@ function UI(initialState = {}) { columns: Columns(), detailsPanelSelectedTab: PANELS.HEADERS, networkDetailsOpen: false, - networkDetailsWidth: null, - networkDetailsHeight: null, persistentLogsEnabled: Services.prefs.getBoolPref("devtools.netmonitor.persistlog"), browserCacheDisabled: Services.prefs.getBoolPref("devtools.cache.disabled"), statisticsOpen: false, @@ -87,14 +84,6 @@ function openNetworkDetails(state, action) { }; } -function resizeNetworkDetails(state, action) { - return { - ...state, - networkDetailsWidth: action.width, - networkDetailsHeight: action.height, - }; -} - function enablePersistentLogs(state, action) { return { ...state, @@ -145,8 +134,6 @@ function ui(state = UI(), action) { return openNetworkDetails(state, { open: false }); case OPEN_NETWORK_DETAILS: return openNetworkDetails(state, action); - case RESIZE_NETWORK_DETAILS: - return resizeNetworkDetails(state, action); case ENABLE_PERSISTENT_LOGS: return enablePersistentLogs(state, action); case DISABLE_BROWSER_CACHE: