Bug 1575682 - Add a mechanism for the popup to signal that its size has changed r=julienw

Differential Revision: https://phabricator.services.mozilla.com/D43116

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Greg Tatum 2019-09-04 20:06:29 +00:00
parent db7a4dcd82
commit 89ca6aada1

View File

@ -346,7 +346,7 @@ class Settings extends PureComponent {
_renderThreads() {
return details(
{ className: "perf-settings-details" },
{ className: "perf-settings-details", onToggle: _handleToggle },
summary(
{
className: "perf-settings-summary",
@ -397,7 +397,7 @@ class Settings extends PureComponent {
_renderFeatures() {
return details(
{ className: "perf-settings-details" },
{ className: "perf-settings-details", onToggle: _handleToggle },
summary(
{
className: "perf-settings-summary",
@ -445,7 +445,10 @@ class Settings extends PureComponent {
_renderLocalBuildSection() {
const { objdirs } = this.props;
return details(
{ className: "perf-settings-details" },
{
className: "perf-settings-details",
onToggle: _handleToggle,
},
summary(
{
className: "perf-settings-summary",
@ -543,6 +546,12 @@ function _entriesTextDisplay(value) {
return formatFileSize(value * PROFILE_ENTRY_SIZE);
}
function _handleToggle() {
if (window.gResizePopup) {
window.gResizePopup(document.body.clientHeight);
}
}
function mapStateToProps(state) {
return {
interval: selectors.getInterval(state),