Just yesterday, I added the DISPLAY_NONE to dillo mainline, just as you did here :-)
Oh, I just had a look at your private repository and noticed that it wasn't yet implemented. :)
I'm still uncertain on what to do in case that DISPLAY_NONE is set. As you noticed it's not enough to not call the tag open functions, as text will still be added.
I'd suggest to add the elements to the dw representation regardless of their "display" value. But we should introduce a 'flag' that disables drawing of elements with "display: none".
Also I don't know, whether e.g. inputs in forms which have DISPLAY_NONE, should send their contents to the server in case of submit, or should they be just non-existent?
Since CSS only "describes the presentation semantics" (Wikipedia), the form elements are still available but 'hidden'. In Gecko, the DOM contains hidden elements as well. "display: none" is commonly used for menus: With the help of JavaScript, you could fiddle inside the DOM and toggle "display"-value to make the submenu visible.
Regarding tagIsDisplayEnabled, I don't quite follow what you intended? I had added this flag to gradually transform the Html_tag_open_*() functions to the new display handling. It can only be removed once all these functions have been converted.
I thought the only sense in implementing tagIsDisplayEnabled was to prevent Dillo to crash? While playing around with DISPLAY_NONE detection, the "stack->getRef (stack->size () - 1)->style == NULL" assert failed for Html_tag_open_body(). Checking html->styleEngine->style ()->display for DISPLAY_NONE resulted in initializing the style engine too early.
Hm, maybe you are right and as long as the corresponding tags are set to DISPLAY_INLINE, which is the default, it would work even without the tagIsDisplayEnabled flag. Anyway, I think it's still a good marker to see which functions have been converted.
To what extent would they need to be converted? Why do we care at all if a tag supports the "display" attribute? --Tim