RFR: 8326734: text-decoration applied to <span> lost when mixed with <u> or <s>

Harshitha Onkar honkar at openjdk.org
Tue Apr 9 21:02:11 UTC 2024


On Tue, 9 Apr 2024 20:16:17 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> test/jdk/javax/swing/text/html/HTMLDocument/HTMLTextDecoration.java line 90:
>> 
>>> 88:             <div class="lineThrough"><p class="underline">underline + line-through?</p></div>
>>> 89: 
>>> 90:             <div class="underline"><div class="lineThrough">underline + line-through?</div></div>
>> 
>> The test fails when multiple CSS classes are on the same tag. Are we considering such cases as part of this fix?
>> 
>> For instance `<div class="underline lineThrough">This text should be striken</div>`
>> When testing on a normal HTML editor, the 1st class - underline is overriden and lineThrough is applied since both are related to text-decoration.
>> But when tested using HTMLTestDecoration.java it is not striken as expected.
>> 
>> For example: 
>> 
>> <!DOCTYPE html>
>> <html lang="en">
>>    <head>
>>       <meta charset="UTF-8">
>>       <title>underline + line-through text</title>
>>       <style>
>>          .underline   { text-decoration: underline }
>>          .lineThrough { text-decoration: line-through }
>>       </style>
>>    </head>
>>    <body>
>>       <div class="underline lineThrough">This text should be striken</div>
>>    </body>
>> </html>
>
> I'm pretty sure there are other cases where `text-decoration` isn't resolved correctly. It is not a goal to resolve all of the possible issues.
> 
> I'll check whether this scenario can be handled easily. I don't think it is. If not, I'll submit another bug.

Sounds good.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18550#discussion_r1558283742


More information about the client-libs-dev mailing list