On Tue, Dec 08, 2009 at 06:56:55PM +0100, Johannes Hofmann wrote:
Hi,
I started to experiment with the real solution, which means that the display member of Style determines whether a (Text)block is created or a ListItem, or whether just normal text is added. The patch is still small, but as the change is pretty fundamental, so I decided to put it in a separate repo for now. You can find it at:
I've updated this prototype a bit. It works quite well, the only drawback is the added complexity in html.cc. In addition to Html_tag_open_*() and Html_tag_clone_*(), there now is an optional Html_tag_content_*() function for tags that create widgets or other content. This function is not called in the display:none case. The reason for the splitting into Html_tag_open_*() and Html_tag_content_*() is that styleEngine->setNonCssHints() is needed before we can get the current style. Only after that is done, we know the value of the display property and can decide whether to call Html_tag_content_*() or not. I'd like to get this into main line soon if you agree. Please let me know what you think. Cheers, Johannes