Bug 129096

Summary: Web Inspector: gradients in the Styles sidebar aren't editable using the dedicated gradients editor
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Web InspectorAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, graouts, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 119686    
Bug Blocks:    

Description Antoine Quint 2014-02-20 04:13:43 PST
The patch for https://bugs.webkit.org/show_bug.cgi?id=119686 will provide a new gradients editor but it only works as part of SourceCodeTextEditor and not CSSStyleDeclarationTextEditor. We should add support for such editors in CSSStyleDeclarationTextEditor as well and possibly adopt the CodeMirrorColorEditingController for editing colours as well so that SourceCodeTextEditor and CSSStyleDeclarationTextEditor are more alike.
Comment 1 Radar WebKit Bug Importer 2014-02-20 04:13:54 PST
<rdar://problem/16120224>
Comment 2 Antoine Quint 2014-02-21 08:14:34 PST
I wonder if we could refactor SourceCodeTextEditor and CSSStyleDeclarationTextEditor to share some CodeMirrorTokenTrackingController and CodeMirrorEditingController logic to implement the basic behaviour implemented in SourceCodeTextEditor across both editors. I think basically we'd have a new helper object which we'd notify when the editor hides, has its content populated or changed, and have basic handlers for tokenTrackingControllerNewHighlightCandidate and tokenTrackingControllerMouseOutOfHoveredMarker that do the work. Then the CodeMirrorEditingController delegates would be implemented by this helper object as well and the editor classes would have little knowledge of CodeMirrorEditingController.
Comment 3 Timothy Hatcher 2014-02-24 09:56:50 PST
A unified controller that SourceCodeTextEditor and CSSStyleDeclarationTextEditor uses to share the editing logic seems good to me.

One thing we need to consider is how to support changing the color format if the swatch isn't there. This makes having a menu in HoverMenu for colors appealing, since you could have menu items for the other formats (with the current one having a checkmark).
Comment 4 Antoine Quint 2014-02-24 10:44:43 PST
(In reply to comment #3)
> One thing we need to consider is how to support changing the color format if the swatch isn't there. This makes having a menu in HoverMenu for colors appealing, since you could have menu items for the other formats (with the current one having a checkmark).

Good point, I'll look into implementing that.
Comment 5 BJ Burg 2017-02-10 10:53:46 PST
I am pretty sure that this is no longer an issue, right? We can edit gradients in the style sidebar.
Comment 6 Antoine Quint 2017-02-13 00:46:31 PST
Yeah, I can confirm that this has been fixed. Very nice!