firebug/firebug — pull request #66 by simonlindholm (2012-12-02 00:51:57+00:00)
Title: Even better fix for issue 6013

There are three problems with the previous implementation of `attachStyles`:
- If the first styled document is in a frame which is then reloaded, everything breaks down (`context.highlightStyle` is not necessarily from the top frame!).
- `cloneNode` doesn't preserve the "_firebugIgnore" expando, so apart from in the first frame, every added stylesheet is shown in the HTML panel.
- In iframes, no stylesheets are reused, which means we end up with one stylesheet for element highlight. (!)

This fixes them with IMO a saner implementation.