On Saturday 2007-07-07 17:34 -0000, [EMAIL PROTECTED] wrote:
> Where can I find code which paint the html element in mozilla?

So the data structures in Mozilla that represent elements are the
implementations of nsIContent (or, more generally, nsINode) that are
in mozilla/content.  But things like painting are on a separate,
mostly parallel tree of data structures that represent the rendering
tree -- what the CSS spec describes as boxes.  These are
implementations of nsIFrame and are in mozilla/layout.  nsIFrame has
a BuildDisplayList method that's responsible for listing the things
that need to be painted for each of these rendering objects.

> e.g. text/anchor, where is the code which paints them on the screen?

Text is nsTextFrameThebes.  Anchors, when they are CSS
display:inline, would be nsInlineFrame.  But common code for
painting things like backgrounds and borders is in nsCSSRendering,
and common code for text decorations is I think in
nsHTMLContainerFrame.

> e.g. table/div,where is the code which paints borders/images on the
> screen?

Tables are nsTableFrame (and other rendering objects in
layout/tables).  Divs are nsBlockFrame, when they're display:block.
Images are nsImageFrame.

> e.g. list items, where is the code which paints the bullets?

See nsBulletFrame.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Attachment: pgpYPZxS1G6bd.pgp
Description: PGP signature

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

Reply via email to