RFR: 8335967: "text-decoration: none" does not work with "A" HTML tags

Abhishek Kumar abhiscxk at openjdk.org
Thu Jul 25 08:30:32 UTC 2024


On Wed, 24 Jul 2024 17:09:22 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> After I integrated [JDK-8326734](https://bugs.openjdk.org/browse/JDK-8326734), there's no way to remove text decoration from an HTML element. The most common HTML element is `<a>` which is usually rendered _underlined_. You could add an inline style or apply a rule with `text-decoration: none` to remove underline.
> 
> This fix restores this functionality.
> 
> The test contains five cases. The first case ensures the `<a>` element is rendered with underline by default. The second and third cases verify that underline is removed if `text-decoration: none` is added to the `style` attribute or is applied by a style-sheet rule.
> 
> The fourth and fifth cases verify that underline is preserved the containing element, `<p>` in this case, has `text-decoration: underline`.
> 
> These five cases render the same way in browsers. However, the fourth and fifth cases render without underline in JDKs without JDK-8326734.

test/jdk/javax/swing/text/html/HTMLDocument/HTMLTextDecorationNone.java line 37:

> 35: /*
> 36:  * @test
> 37:  * @bug 8323801 8326734

Is it correct to have these bug ids in jtreg tag?
I think you should add 8335967 bug id .

test/jdk/javax/swing/text/html/HTMLDocument/HTMLTextDecorationNone.java line 38:

> 36:  * @test
> 37:  * @bug 8323801 8326734
> 38:  * @summary Tests different combination of 'underline' and 'line-through';

Need to update summary ?

test/jdk/javax/swing/text/html/HTMLDocument/HTMLTextDecorationNone.java line 40:

> 38:  * @summary Tests different combination of 'underline' and 'line-through';
> 39:  *          the text should render with both 'underline' and 'line-through'.
> 40:  * @run main HTMLTextDecoration

I guess It is supposed to run `HTMLTextDecorationNone` test not `HTMLTextDecoration`
Suggestion:

 * @run main HTMLTextDecorationNone

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20313#discussion_r1691020413
PR Review Comment: https://git.openjdk.org/jdk/pull/20313#discussion_r1691036662
PR Review Comment: https://git.openjdk.org/jdk/pull/20313#discussion_r1691034315


More information about the client-libs-dev mailing list