On Fri, Feb 14, 2014 at 11:42 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 2/13/14 4:48 PM, Patrick Walton wrote: > >> The pull request #1681 takes approach #2. It deals with the parallel >> hazard by deferring height computation of absolutely positioned blocks >> until display list construction time (which is top-down). >> > > I sort of think that the right time to do absolutely positioned stuff in > general is in a completely separate pass after the "main" layout is done. > > We've run into this in Gecko as well; that's what held up supporting > relpos table-cell as an abs pos containing block. The way table (or > flexbox, I suspect) layout works is that you do a pass, do some layout, > then go back and fix up all your sizes. You need to either do the abs pos > stuff _after_ the fixup or at least fix it up after the fixup, and the > latter starts placing constraints on exactly how you can do your fixup. > > So the way I was envisioning layout with abspos stuff involved is that you > go through without descending into abspos kids and do layout. Whenever you > see an abspos kid during this process you add it to a list. > Yes, that's a nice way to think about it. There are two problems with it: 1) CSS Exclusions. But you need to do multipass layout for exclusions anyway, so that has to be solved with an exclusions-specific pass, so never mind. 2) Fragmentation. With something like overflow:fragments, absolute positioning can affect the number of fragments you generate, which can affect the size of the container of the fragments. Let me use this opportunity to remind people that fragmentation and writing-mode are stuff we should be building into Servo now-ish because they affect everything else. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo