Bug 15595 - marker property doesn't show up correctly as "shorthand" in inspector
Summary: marker property doesn't show up correctly as "shorthand" in inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-21 12:14 PDT by Eric Seidel (no email)
Modified: 2008-03-30 23:51 PDT (History)
1 user (show)

See Also:


Attachments
example file with marker (use inspector to see bug) (355 bytes, image/svg+xml)
2007-10-21 12:15 PDT, Eric Seidel (no email)
no flags Details
First attempt (4.14 KB, patch)
2008-03-29 11:41 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Now with testcase (6.33 KB, patch)
2008-03-30 13:06 PDT, Rob Buis
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-10-21 12:14:21 PDT
marker property doesn't show up correctly as "shorthand" in inspector

SVG marker CSS property is parsed with some custom code in SVGCSSParser which seems to confuse the "shorthand" accessors on CSSComputedStyle.  The inspector seems to display them as 3 properties instead of as one with a disclosure triangle.  Additionally, it highlights "marker-start" as a real property in the inline style declaration, and fades marker-mid and marker-end as though they were implicit.

I'm not sure if to fix this (minor) bug we'd need to fix the inspector or the SVG CSS parsing code.  But probably best to fix the parsing code.
Comment 1 Eric Seidel (no email) 2007-10-21 12:15:45 PDT
Created attachment 16768 [details]
example file with marker (use inspector to see bug)
Comment 2 Rob Buis 2008-03-29 11:41:38 PDT
Created attachment 20201 [details]
First attempt

This patch makes the marker property show up much better in the Inspector.
There is some confusion on the exact marker property syntax, see:

http://lists.w3.org/Archives/Public/www-svg/2008Mar/0093.html

I think that needs to be clarified before this can go in.
As for tests, AFAIK it is impossible to test how it looks in the Inspector. However I guess it makes sense to test getPropertyValue("marker") on
the CSSStyleDeclaration.
In the meantime, the code can be reviewed I guess.
Cheers,

Rob.
Comment 3 Eric Seidel (no email) 2008-03-29 12:09:58 PDT
Comment on attachment 20201 [details]
First attempt

This looks good to me. But Hyatt should confirm.
Comment 4 Eric Seidel (no email) 2008-03-29 12:10:22 PDT
Adding our resident ShorthandScope expert to confirm this (simple) patch is correct.
Comment 5 Rob Buis 2008-03-30 13:06:50 PDT
Created attachment 20217 [details]
Now with testcase

This one add a testcase for the changed getPropertyValue behaviour regarding marker. We now return the same value as Opera and FF do.
Cheers,

Rob.
Comment 6 Darin Adler 2008-03-30 16:43:41 PDT
Comment on attachment 20217 [details]
Now with testcase

r=me
Comment 7 Rob Buis 2008-03-30 23:51:36 PDT
Landed in r31453.