On Fri, 2009-09-18 at 13:51 +0800, Bo Yang wrote:
> >
> > It would be good if we could design a solution that avoids the need for
> > these duplicate CSS contents, but doesn't result in one internment
> > context for the entire process. As an additional complication, scripting
> > and CSSOM will require that CSS contents are copy-on-write.
> 
> How about use the same internment context only for the documents in
> the same host?

There are a number of cases that this doesn't handle well:

1) Page resources being fetched off a different host.
2) Hosts (e.g. MySpace) that provide multiple sites.

The first of these is much more problematic than the second, I think.

> And for the copy-on-write problems, I think the main problem is that
> when we copy an internment context, all its lwc_string pointer
> changed. So, all the pointers in the current documents and stylesheets
> became invalid. I think , we can solve this by add another indirection
> to the lwc_string. I mean, the lwc_string should be changed to some
> encoding to the position of the real string pointer:

I'm not sure this is necessary, actually. Cloning the CSS content
doesn't preclude the cloned content using the same internment context.
In fact, everything becomes significantly simpler if it can reuse the
same internment context.


J.


Reply via email to