"L. David Baron" <[EMAIL PROTECTED]> wrote: > On Thursday 2008-09-18 15:05 -0700, Zack Weinberg wrote: > > What I still can't find is the code that does the distribution. I > > suspected nsCSSFrameConstructor and/or nsCSSRuleProcessor, but > > neither *seems* to have anything relevant in them. > > Have a look at nsCSSRendering::FindBackground, which is > implementing what is described in > http://www.w3.org/TR/CSS21/colors.html#background .
Ok, I get it now. In the example, all the CSS rules I wrote for the <html> element turn into style structs associated with the BlockFrame for that content node. When PaintBackground is called for the CanvasFrame it naturally gets an initial-state (in particular, zero border radius) nsStyleBorder, and would get an initial-state nsStyleBackground as well, but FindBackground intervenes and substitutes the non-initial-state nsStyleBackground from the BlockFrame. Conversely, when PaintBackground is called for the BlockFrame, FindBackground tells it to do nothing. The remaining question is whether it's possible to write a CSS selector that causes a non-initial-state nsStyleBorder to wind up associated with the CanvasFrame. I haven't been able to do it from content, but... zw _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

