RFR: JDK-8315876 Open source several Swing CSS related tests [v3]
Harshitha Onkar
honkar at openjdk.org
Tue Sep 19 00:06:44 UTC 2023
On Mon, 18 Sep 2023 10:28:11 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review changes
>
> test/jdk/javax/swing/text/html/CSS/bug4764897.java line 99:
>
>> 97:
>> 98: if (viewName.endsWith("CellView")) {
>> 99: cellsWidth = r.getBounds().x + r.getBounds().width;
>
> This looks weird to me: why does `cellWidth` include the `x` coordinate in its width? Perhaps, the variable is named incorrectly.
>
> It looks we care about the last cell in the table only, and it is to be positioned so that it fits inside the table. In other words, the last cell is within table bounds, that's why `x + width` is used.
Looks like a valid explanation as to why `x + width` is used.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329402886
More information about the client-libs-dev
mailing list