From e36fef7d312e226988c9733b03b18089bdf3e295 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sun, 24 Aug 2025 18:02:58 +0200 Subject: Consider also the current element display:none The display_none flag is only set _after_ the open tag has run, so it will only affect child elements. If the current form input element has a display:none itself, it should be also considered. The new function a_Html_should_display() evaluates both conditions. --- src/html.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/html.cc') diff --git a/src/html.cc b/src/html.cc index c06fd172..17bba438 100644 --- a/src/html.cc +++ b/src/html.cc @@ -4026,6 +4026,17 @@ static void Html_display_listitem(DilloHtml *html) } } +bool a_Html_should_display(DilloHtml *html) +{ + if (S_TOP(html)->display_none) + return false; + + if (html->style()->display == DISPLAY_NONE) + return false; + + return true; +} + /** * Process a tag, given as 'tag' and 'tagsize'. -- tagsize is [1 based] * ('tag' must include the enclosing angle brackets) -- cgit v1.2.3