[Webkit-unassigned] [Bug 14449] REGRESSION (r14345-r14375): Absolutely positioned image does not scale to containing element's height

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 5 22:57:57 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14449





------- Comment #7 from mitz at webkit.org  2007-07-05 22:57 PDT -------
(In reply to comment #4)
> What does the CSS spec say about this? Are absolute positioned replaced
> elements supposed to be sized relative to the containing block or relative to
> the parent?

I'd like to point out that this patch isn't about replacing "relative to the
containing block" with "relative to the parent": in the first case in the
layout test, the "container" div is both the parent and the containing block
(and in fact both container() and containingBlock() return it). The thing is
that the current code skips over containing blocks with 'height: auto', since
in the case of a non-positioned child, the child's height affects the parent's
height so you can't define the former in terms of the latter. However,
positioned elements don't affect their ancestor's height, which is known (and
'final') by the time they are laid out.

Anyway, the spec says:
"Percentage intrinsic heights are evaluated with respect to the containing
block's height, if that height is specified explicitly, or if the replaced
element is absolutely positioned". Admittedly, I don't know what a "percentage
intrinsic height" is in that (or any) context, but there is no other reference
to percentage heights in
<http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height> (which is
referenced from 10.6.5), so either that's the spec or the case is unspecified
in which case matching Firefox seems like a good idea anyway.

(In reply to comment #5)
> (From update of attachment 15407 [edit])
> Can't you just use the current block container height?

Sorry, that was too vague for me. I'm not sure what you're suggesting. In the
relative inline case I think it makes more sense to use the inline's height.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list