RESOLVED FIXED 96482
Web Inspector: [Styles] Styles not updated when there is a heavy stream of DOM updates
https://bugs.webkit.org/show_bug.cgi?id=96482
Summary Web Inspector: [Styles] Styles not updated when there is a heavy stream of DO...
Alexander Pavlov (apavlov)
Reported 2012-09-12 01:53:11 PDT
Consider the following call sequence in StylesSidebarPane: 1. this._rebuildUpdateInProgress is false AND there are pending DOM update events in the RPC queue for the Web Inspector frontend. _rebuildUpdate() is invoked, which results in a few WebInspector.cssModel.get*Async() calls (fetching data from the backend). this._rebuildUpdateInProgress is now true. 2. A pending DOM update is processed and is deemed to result in a Styles rebuild. _rebuildUpdate() is called, but since this._rebuildUpdateInProgress is true, this._lastNodeForInnerRebuild is set to this.node. 3. The backend data from the 1st _rebuildUpdate() call are ready, and stylesCallback(matchedResult) is invoked. But, since this._lastNodeForInnerRebuild === this.node, the following snippet is executed: if (this._lastNodeForInnerRebuild) { delete this._lastNodeForInnerRebuild; this._rebuildUpdate(userCallback); return; } This loop goes on forever, until the DOM updates from the backend stop (which may not be the case,) and the Styles pane is never updated.
Attachments
Patch (8.01 KB, patch)
2012-09-12 05:50 PDT, Alexander Pavlov (apavlov)
no flags
Patch (6.32 KB, patch)
2012-09-12 07:30 PDT, Alexander Pavlov (apavlov)
vsevik: review+
Alexander Pavlov (apavlov)
Comment 1 2012-09-12 05:50:45 PDT
Alexander Pavlov (apavlov)
Comment 2 2012-09-12 07:30:44 PDT
Vsevolod Vlasov
Comment 3 2012-09-12 08:01:54 PDT
Comment on attachment 163624 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=163624&action=review > LayoutTests/inspector/styles/force-pseudo-state.html:34 > + InspectorTest.waitForStyles("div", divSelected2, true, 1); I think more readable and flexible approach would be to wait for styles update after each pseudo class change explicitly. Please fix this before landing.
Alexander Pavlov (apavlov)
Comment 4 2012-09-12 23:45:46 PDT
Note You need to log in before you can comment on or make changes to this bug.