Bug 1360136 Comment 10 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It came to my attention that we could make use of [this module](https://searchfox.org/mozilla-central/rev/227f5329f75bd8b16c6b146a7414598a420260cb/toolkit/modules/ContentDOMReference.jsm) to fix the problem.
It's a nice helper that generates a unique ID for a DOM node that can be passed around across processes (as it's just a string) and be used again later to resolve to the original DOM node.

Today we [generate a CSS selector](https://searchfox.org/mozilla-central/rev/1133b6716d9a8131c09754f3f29288484896b8b6/browser/base/content/nsContextMenu.js#255-257) when right-clicking on a node in the page (actually multiple selectors if that node is in a nested iframe).
Instead we could generate the ID for that node (and parent iframe IDs if needed), and then use that to resolve to the actual node in [findNodeFront](https://searchfox.org/mozilla-central/rev/1133b6716d9a8131c09754f3f29288484896b8b6/devtools/client/framework/devtools.js#650-673).

Back to Bug 1360136 Comment 10