Style Contexts, Rule Trees

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Style Contexts, Rule Trees

Emanuele D'Arrigo
Hi everybody,

I've been pouring through the XUL documentation to better understand
how a document and its styling is handled in Firefox but I've kind of
hit the bottom and I still have some crucial question marks hovering
above my head.

Primarily I don't understand how the Rule Tree is created and how this
is translated into the style contexts that are associated to the
frames.

The documentation I started from is https://developer.mozilla.org/en/Mozilla_Style_System
and I've read and listened various times to the tech talks on the
subject. They did clarify quite a few things but they didn't quite
nail it. Is there any documentation that is more up to date, complete
or exhaustive?

In particular I'm not quite understanding how, upon the addition of an
element to the document (say a <span> element), Gecko can refrain from
restyling the whole document, limiting itself to the specific changes
that are prompted by the addition. Can anybody provide some pointers
for further research?

Manu
_______________________________________________
dev-documentation mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-documentation
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Style Contexts, Rule Trees

L. David Baron
[ No need to cross-post so widely; please follow up to dev-tech-layout. ]

On Monday 2009-07-13 06:33 -0700, Emanuele D'Arrigo wrote:
> In particular I'm not quite understanding how, upon the addition of an
> element to the document (say a <span> element), Gecko can refrain from
> restyling the whole document, limiting itself to the specific changes
> that are prompted by the addition. Can anybody provide some pointers
> for further research?

In the past, we just restyled the added/modified element and its
descendants.  This wasn't quite enough, so I added code to do
additional restyling in certain cases where necessary.  This was
done in the following bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=15608
https://bugzilla.mozilla.org/show_bug.cgi?id=401291
so the code added in those two bugs is the code that handles
reresolving style on elements other than descendants.

-David

--
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
_______________________________________________
dev-documentation mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-documentation
Loading...