On Tue, Nov 09, 2010 at 09:40:19PM +0000, corvid wrote:
Johannes wrote:
I just noticed one thing that might complicate stuff a bit. Consider the following page:
<div style="text-indent: 3em; border: 1px solid"> <div style="text-indent: 3em; border: 1px solid"> foo </div> bar </div>
It seems that the inner <div> should not be indented, just text. The spec says: "More precisely, it specifies the indentation of the first box that flows into the block's first line box"
I'd interpet it in dillo terms as to do the indent only if the first word is not a textblock widget.
As in the attached?
Yes, but also for Tables. What other widgets do we have? Bullet I guess they are inline Images are inline I think Ruler this is block level, so needs no indent ListItem do we need to check for it or will it show up as Textblock::CLASS_ID? TableCell same as for ListItem We probabely want some isBlockLevelWidget() function...
The question is then whether the "bar" should be indented. From the spec I would say yes, but firefox does not seem to do it...
What do you think?
My impression is that the inner div is a block, and the bar goes into an anonymous block according to the spec, and the anonymous block inherits text-indent, and would indent it, but the spec is a little monstrous, so there may be some reason why that's not it. I would think the intention of text-indent is only to indent the first thing...
Sounds reasonable. Cheers, Johannes