[markup view] Deleted attributes still exist in the markup-view DOM

RESOLVED DUPLICATE of bug 1139569

Status

()

Firefox
Developer Tools: Inspector
RESOLVED DUPLICATE of bug 1139569
3 years ago
3 years ago

People

(Reporter: pbro, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
See http://mxr.mozilla.org/mozilla-central/source/browser/devtools/markupview/markup-view.js#2054

When an attribute is updated in the markup-view, all attributes are hidden, then those that still exist are shown again (and re-created).

Those that don't exist anymore remain in the DOM forever, as long as the node is represented in the markup-view.

- This seems to have been done for performance reasons, but I'm not really sure this helps making the view faster at all.
- This makes it harder for the rest of the code to deal with attributes as it needs to be aware of the fact that there may be hidden attribute nodes that should be skipped. For instance in bug 911148, we need to explicitly skip hidden attribute nodes.

I think we should investigate removing this mechanism altogether.
This is behavior has now been changed by Bug 1139569.

Deleted attributes are now removed from the DOM: https://dxr.mozilla.org/mozilla-central/source/browser/devtools/markupview/markup-view.js#2417

      if (!currentAttributes.has(name)) {
        this.removeAttribute(name);
      }
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1139569
You need to log in before you can comment on or make changes to this bug.