Bug 931990 - [markup view] Context menu disappearing in markup tree during after mutation; r=paul

This commit is contained in:
Brian Grinstead 2013-11-07 13:03:40 -06:00
parent d0335f6d3a
commit 500ad1548d
2 changed files with 11 additions and 12 deletions

View File

@ -373,16 +373,6 @@ HTMLBreadcrumbs.prototype = {
}
},
/**
* Re-init the cache and remove all the buttons.
*/
invalidateHierarchy: function BC_invalidateHierarchy()
{
this.inspector.hideNodeMenu();
this.nodeHierarchy = [];
this.empty();
},
/**
* Set which button represent the selected node.
*
@ -615,7 +605,9 @@ HTMLBreadcrumbs.prototype = {
*/
update: function BC_update(reason)
{
this.inspector.hideNodeMenu();
if (reason !== "markupmutation") {
this.inspector.hideNodeMenu();
}
let cmdDispatcher = this.chromeDoc.commandDispatcher;
this.hadFocus = (cmdDispatcher.focusedElement &&

View File

@ -987,7 +987,8 @@ MarkupView.prototype = {
* Initialize the preview panel.
*/
_initPreview: function() {
if (!Services.prefs.getBoolPref("devtools.inspector.markupPreview")) {
this._previewEnabled = Services.prefs.getBoolPref("devtools.inspector.markupPreview");
if (!this._previewEnabled) {
return;
}
@ -1017,6 +1018,9 @@ MarkupView.prototype = {
* Move the preview viewbox.
*/
_updatePreview: function() {
if (!this._previewEnabled) {
return;
}
let win = this._frame.contentWindow;
if (win.scrollMaxY == 0) {
@ -1052,6 +1056,9 @@ MarkupView.prototype = {
* Hide the preview while resizing, to avoid slowness.
*/
_resizePreview: function() {
if (!this._previewEnabled) {
return;
}
let win = this._frame.contentWindow;
this._previewBar.classList.add("hide");
win.clearTimeout(this._resizePreviewTimeout);