Backout bug 880701 - caused a behavioural regression with the panels not resizing properly.

This commit is contained in:
Mike Conley 2013-06-13 23:26:02 -04:00
parent 4f680c7354
commit 74d251a36f
2 changed files with 4 additions and 48 deletions

View File

@ -114,19 +114,9 @@ const PanelUI = {
* method is exposed so that CustomizationMode can force registration in the
* event that customization mode is started before the panel has had a chance
* to register itself.
*
* @param aCustomizing (optional) set to true if this was called while entering
* customization mode. If that's the case, we trust that customization
* mode will handle calling beginBatchUpdate and endBatchUpdate.
*/
ensureRegistered: function(aCustomizing=false) {
if (aCustomizing) {
CustomizableUI.registerMenuPanel(this.contents);
} else {
this.beginBatchUpdate();
CustomizableUI.registerMenuPanel(this.contents);
this.endBatchUpdate();
}
ensureRegistered: function() {
CustomizableUI.registerMenuPanel(this.contents);
},
/**
@ -201,23 +191,6 @@ const PanelUI = {
}
},
/**
* Signal that we're about to make a lot of changes to the contents of the
* panels all at once. For performance, we ignore the mutations.
*/
beginBatchUpdate: function() {
this.multiView.ignoreMutations = true;
},
/**
* Signal that we're done making bulk changes to the panel. We now pay
* attention to mutations. This automatically synchronizes the multiview
* container with whichever view is displayed.
*/
endBatchUpdate: function(aReason) {
this.multiView.ignoreMutations = false;
},
/**
* Sets the anchor node into the open or closed state, depending
* on the state of the panel.

View File

@ -89,7 +89,6 @@
<field name="_mainViewHeight">0</field>
<field name="_subViewObserver">null</field>
<field name="_transitioning">false</field>
<field name="_ignoreMutations">false</field>
<property name="showingSubView" readonly="true"
onget="return this._viewStack.getAttribute('view') == 'subview'"/>
@ -97,22 +96,6 @@
<property name="_mainView" readonly="true"
onget="return document.getElementById(this._mainViewId);"/>
<property name="ignoreMutations">
<getter>
return this._ignoreMutations;
</getter>
<setter><![CDATA[
this._ignoreMutations = val;
if (!val) {
if (this.showingSubView) {
this._syncContainerWithSubView();
} else {
this._syncContainerWithMainView();
}
}
]]></setter>
</property>
<constructor><![CDATA[
this._clickCapturer.addEventListener("click", this);
this._panel.addEventListener("popupshowing", this);
@ -301,7 +284,7 @@
<method name="_syncContainerWithSubView">
<body><![CDATA[
if (!this.ignoreMutations && this.showingSubView) {
if (this.showingSubView) {
this._viewContainer.style.height =
this._subViews.scrollHeight + "px";
}
@ -309,7 +292,7 @@
</method>
<method name="_syncContainerWithMainView">
<body><![CDATA[
if (!this.ignoreMutations && !this.showingSubView && !this._transitioning) {
if (!this.showingSubView && !this._transitioning) {
this._viewContainer.style.height =
this._mainViewContainer.scrollHeight + "px";
}