Bug 108823

Summary: Web Inspector: forced pseudo classes aren't cleared from inspected page when Inspector closes
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, inspector-bugzilla-changes, joepeck, pmuellr, web-inspector-bugs, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix timothy: review+, bburg: commit-queue-

Antoine Quint
Reported 2013-02-04 07:10:28 PST
Steps to reproduce: 1. Open http://nightly.webkit.org/start 2. Cmd+click on the "report issues" link in the paragraph under "How can I help?" 3. Pick Inspect Element from context menu 4. Force :hover CSS pseudo-class onto element using the "Force Element State" contextual menu on the matching DOM node in the inspector 5. Close the inspector At this stage, I'd expect the forced :hover pseudo-class to have been removed. Reopening and reclosing the Web Inspector eventually resets the forced pseudo-classes.
Attachments
[PATCH] Proposed Fix (10.14 KB, patch)
2017-01-03 21:48 PST, Joseph Pecoraro
timothy: review+
bburg: commit-queue-
Radar WebKit Bug Importer
Comment 1 2013-02-04 07:10:50 PST
Joseph Pecoraro
Comment 2 2017-01-03 21:44:16 PST
The CSSAgent tries to reset forced pseudo states in InspectorCSSAgent::resetPseudoStates except it uses the DOM Agent which may have cleared state already. Lets avoid using the DOM Agent here during cleanup. Using the DOM Agent at other places also seems like it could be incorrect (InspectorCSSAgent::didRemoveDOMNode) or potentially incomplete (InspectorCSSAgent::didRemoveDocument). So I'll just clean all this up.
Joseph Pecoraro
Comment 3 2017-01-03 21:48:35 PST
Created attachment 297990 [details] [PATCH] Proposed Fix I might be able to write a test for this.
Blaze Burg
Comment 4 2017-01-04 13:49:12 PST
Comment on attachment 297990 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=297990&action=review > Source/WebCore/inspector/InspectorCSSAgent.cpp:414 > + m_documentsWithForcedPsuedoStates.remove(&document); If it's not too much work, please fix the spelling of this member.
Joseph Pecoraro
Comment 5 2017-01-04 20:39:42 PST
Note You need to log in before you can comment on or make changes to this bug.