|
1 |
| -# css4j version 5.1 Release Notes |
| 1 | +# css4j version 5.2 Release Notes |
2 | 2 |
|
3 |
| -### January 24, 2025 |
| 3 | +### February 23, 2025 |
4 | 4 |
|
5 | 5 | <br/>
|
6 | 6 |
|
7 | 7 | ## Highlights
|
8 | 8 |
|
9 |
| -### Advanced attr() values |
| 9 | +### Better handling of mathematical functions |
10 | 10 |
|
11 |
| -The advanced `attr()` support now follows the current Values Level 5 specification. |
| 11 | +The handling of mathematical functions is now much faster, and the `round`, `mod`, `rem`, `log` and `exp` functions from Values 4 were implemented. |
12 | 12 |
|
13 |
| -Although this library has supported the advanced `attr()` value for years now, |
14 |
| -it was implementing an old version of the specification which is substantially |
15 |
| -different to the current one. The new spec is so recent that the old one is |
16 |
| -still used by at least one CSS specification (CSS Lists 3) in their sample style |
17 |
| -sheet for HTML. |
| 13 | +The library is now on parity with the CSS numeric functions supported by modern web browsers. |
18 | 14 |
|
19 |
| -This library should be compatible with the `attr()` which is shipped with the |
20 |
| -forthcoming Google Chrome 133. |
| 15 | +### `src()` values |
21 | 16 |
|
22 |
| -The old `CSSAttrValue` and `AttrValue` classes were removed, as the API is |
23 |
| -incompatible with the new specification that is being implemented by browsers. |
| 17 | +The `src()` function is now considered a valid URL value, and therefore matches `<url>` and `<image>`. |
24 | 18 |
|
25 |
| -### More compliant registered custom properties |
| 19 | +### Update of `background` and `mask` shorthands |
26 | 20 |
|
27 |
| -Also, the handling of registered custom properties is now closer to the Google |
28 |
| -Chrome behaviour: registered initial values take precedence over the fallbacks. |
| 21 | +Both shorthand properties now behave according to the latest specification, supporting all the new identifiers in `background-clip` and `mask-clip`. |
29 | 22 |
|
30 |
| -#### Circularity behaviour changed |
| 23 | +### Values of `border-width` identifiers |
31 | 24 |
|
32 |
| -On the other hand, when `var()` circularities (and other apparent DoS attacks) |
33 |
| -are found, it is no longer attempted to use the supplied property fallbacks. |
| 25 | +The main browsers consistently use the same figures for the computed values of border-width's `thin`, `thick` and `medium` identifiers, which were subsequently defined in May 2022. |
34 | 26 |
|
35 |
| -It has been found that some websites send content with, for example, |
36 |
| -`--foo:var(--foo,fallback)` circularities to non-browser user agents, in what |
37 |
| -could be a strategy against web crawlers. Due to the kind of use cases that this |
38 |
| -library has, it was determined that it is preferable to just report the |
39 |
| -circularity and invalidate the whole value. |
40 |
| - |
41 |
| -If your use case is negatively affected by this decision, please open an issue. |
| 27 | +This leads to the deprecation of `StyleDatabase.getWidthSize`. |
42 | 28 |
|
43 | 29 | <br/>
|
44 | 30 |
|
45 | 31 | ## Detail of changes
|
46 | 32 |
|
47 |
| -- The advanced `attr()` support now follows the current Values Level 5 |
48 |
| - specification. |
49 |
| -- NSAC: drop `EMPTY` units in `countReplaceBy()`. |
50 |
| -- NSAC: have `getParameters()` return the sub-values if this is an expression |
51 |
| - or a unicode range. |
52 |
| -- DOM wrapper: improved serialization of element nodes. |
53 |
| -- Gradle: use the assignment operator in the maven repo section. |
54 |
| -- Upgrade Gradle wrapper to 8.12.1. |
55 |
| -- Upgrade to JUnit 5.11.4. |
56 |
| -- Upgrade to Jazzer 0.23.0. |
57 |
| -- Upgrade to checkstyle 10.21.1. |
58 |
| -- Bump year to 2025 in copyrights. |
| 33 | +- NSAC,CSSOM: support the `round`, `mod`, `rem`, `log` and `exp` functions from Values 4. |
| 34 | +- NSAC,CSSOM: more efficient handling of functions. |
| 35 | +- NSAC,CSSOM: support `src()` values. |
| 36 | +- CSSOM: add method `getFloatValue()` to `CSSTypedValue`, to retrieve raw value. |
| 37 | +- CSSOM: implement `Cloneable` in `StringList` and `CSSFontFeatureValuesMap` implementation. |
| 38 | +- CSSOM: add `ShorthandDatabase.getInstance(ClassLoader)`. |
| 39 | +- CSSOM: deprecate `StyleDatabase.getWidthSize`. The `thin`, `thick` and `medium` identifiers have fixed values since May 2022, see CSSWG issue 7254. |
| 40 | +- CSSOM: support `text` and `border-area` as `background-clip` values. |
| 41 | +- CSSOM: support `border`, `padding`, `content` and `text` as `mask-clip` values. |
| 42 | +- CSSOM: ignore case when optimizing `background-position` in `getPropertyValue("background")`. |
| 43 | +- CSSOM: avoid unlikely NPE when optimizing `getPropertyValue("background")` of a declared style when `background-origin` is not set. |
| 44 | +- CSSOM: avoid unlikely NPE when optimizing `getPropertyValue("mask")` of a declared style when `mask-origin` is not set. |
| 45 | +- CSSOM: other updates to `background` and `mask` shorthands. |
| 46 | +- CSSOM: use private constructors in a few singleton classes. |
| 47 | +- Agent: use a more modern user agent identification string. |
| 48 | +- Tests: clean up HTMLDocumentTest. |
| 49 | +- Upgrade Jazzer to 0.24.0. |
| 50 | +- Upgrade to checkstyle 10.21.2. |
| 51 | +- README: use the assignment operator in the Gradle example. |
0 commit comments