Try parsing the following CSS:
foo {
background: #e8eff5
url(../images/bottom-angle.png) no-repeat;
}
or, equivalently (though it's a different colour):
foo {
background: rgb(10,11,12)
url(../images/bottom-angle.png) no-repeat;
}
In both cases, everything after the colour (e.g. the
url and no-repeat) gets dropped from the parsed value.
We think this might be a bug somewhere in the
CSSValueImpl constructor, but we aren't sure.
My email address is dan.cooperstock@quest.com.
Anonymous
Logged In: YES
user_id=1260146
OK, I think I have a fix for this. Change line 63 (I think),
which is the first line of code in its two-argument
constructor, from the following:
if (value.getParameters() != null) {
to this:
if (value.getNextLexicalUnit() == null &&
value.getParameters() != null) {
I'm not sure that I can explain why it works, but it does
seem to work.
Logged In: YES
user_id=491022
Originator: NO
A Duplicate bug report exists:
http://sourceforge.net/tracker/index.php?func=detail&aid=1202593&group_id=82996&atid=567969
Logged In: NO
For anybody interested that fix works for me too and I have made the changes to our version of the parser, does anybody have the power to check this fix in? is this project still maintained?
Cheers Dan...good work fella!
Logged In: NO
I traced through the problem in the debugger BEFORE I found out about this bug entry. The function gets passed a 'value' parameter. For shorthand CSS properties, this can contain several values in a doubly-linked list.
The buggy code is only looking at the first value, sees that there's an RGB value and constructs an RGB object for the CSS property.
Adding the check to see if there's more than one value for the property, results in the code to iterate through all the properties and add them to this CSS property.
If this fix isn't made soon, I'd suggest forking the project, so changes can be made.
Logged In: YES
user_id=1109422
Originator: NO
This seems to be fixed now; I've added a regression unit test.