RFR: 7083187: Class CSS.CssValue is missing implementations of equals() and hashCode() [v7]

Alexey Ivanov aivanov at openjdk.org
Mon May 22 15:21:52 UTC 2023


On Mon, 22 May 2023 10:54:24 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> I don't think you need to. In this case, AttributeSets are compared. All the relative units will result in different computed value depending on the element they're applied to.

Here's a [sample HTML file](https://cr.openjdk.org/~aivanov/7083187/percentage-values.html). Both `<p>` and `<span>` element have CSS rule `font-size: 200%`. The computed value for `p` is based on its parent font size, which is the `body` element. The computed value of `span` is also based on its parent font size, its parent is `p` element, therefore the font-size of `span` is twice as large as in `p` and four times larger compared to `body`.

At the same time, the attribute sets applied to `p` and `span` should be considered equal because they contain the same rules.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13405#discussion_r1200665776



More information about the client-libs-dev mailing list