On Oct 14, 2009, at 2:44 PM, tali garsiel wrote:

The CSS parser products are "CSSStyleSheets" objects which contain CSS rule lists - right?.

Yes.

If I understand correctly the render style gets created in the process of creating the render tree.
The flow is:
Node::attach()
Node::createRendererIfNeeded()
CSSStyleSelector::styleForElement(...)

Yes.

I also see that the HTML Parser initiates the parsing of the CSS style sheets - this is not apparent from my diagram - is this correct?.

Not really.

There are multiple ways to initiate parsing of CSS style sheets. I’m not sure the best way to reflect this in your diagram. Two of the most common ways:

WebKit loads style sheets and parses them in response to the creation of a <link> element in an HTML document, and one of the ways to create an element is with the HTML parser.

WebKit also parses style sheets in <style> elements, and in this case the parsing is triggered when the HTML parser calls finishParsingChildren on the style element.

But I think it's possibly misleading to state that the HTML parser initiates the parsing of the style sheets, since it doesn’t do it directly, and it doesn’t do it for all style elements.

    -- Darin

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to