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.
Created attachment 163608 [details] Patch
Created attachment 163624 [details] Patch
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.
Committed r128407: <http://trac.webkit.org/changeset/128407>