RESOLVED FIXED 28187
"Double-click to add" new style button does not always show up
https://bugs.webkit.org/show_bug.cgi?id=28187
Summary "Double-click to add" new style button does not always show up
Sam Weinig
Reported 2009-08-11 14:20:10 PDT
On http://webkit.org, the "Double-click to add" button does not show up for the body element in the elements pane.
Attachments
Quick Fix (6.00 KB, patch)
2009-08-11 14:49 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2009-08-11 14:24:13 PDT
Seems to be due to "could not parse color" warnings. I'll work on this right now.
Joseph Pecoraro
Comment 2 2009-08-11 14:39:56 PDT
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.
Joseph Pecoraro
Comment 3 2009-08-11 14:49:00 PDT
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
Eric Seidel (no email)
Comment 4 2009-08-12 09:43:34 PDT
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
Eric Seidel (no email)
Comment 5 2009-08-12 09:43:37 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.