[Webkit-unassigned] [Bug 128768] Web Inspector: Color Picker doesn't update color of CSS property

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 18 03:25:51 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=128768





--- Comment #8 from Diego Pino <dpino at igalia.com>  2014-02-18 03:23:03 PST ---
(In reply to comment #6)
> So I think I have this traced back. Any change in the CodeMirror editor for a CSSStyleDeclarationTextEditor updates the internal data model thru CSSAgent.setStyleText. This change percolates back as a refresh() on the DOMNodeStyles on the frontend, which then goes back to the backend with calls to CSSAgent.get*StylesForNode. The callbacks for this update() the CSSStyleDeclaration, which events WebInspector.CSSStyleDeclaration.Event.PropertiesChanged. CSSStyleDeclarationTextEditor picks up the event and calls _updateTextMarkers(), which first clears out all the existing text markers, then recreates the normal markers.
> 
> In essence, any CSSStyleDeclarationTextEditor change blows away any temporary markers like the one that was being defined here.
> 
> Hope that helps.
> 
> Here are the JS traces. It goes between the backend and frontend, and there are a few setTimeouts as well:
> 
> DOMNodeStyles.js:367: CONSOLE TRACE:
> 0: changeStyleText (DOMNodeStyles.js:367)
> 1: text (CSSStyleDeclaration.js:191)
> 2: _commitChanges (CSSStyleDeclarationTextEditor.js:273)
> 3: (unknown) ([native code])
> 
> DOMNodeStyles.js:246: CONSOLE TRACE:
> 0: refresh (DOMNodeStyles.js:246)
> 1: _refreshNodeStyles (StyleDetailsPanel.js:128)
> 2: _nodeStylesNeedsRefreshed (StyleDetailsPanel.js:159)
> 3: dispatch (Object.js:180)
> 4: dispatchEventToListeners (Object.js:187)
> 5: _markAsNeedsRefresh (DOMNodeStyles.js:867)
> 6: _styleSheetContentDidChange (DOMNodeStyles.js:883)
> 7: dispatch (Object.js:180)
> 8: dispatchEventToListeners (Object.js:187)
> 9: noteContentDidChange (CSSStyleSheet.js:150)
> 10: styleSheetChanged (CSSStyleManager.js:136)
> 11: styleSheetChanged (CSSObserver.js:43)
> 12: dispatch (InspectorBackend.js:262)
> 13: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
> 14: (unknown) ([native code])
> 
> CSSStyleDeclaration.js:166: CONSOLE TRACE:
> 0: update (CSSStyleDeclaration.js:166)
> 1: _parseStyleDeclarationPayload (DOMNodeStyles.js:731)
> 2: _parseRulePayload (DOMNodeStyles.js:788)
> 3: parseRuleMatchArrayPayload (DOMNodeStyles.js:98)
> 4: fetchedMatchedStyles (DOMNodeStyles.js:121)
> 5: fetchedMatchedStyles ([native code])
> 6: dispatch (InspectorBackend.js:220)
> 7: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
> 8: (unknown) ([native code])
> 
> CSSStyleDeclarationTextEditor.js:496: CONSOLE TRACE:
> 0: clear (CSSStyleDeclarationTextEditor.js:496)
> 1: _clearTextMarkers (CSSStyleDeclarationTextEditor.js:521)
> 2: update (CSSStyleDeclarationTextEditor.js:320)
> 3: update ([native code])
> 4: runInOp (External/CodeMirror/codemirror.js:1445)
> 5: operation (External/CodeMirror/codemirror.js:3223)
> 6: _updateTextMarkers (CSSStyleDeclarationTextEditor.js:386)
> 7: _propertiesChanged (CSSStyleDeclarationTextEditor.js:736)
> 8: dispatch (Object.js:180)
> 9: dispatchEventToListeners (Object.js:187)
> 10: delayed (CSSStyleDeclaration.js:164)
> 11: delayed ([native code])
> 
> CSSStyleDeclaration.js:166: CONSOLE TRACE:
> 0: update (CSSStyleDeclaration.js:166)
> 1: _parseStyleDeclarationPayload (DOMNodeStyles.js:731)
> 2: fetchedInlineStyles (DOMNodeStyles.js:153)
> 3: fetchedInlineStyles ([native code])
> 4: dispatch (InspectorBackend.js:220)
> 5: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
> 6: (unknown) ([native code])
> 
> CSSStyleDeclaration.js:166: CONSOLE TRACE:
> 0: update (CSSStyleDeclaration.js:166)
> 1: fetchedComputedStyle (DOMNodeStyles.js:173)
> 2: fetchedComputedStyle ([native code])
> 3: dispatch (InspectorBackend.js:220)
> 4: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
> 5: (unknown) ([native code])
> 
> CSSStyleDeclarationTextEditor.js:496: CONSOLE TRACE:
> 0: clear (CSSStyleDeclarationTextEditor.js:496)
> 1: _clearTextMarkers (CSSStyleDeclarationTextEditor.js:521)
> 2: update (CSSStyleDeclarationTextEditor.js:320)
> 3: update ([native code])
> 4: runInOp (External/CodeMirror/codemirror.js:1445)
> 5: operation (External/CodeMirror/codemirror.js:3223)
> 6: _updateTextMarkers (CSSStyleDeclarationTextEditor.js:386)
> 7: _propertiesChanged (CSSStyleDeclarationTextEditor.js:736)
> 8: dispatch (Object.js:180)
> 9: dispatchEventToListeners (Object.js:187)
> 10: delayed (CSSStyleDeclaration.js:164)
> 11: delayed ([native code])

Good job!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list