Summary: | "Double-click to add" new style button does not always show up | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | eric, joepeck, timothy | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
URL: | http://webkit.org | ||||||
Attachments: |
|
Description
Sam Weinig
2009-08-11 14:20:10 PDT
Seems to be due to "could not parse color" warnings. I'll work on this right now. Interesting. The incoming CSS of: url(/images/green.png) Has the string "green" inside it and "green" swatch is (incorrectly) made for it: http://tr.im/wdZz?grabup WebInspector.Color is invoked if there was a swatch on the massaged CSS value, and it throws an error because it cannot parse the following as a valid color: url(<ahref="http://webkit.org/images/green-background.png"class="webkit-html-resource-link"title="http://webkit.org/images/green-background.png"target="_blank">http://webkit.org/images/green-background.png</a>) Since this affects the WebKit Nightly right now I will throw up a "quick fix" patch that catches the WebInspector.Color error and therefore takes us back to the expected old behavior with the swatch still incorrectly showing. I'll then work on cleaning this up in general. Created attachment 34597 [details]
Quick Fix
This is the quick fix for the Nightly Build.
---
I think a more optimal solution would be to avoid throwing an error at all. Instead something like WebInspector.Color.parseColor() factory method which would return either 'null' or a WebInspector.Color object. That way we won't have to worry about any throw/catch. Along with the other improvements mentioned previously, including:
- swatch shows up accidentally
- all swatches should be clickable to toggle colors
- swatches should be clickable in shorthand properties
Comment on attachment 34597 [details] Quick Fix Clearing flags on attachment: 34597 Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/StylesSidebarPane.js Committed r47116 M WebCore/ChangeLog M WebCore/inspector/front-end/StylesSidebarPane.js r47116 = 339ebebf103c8020a3164de2578c2171389b539a (trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk http://trac.webkit.org/changeset/47116 All reviewed patches have been landed. Closing bug. |