Where the rendering gets defined depends on the exact element. Some pieces are hardcoded, like form controls and iframes, and some are configured through various stylesheets. You can look in the res/ directory of your Firefox install to see the default stylesheets that get applied to content. If you're interested in source code, the code that decides how everything gets displayed is in http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSFrameConstructor.cpp
although it's spread out and not very readable.

The process for rendering a given document goes something like this: First, the computed style for the content is calculated. Then, depending on the various CSS properties and information from the content, different types of frames get constructed, which implement the various different behaviors of content (i.e. text creates text frames, blocks create block frames, radio buttons create a radio button frame, etc.). The frames then figure out their size and position, which in Gecko is called "reflow". Then, the result gets displayed on the screen. Of course, this gets a lot more complicated because of performance optimizations for incremental changes, but that's the basic outline.

I don't know if there's any good documentation of this anywhere.

-Eli

[EMAIL PROTECTED] wrote:
I'm curious to know how the rendering engine determines the default
display "type" for elements such as div or p or whatever. or, a div
renders as a block element by default, why does it do that?

is it within the render engine itself, or a default stylesheet
somewhere?

or, does anyone have some links that contain information on this?

thank you much!

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

Reply via email to