w3c / css-validator

W3C CSS Validation Service
https://jigsaw.w3.org/css-validator/
Other
204 stars 105 forks source link

Instanceof Check Before Cast #387

Closed RichardCox09 closed 1 year ago

RichardCox09 commented 1 year ago

I tested it on the following example:

#foo {border-width: 0; image-rendering: auto; vertical-align: bottom; }

Without setting the ApplContext to css3svg, the image-rendring: auto; property is a CSS3Style. That will be tried to be cast to SVGBasicStyle without even checking if that's possible. This caused ClassCastException.

Can be recreated on the online validator too, if you set the options from CSS3 + SVG to only CSS3.

ylafon commented 1 year ago

Thanks for this, however the issue is that the old inheritance tree is no longer the right one, and it is part of the few properties that have not been fixed properly.

ylafon commented 1 year ago

b7153af33d0c4c3e7ca38358af462568147edec7 fixed it. Thanks again!