Screencast: http://www.screenr.com/NkN8 Removing a rule added in Styles pane causes an error: "Error during DOMAgent operation: Server error(-32000): DOM Error while querying.". I can reproduce it on every page in WebKit Nightly and Chrome (stable, dev, and canary).
Could you please provide step-by-step repro?
(In reply to comment #1) > Could you please provide step-by-step repro? Oh, missed the attachment, never mind.
Created attachment 137348 [details] Patch
Comment on attachment 137348 [details] Patch Attachment 137348 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/12410676
Comment on attachment 137348 [details] Patch Attachment 137348 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/12418084
Comment on attachment 137348 [details] Patch Attachment 137348 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/12416122
Created attachment 137351 [details] Patch
Comment on attachment 137351 [details] Patch Attachment 137351 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/12412409
Created attachment 137352 [details] Patch
Comment on attachment 137352 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=137352&action=review > Source/WebCore/css/CSSGrammar.y:447 > + before_ruleset ruleset { This could be a separate patch with a test. > Source/WebCore/inspector/InspectorCSSAgent.cpp:471 > + return m_styleSheet->insertRuleBefore(m_originalRuleString, m_anchorId, m_originalRuleTextRange.start, ec); This implies that you drop the information about the enabled state. > Source/WebCore/inspector/InspectorStyleSheet.cpp:63 > +struct RuleNode : public RefCounted<RuleNode> { As we agreed offline, I'd suggest that you expose the stylesheet structure via the protocol. Otherwise, you logic for insertion of a rule into a given place of the stylesheet is only accessible as an undo operation for the delete rule.