Bug 28978 - Color swatches should show before the color text
Summary: Color swatches should show before the color text
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-09-04 10:28 PDT by Timothy Hatcher
Modified: 2009-09-04 11:11 PDT (History)
3 users (show)

See Also:

Proposed Change (13.74 KB, patch)
2009-09-04 10:48 PDT, Timothy Hatcher
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2009-09-04 10:28:27 PDT
Color swatches currenly show up after the property value. They should be moved to before the color text. This was clicking on the swatch will toggle the color and not shift the click area for the swatch.
Comment 1 Timothy Hatcher 2009-09-04 10:48:10 PDT
Created attachment 39075 [details]
Proposed Change

shift the swatch. Also makes multiple swatches in the single property toggle the color format.


Reviewed by NOBODY (OOPS!).

* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle): Some refactoring to consolidate
the processing we do on the property value. This eliminated the old nickname code, since the new
WebInspector.Color class handles this. We could also simplify the color regex since more
is handled by the Color class. Also no longer uses innerHTML for the linkify code.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processValue): Helper function to
process a value given a regex and processor functions.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): Make an anchor for the
URL with "url()" syntax surrounding it.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Makes a color, if
there was an exception just return a text node.
Moved from later in the file.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay): Ditto.
* inspector/front-end/inspector.css:
 3 files changed, 142 insertions(+), 127 deletions(-)
Comment 2 Timothy Hatcher 2009-09-04 11:10:01 PDT
Committed rr48065: <http://trac.webkit.org/changeset/r48065>
Comment 3 Timothy Hatcher 2009-09-04 11:11:28 PDT