On 1/09/10 8:20 AM, L. David Baron wrote:
Now that we have layers, it doesn't seem this straightforward.  I
recognize that I'd need the wrapping display item in more cases (for
the replaced elements that have layers:  canvas and video).  But it
also seems that nsDisplayClip works differently; we now accumulate
clip rects in ContainerState::ProcessDisplayItems, and I think
layers only support a single clip rect.

Correct.

However, it seems like I ought to be able to make things work the
same way SVG effects work; they (in
nsSVGIntegrationUtils::PaintFramesWithEffects) paint their display
list to a thebes context.  (Presumably that still works even if
there are child layers inside that list?)  This seems slow, though,
but it also seems like it's probably ok if some of these edge cases
are slow.

Correct.

You can call nsDisplayList::PaintForFrame to paint a display list to an arbitrary context. Just pass PAINT_DEFAULT. This will work even if the content underneath has child layers. It'll be slow for those layers, in particular video layers, but for normal Web content this should be just fine.

Post-FF4 we need to add clip-path/mask functionality to layers so we don't need to do this.

Rob
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to