WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
28889
Inspector toggled colors should remember their state across sessions
https://bugs.webkit.org/show_bug.cgi?id=28889
Summary
Inspector toggled colors should remember their state across sessions
mitch kramer
Reported
Tuesday, September 1, 2009 10:08:48 PM UTC
In the web inspector in the nightly builds, you can now click on the color swatch to toggle through the various versions of that color. This is great, however, it should remember what state it was left in and all color references should obey that preference when using the inspector in the future.
Attachments
Screen Shot
(35.36 KB, image/png)
2009-09-06 11:38 PDT
,
Timothy Hatcher
no flags
Details
Proposed Patch
(19.54 KB, patch)
2009-09-06 11:47 PDT
,
Timothy Hatcher
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Timothy Hatcher
Comment 1
Sunday, September 6, 2009 6:38:35 PM UTC
I have a patch for this coming up.
Timothy Hatcher
Comment 2
Sunday, September 6, 2009 6:40:44 PM UTC
The design I went with lets you toggle individual colors freely wit hno persistence, but there is now a global setting to pick the default format — Hex, RGB or HSL.
Timothy Hatcher
Comment 3
Sunday, September 6, 2009 7:38:40 PM UTC
Created
attachment 39123
[details]
Screen Shot
Timothy Hatcher
Comment 4
Sunday, September 6, 2009 7:47:29 PM UTC
Created
attachment 39124
[details]
Proposed Patch
mitz
Comment 5
Sunday, September 6, 2009 7:56:34 PM UTC
Comment on
attachment 39124
[details]
Proposed Patch
> + swatchElement.title = WebInspector.UIString("Click to change color format.");
The new style for tool tips is without a trailing period!
> + if (Preferences.colorFormat === "rgb") { > + if (Preferences.showColorNicknames && color.nickname) > + format = "nickname"; > + else > + format = (color.simple ? "rgb" : "rgba"); > + } else if (Preferences.colorFormat === "hsl") { > + if (Preferences.showColorNicknames && color.nickname) > + format = "nickname"; > + else > + format = (color.simple ? "hsl" : "hsla"); > + } else { > + if (Preferences.showColorNicknames && color.nickname) > + format = "nickname"; > + else if (color.simple) > + format = (color.hasShortHex() ? "shorthex" : "hex"); > + else > + format = "rgba"; > + }
You can test for the (Preferences.showColorNicknames && color.nickname) condition first instead of repeating it three times.
Timothy Hatcher
Comment 6
Sunday, September 6, 2009 9:45:16 PM UTC
Committed
r48102
: <
http://trac.webkit.org/changeset/48102
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug