RFR: 8280020: Underline and line-through not straight in WebView [v5]
Jay Bhaskar
duke at openjdk.java.net
Tue Mar 1 03:24:58 UTC 2022
On Mon, 28 Feb 2022 15:12:37 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Jay Bhaskar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> New chnages for line test
>
> tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java line 168:
>
>> 166: int width = (int)webView.getEngine().executeScript("document.getElementsByTagName('div')[0].getBoundingClientRect().width");
>> 167:
>> 168: int line_start_x = start_x;
>
> You might want to add a small amount (`DELTA`?) to avoid sampling at the edge.
In test html , the margin and padding is 0 px. it would be ok to add DELTA, done
> tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java line 173:
>
>> 171: String line_color = "rgba(0,0,0,255)"; // color of line
>> 172: System.out.println(line_end_x);
>> 173: System.out.println(line_start_y);
>
> Once you are done debugging the test, you can remove these print statements.
ok,
> tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java line 177:
>
>> 175: for (int x = line_start_x; x < line_end_x; x++) {
>> 176: String color = colorToString(pr.getColor(x, line_start_y));
>> 177: assertEquals(color, line_color);
>
> The arguments are backwards (the expected value goes first).
done
-------------
PR: https://git.openjdk.java.net/jfx/pull/731
More information about the openjfx-dev
mailing list