Hi everybody,
newbie here...
I'm a bit confused about how the whole mozilla layout business works.
Probably it doesn't help that I'm trying to understand xul layout,
html layout and a sprinkling of GTK+ layout all at once.
Let's assume for a second an html document with a snippet such as:
<div id="div1">
<div id="div2">
<div id="div3" width="45px" style="display:inline">Meoow</div>
<div id="div4" width="50%" style="display:inline">Wooof</div>
</div>
</div>
The way I understand it is that after the document has been parsed and
stored in the appropriate structures (content model, css rule tree
etc...), the Frame Constructor creates the appropriate frame objects.
Then (and I might be mixing-up with GTK+ here) div1 asks to div2 how
wide it wants to be. div2 in turn ask to div3 and div4 how wide they
want to be. If both div3 and div4 used absolute measurements such as
px or mm the measurements would simply bubble back up to div1 who
would then proceed to set the size and position for div2 who in turn
would set the sizes and positions of div3 and div4.
However, div4 sports a percentage, a measurement relative to its
parent div2. But at this stage we don't know yet how wide div2 is
going to be. So, how can div2 respond something meaningful to div1's
original enquiry?
Apologies if my current understanding is quite tangled up and what I
just described is not even close to how Mozilla layout works! =)
Manu
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout