[webkit-dev] Relative Positioning in layout() for MathML's msubsup
Alex Milowski
alex at milowski.org
Wed Aug 26 17:04:47 PDT 2009
I'm working on a number of MathML constructs where I'd like to adjust
the layout after the children objects have had their layout determined.
For example, for msubsup, the base has both a subscript and a
superscript. Both the subscript and superscript should be positioned
so that their left edge aligns. If you know the size of the superscript's
box, you can position it relative within the container (an inline-block)
and shorten the inline-block.
You can't do this with CSS directly because you need to render
all the elements embedded in either the subscript or superscript to
know how to adjust the layout. It also isn't a table as the sub/super
scripts overlap the "rows".
I'm having trouble accomplishing this as I can calculate the adjustment
and change the style in layout() but I can't seem to get the layout to
actually change where the boxes are placed.
Attached is an example with the MathML and a simple example of
using Javascript to make the same adjustment. Ignore the fact that
my example isn't formatted perfectly! :)
--
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subsup.xhtml
Type: application/xhtml+xml
Size: 851 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090826/fca91396/attachment.bin>
More information about the webkit-dev
mailing list