Block-level replaced element margins

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Block-level replaced element margins

Boris Zbarsky
On reflow branch, the following testcase seems to be broken:

   <img src=""
        style="display: block; margin: auto">

The image ends up left-aligned.  I assume that the issue is that
nsBlockReflowContext::AlignBlockHorizontally has been removed and the replaced
element cases in nsHTMLReflowState can't call CalculateBlockSideMargins without
calculating a useful mComputedWidth first, right?

Perhaps we should add a GetIntrinsicHeight() method on nsIFrame (returns 0 by
default, overridden by things that have an intrinsic height) and try to actually
implement the intrinsic-sizing algorithms CSS2.1 describes?

dev-tech-layout mailing list
[hidden email]