Bug 27596 - Inspector: Console Object Property Subtitle's Display Poorly
Summary: Inspector: Console Object Property Subtitle's Display Poorly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-22 22:28 PDT by Joseph Pecoraro
Modified: 2009-08-18 14:39 PDT (History)
2 users (show)

See Also:


Attachments
Image Showing Problem (154.35 KB, image/png)
2009-08-12 18:00 PDT, Joseph Pecoraro
no flags Details
Image Showing the fix (159.59 KB, image/png)
2009-08-18 14:19 PDT, Pavel Feldman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2009-07-22 22:28:45 PDT
There are a couple panes that extend WebInspector.PropertiesSection and thus may set a "title" and a "subtitle".  They include:
1. WebInspector.ObjectPropertiesSection when displaying an object in the Console.
2. WebInspector.StylePropertiesSection when displaying CSS styles in the Sidebar of the Elements Panel.  The subtitle here may be the name/link to the stylesheet.

The styles for the CSS Sidebar apply fine.  The styles for the Console, when displaying something with a subtitle, display very poorly:
- White text on a white background is invisible.
- The text is scrunched and unreadable.
- Produces multiple lines in the normal view for seemingly no reason.
- Expanded properties looks weird because of the float: right applied to the subtitle.

The only way I have found to produce a "subtitle" in the Console is to inspect the prototype of some node.  The simplest test case being "Node.prototype".  The result from Object.describe is then "NodePrototype".  Special code in ObjectPropertiesSection.js turns this into title "Node" and subtitle "Prototype".  However, this displays poorly.

To test this you may try the following in the Inspector:
> Node.prototype

You may also want to try something like this:
> [Node.prototype, Document, Node.prototype, Node]

- I mention "Document" because the result is then "DocumentConstructor" which is along the same lines as "NodePrototype" but exhibits no special behavior.
- The inspector does special formatting in this case so you can experiment with expanding the Properties and view the affect of a "subtitle" then.

My suggestion would be to:
- Remove the special case and have no subtitles.
Comment 1 Timothy Hatcher 2009-08-12 17:17:38 PDT
I don't fully understand the issue. Screenshots?
Comment 2 Joseph Pecoraro 2009-08-12 18:00:09 PDT
Created attachment 34710 [details]
Image Showing Problem

Here is the problem shown in a few different ways.
Comment 3 Timothy Hatcher 2009-08-12 18:32:31 PDT
I see, these are ugly and bad.
Comment 4 Pavel Feldman 2009-08-18 14:13:40 PDT
Fixed as a part of https://bugs.webkit.org/show_bug.cgi?id=28177. Landed as r47231.
Comment 5 Timothy Hatcher 2009-08-18 14:15:20 PDT
Wait, how was it fixed? I think nodes should be expandable inside aray output. Otherwise ther are not that useful.
Comment 6 Pavel Feldman 2009-08-18 14:19:21 PDT
Created attachment 35074 [details]
Image Showing the fix
Comment 7 Pavel Feldman 2009-08-18 14:20:09 PDT
(In reply to comment #5)
> Wait, how was it fixed? I think nodes should be expandable inside aray output.
> Otherwise ther are not that useful.

They are. I removed the subtitle logic from the ObjectPropertiesSection when migrated to DOMAgent.
Comment 8 Timothy Hatcher 2009-08-18 14:22:20 PDT
Oh, okay. Thanks.
Comment 9 Timothy Hatcher 2009-08-18 14:39:19 PDT
Great! Looks like I expected.