Bug 911678 - Inspector - inline style rules do not populate the CSSRuleView immediately. r=miker
This commit is contained in:
@@ -387,6 +387,7 @@ MarkupView.prototype = {
|
||||
* Mutation observer used for included nodes.
|
||||
*/
|
||||
_mutationObserver: function(aMutations) {
|
||||
let requiresLayoutChange = false;
|
||||
for (let mutation of aMutations) {
|
||||
let type = mutation.type;
|
||||
let target = mutation.target;
|
||||
@@ -409,6 +410,11 @@ MarkupView.prototype = {
|
||||
}
|
||||
if (type === "attributes" || type === "characterData") {
|
||||
container.update();
|
||||
|
||||
// Auto refresh style properties on selected node when they change.
|
||||
if (type === "attributes" && container.selected) {
|
||||
requiresLayoutChange = true;
|
||||
}
|
||||
} else if (type === "childList") {
|
||||
container.childrenDirty = true;
|
||||
// Update the children to take care of changes in the DOM
|
||||
@@ -417,6 +423,10 @@ MarkupView.prototype = {
|
||||
this._updateChildren(container, {flash: true});
|
||||
}
|
||||
}
|
||||
|
||||
if (requiresLayoutChange) {
|
||||
this._inspector.immediateLayoutChange();
|
||||
}
|
||||
this._waitForChildren().then(() => {
|
||||
this._flashMutatedNodes(aMutations);
|
||||
this._inspector.emit("markupmutation");
|
||||
|
||||
Reference in New Issue
Block a user