Bug 92638

Summary: Web Inspector: [Styles] No color swatch for the SVG "fill" and "stroke" property values
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch vsevik: review+, apavlov: commit-queue-

Description Alexander Pavlov (apavlov) 2012-07-30 05:23:40 PDT
What steps will reproduce the problem?
1. Have SVG elements in your HTML 
2. Style these elements by defining colors (e.g. "fill" or "stroke")
3. Inspect the page using Developer tools

What is the expected result?
A color swatch is shown displaying the chosen/defined color(s) for the element.

What happens instead?
No color swatch is shown, even though the attribute is treated properly and the element is filled with the defined color. 

While it is not the end of the world to not see the color swatch it would really help when working with styling of elements created by visualization scripts.

Please provide any additional information below. Attach a screenshot if
possible.

Note that in the screenshot below I have manually added two attributes to show that the color swatches are shown for some elements but not for others. The page renders without any problems (i.e. with right coloring) without the manually added style elements. 

I believe this issue might be related to http://code.google.com/p/chromium/issues/detail?id=83051 in such a way that the fix for that problem might have had downstream effects disabling swatches in some occasions where it would be useful.

Upstreaming http://code.google.com/p/chromium/issues/detail?id=137017
Comment 1 Alexander Pavlov (apavlov) 2012-07-30 05:31:34 PDT
Created attachment 155269 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2012-07-30 05:51:24 PDT
Committed r124016: <http://trac.webkit.org/changeset/124016>