Commit 1eb2aed
committed
fix: Handle calc() with number type in CSS position checking
Bug: A conic-gradient() position containing a calc() that resolves
to a number causes a ClassCastException to be thrown.
Cause: CssCalc.getLength() only handled computed_type == CSS_LENGTH.
When CssBackgroundPosition.checkSyntax() calls getLength() on a
calc with computed_type == CSS_NUMBER, it falls through to the throw.
Fix: Delegate to the inner value’s getLength() when computed_type is
CSS_NUMBER, matching how CssNumber.getLength() handles the zero-check.1 parent e62bbcf commit 1eb2aed
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
413 | 421 | | |
414 | 422 | | |
415 | 423 | | |
| |||
0 commit comments