Subject: bug#59549: EWW ordered list display irregularity

From: Jim Porter <[email-masked]>
Date: Tue, 5 Nov 2024 11:50:19 -0800

On 11/5/2024 9:10 AM, Eli Zaretskii wrote:
>> From: Sebastián Monía <[email-masked]>
>> Cc: [email-masked]
>> Date: Tue, 05 Nov 2024 09:38:28 -0500
>>
>> If we think it is OK to render the empty items, then we could close this
>> bug instead of merging. Either way, one less item in the TODO list ;)
> 
> Thanks.
> 
> I'm not enough of an HTML expert to be sure that this is the right fix
> in general, sorry.  I hope someone else will be able to tell.

I think the current behavior with the empty list item is correct, 
actually. Other browsers don't show the list item (and renumber the list 
as appropriate) because the CSS rule for ".mw-empty-elt" has "display: 
none". EWW/SHR don't parse CSS[1], and so we show the empty item.

You can see the same "problem" in Firefox if you load 
<https://en.wiktionary.org/wiki/locus#Noun> and go to View -> Page Style 
-> No Style. Since that's roughly what EWW/SHR is doing, I think we're 
consistent with other browsers here.

[1] Well, they can parse some limited inline CSS using the "style" 
attribute, but that doesn't apply here since the styling comes from a 
CSS class.