- There is no need to track DOM changes while inspector window is hidden. This is different from the way it was working before the dom agent refactoring. - There is a following bug: 1. Open web inspector for some page 2. Close web inspector 3. Reload the page 4. Open web inspector Expected: Elements panel showing the DOM tree Actual: Empty panel The reason for a bug is that page reload pushes document's representation into the frontend and calls ElementsPanel's refresh. ElementsPanel is trying to be smart and is not processing refreshes while inspector window is hidden. Keeping dom agent operational only while inspector is visible solves both problems.
Created attachment 40175 [details] patch Note that I needed to restore WebCore::InspectorController::inspectedWindowScriptObjectCleared callback in order to clear injected script properly.
Sounds like bug 28903.
*** This bug has been marked as a duplicate of bug 28903 ***