Bug 15834

Summary: There are many subtle bugs in the Styles pane of the Web Inspector
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web Inspector (Deprecated)Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test case
none
Patch aroben: review+

Description Timothy Hatcher 2007-11-04 14:58:57 PST
The styles pane has a few bugs.

- Poor handling of duplicate properties in the same rule. Some of this can't be fixed since we can't only get the "winning" value for duplicate properties. So we should only show one entry per unique property name.
- Computed style does not show font shorthand properties if font was used.
- Property priority is broken, the wrong properties are crossed out.
- Border shows null for the shorthand value.
- Shorthands don't show their priority.
- HSL and HEX colors have now preview swatch blocks.
- Complex code, making it hard to reuse for console.log later.

See attached file for some test cases.
Comment 1 Timothy Hatcher 2007-11-04 14:59:13 PST
Created attachment 17037 [details]
Test case
Comment 2 Timothy Hatcher 2007-11-04 15:06:49 PST
Created attachment 17038 [details]
Patch
Comment 3 Adam Roben (:aroben) 2007-11-04 15:57:56 PST
Comment on attachment 17038 [details]
Patch

+        Bug 15834: There are many subtile bugs in the Styles pane of the Web Inspector

Typo: Subtile -> Subtle

+        for (var i = 0; i < boxes.length; ++i) {
+            var name = boxes[i];

Even though you've defined name here, you still use boxes[i] later on.

It looks like PropertiesSidebarPane.js has a bunch of tabs in it.

I'm not really sure what the changes to the TreeOutline code are supposed to be doing (the ChangeLog didn't mention them).

r=me
Comment 4 Timothy Hatcher 2007-11-04 16:23:16 PST
Fixed the issues Adam mentioned.
Landed in r r27431. http://trac.webkit.org/projects/webkit/changeset/27431