WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 55119
Bug 48120
SVGColor::cssText() shouldn't return #RRGGBBAA colors
https://bugs.webkit.org/show_bug.cgi?id=48120
Summary
SVGColor::cssText() shouldn't return #RRGGBBAA colors
Andreas Kling
Reported
2010-10-22 03:36:02 PDT
For SVG_COLORTYPE_RGBCOLOR, SVGColor::cssText() currently returns Color::name() which uses #RRGGBBAA notation for colors with alpha < 255. These color values are not valid CSS and can't be set. We should return spec compliant serialized colors (i.e using rgba() notation for colors with alpha.)
Attachments
Proposed patch
(11.48 KB, patch)
2010-10-22 03:43 PDT
,
Andreas Kling
darin
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2010-10-22 03:43:21 PDT
Created
attachment 71545
[details]
Proposed patch
Darin Adler
Comment 2
2010-10-22 03:48:21 PDT
Comment on
attachment 71545
[details]
Proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71545&action=review
Fix looks good, but tests do not.
> LayoutTests/ChangeLog:9 > + Color::serialized() is already exercised in depth by fast/canvas tests.
Sure, it’s good that function has good test coverage, but this patch doesn’t include a test case for the bug you are fixing! These test results only show that we are switching from uppercase hex to lowercase hex.
Dirk Schulze
Comment 3
2010-10-22 03:49:47 PDT
Ok, the problem is, that SVG doesn't support RGBA. But we added RGBA support recently with rgba(..,..,..,..). This is a violation of the specification, but a useful one. Therefor SVG_COLORTYPE_RGBCOLOR is also a unlucky name now, since it implicates that there are just three channels (what the spec explicitly wants). We should look what the other Browsers are doing and should definitely write to the www-svg mailing list. Didn't take a look at the SVG 1.1se specification, but I doubt that someone specified it yet. This is also a topic the svg-css task force should look at. Can you investigate more please?
Nikolas Zimmermann
Comment 4
2011-02-25 00:49:16 PST
For now, we shouldn't exose these colors through CSS, as long as it's not specified how. I'll also ask on the SVG WG, now that I'm a member :-)
Bug 55119
rewrites SVGColor/SVGPaint to be spec compilant, and depends on this bug to be fixed, as well. *** This bug has been marked as a duplicate of
bug 55119
***
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