Jorge wrote:
On Fri, May 08, 2009 at 03:53:03AM +0000, corvid wrote:
Is a whitespace entity inside a word supposed to be treated like normal whitespace?
I thought it would be, but first I saw that adjacent ... aren't collapsed, then I realized that we are leaving the space inside the word instead of calling addSpace, and then I saw that PrevWasSPC isn't set if the space was at the end of the word.
If it's just something that no one ever got around to dealing with, I'll make a patch.
That hits into a deeper problem: the treatment of whitespace is not well defined inside the textblock yet. The same problem arises when handling NBSP. There's no clear definition on how to handle/flag it. If you're willing to study the textblock word wrapping, and the whitespace problem, great! I think the next big step for dillo is to handle DIV as a floating word (so it can be rendered side by side, as intended), and AFAIS that needs changes in the textblock. This is a task for 2.2.
I have some Textblock code around to fix "white-space: nowrap" (which shows up a lot on wikipedia, where the category stuff at the bottoms of pages is displayed badly) that I've been saving for discussion after this release. I have absolutely no clue about floating, though, and have been hoping that Johannes will develop an interest in it :)