>On Tue, Mar 11, 2014 at 1:53 AM, <abu...@adobe.com> wrote: > >We currently have two methods of painting content flows. The multi-column >flows are painted using a special fragment structure at a layer level. >For regions we use a different mechanism that's based on clipping >information collected during layout. We didn't > have this landed yet when I wrote those blog posts so they are a bit >outdated in this regard. > >During the layout we construct the clippling rectangles (visual overflow) >in each fragmentation container for the objects inside the fragmented >flow. When a monolithic object is too large to fit a fragment container >we apply different clipping rectangles for > the box decorations of its container and the foreground of the object. >This way the container of the object will not paint its >background/borders where only the object should be painted. > >As a result, we can now correctly render relatively positioned object >fragments by just translating the clipping area together with the >objects. Transforms will follow but they shouldn't change too much >besides adjusting the coordinate system to take into account > fragmentation. > > > > >How do you handle the case where two elements belong to different >fragments of the same fragmentainer but overlap in unfragmented space?
Could you give me an example of that situation? It¹s not very clear to me what case you are talking about so I can only speculate. To elaborate a bit what I said in my previous email: 1. Two fragments overlap during the layout (e.g. negative margins). This case is handled correctly because layout is the step when fragmentation actually occurs. Pagination struts and other techniques are applied to actually construct the fragments internally. 2. Two fragments overlap at paint time because they¹ve been shifted somehow from their layout positions (e.g. relative positioning, transforms etc.). In WebKit, this implies the shifting objects get a so called self-painting layer. These kind of objects know how to paint themselves as groups. Using the clipping information computed during the layout, the layers can contain their fragments correctly. Also, we have the so called concept of a region range. This range is associated with an element and it represents the regions that element is flowed into. For monolithic elements (images, videos etc.) that range has a length of one. During paint time, we apply paint rejection outside of that range so even though a monolithic element is taller than the region it belongs to, it will not be painted in the following regions. This way we avoid content slicing. If you want to play around with the feature, I¹ve bootstrapped a simple example with three regions that should work on WebKit nightly: http://codepen.io/abucur/pen/lxrnk > > >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 > > Thanks, Andrei. _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo