WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 17129
XML ProcessingInstructions do not support title= or alternate= attributes
https://bugs.webkit.org/show_bug.cgi?id=17129
Summary
XML ProcessingInstructions do not support title= or alternate= attributes
Oliver Hunt
Reported
2008-01-31 17:40:32 PST
The referenced URL allows you to choose between multiple style sheets for the svg doc, however the first rendering seems to have an incorrect style (cf. firefox3 rendering which seems sane). Furthermore, clicking the little coloured squares should trigger a style change but results in the svg going black.
Attachments
Copy of test svg
(3.76 KB, image/svg+xml)
2008-02-05 03:57 PST
,
Oliver Hunt
no flags
Details
First attempt
(7.40 KB, patch)
2008-04-05 08:41 PDT
,
Rob Buis
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
2008-02-05 03:57:34 PST
Created
attachment 18934
[details]
Copy of test svg Copy of the svg that trigger this. From looking at this i'm guessing that the bug is that we arbitrarily take the last style sheet reference, regardless of the alternate attribute. When then toss all the other style sheets so subsequent attempts to switch to those style sheets fails.
Rob Buis
Comment 2
2008-04-05 08:41:40 PDT
Created
attachment 20353
[details]
First attempt It turned out this is not really a svg bug, but an omission in the xml-stylesheet handling. This patch fixes that. Cheers, Rob.
Rob Buis
Comment 3
2008-04-05 11:15:39 PDT
I forgot to mention that FireFox passes the same tests, so it must do the pseudo attribute processing too. Cheers, Rob.
Eric Seidel (no email)
Comment 4
2008-04-05 13:23:24 PDT
Comment on
attachment 20353
[details]
First attempt Ok, this patch looks good. Unfortunately the method names are confusing (not your fault).
Eric Seidel (no email)
Comment 5
2008-04-05 13:26:24 PDT
Comment on
attachment 20353
[details]
First attempt Oh, one style comment. single line ifs, the contents should be on the second line: if (foo) return; should be: if (foo) return; Also, if you're going to use: if (foo != true) instead of the normal if (!foo) for that case, then you should use: if (foo !== true) to actually check the type returned. Otherwise: if (foo) or if (!foo) is doing the same thing and should be used instead.
Rob Buis
Comment 6
2008-04-05 13:47:27 PDT
Hi Eric, (In reply to
comment #5
)
> (From update of
attachment 20353
[details]
[edit]) > Oh, one style comment. > > single line ifs, the contents should be on the second line: > if (foo) return; > should be: > if (foo) > return; > > Also, if you're going to use: > if (foo != true) instead of the normal if (!foo) for that case, then you should > use: > if (foo !== true) to actually check the type returned. Otherwise: > if (foo) or if (!foo) is doing the same thing and should be used instead.
Oops, I saw this only after my commit. I assume that was code from the testcase(s). Let me know if it needs fixing in a new commit. Cheers, Rob.
Eric Seidel (no email)
Comment 7
2008-04-05 14:48:28 PDT
It's OK. I'll just be more picky about style next time. ;)
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