What if the boxes and flow contexts were given a style accessor closure by
the box/flow builder. Presumably the builder would need those styles
anyway, and they could point to any part of the style tree or have any
filtering or whatever as necessary. That way we wouldn't need special types
of boxes for first line or first letter or any other special cases. The
builder would have to build separate boxes for initial letter and the rest
of the line, but they box wouldn't need to be a separate type.

- Joel


On Wed, Jun 12, 2013 at 12:58 PM, Boris Zbarsky <[email protected]> wrote:

> It looks like in servo we're basically trying to have styles live on
> elements, with no concept of a "style" attached to layout boxes or flows at
> all.  Anyone who needs styles has to talk to the element.
>
> This works pretty well (and makes things like style recomputation much
> simpler) except when things like first-line and first-letter and whatever
> new fragmentation stuff is being proposed get involved.  At that point, we
> need to get styles from various pseudo-elements, ideally in a principled
> way.
>
> David, am I correct that fragmentation introduces new instances of the
> style inheritance patterns of first-line?
>
> -Boris
> ______________________________**_________________
> dev-servo mailing list
> [email protected]
> https://lists.mozilla.org/**listinfo/dev-servo<https://lists.mozilla.org/listinfo/dev-servo>
>
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to