On Friday 2006-06-02 00:00 +0300, Henri Sivonen wrote: > Yet, by searching LXR and grepping my CVS sandbox I can't find the > definition of the GetStyleText() method. What am I missing?
It's defined by defining the STYLE_STRUCT macro and including nsStyleStructList.h: http://lxr.mozilla.org/seamonkey/source/layout/generic/nsIFrame.h#597 > For the width and height, I suppose I should use GetSize(). Am I right? It depends what it is you want. That gives you the border-box width, although it can give you interesting results for display types that are represented by multiple frames that are descendants of each other (e.g., 'overflow:scroll', 'display:table-cell'). > What's the right way to convert twips into CSS px or vice versa? Multiply by nsPresContext::TwipsToPixels(). > What's the right way to query display: none; and visibility: hidden;? > Does an element even have a primary nsIFrame if it has display: none;? Frames that are 'display:none' and their descendants are not created when they are 'display:none'. For visibility, GetStyleVisibility() (and see nsStyleStruct.h. -David -- L. David Baron <URL: http://dbaron.org/ > Technical Lead, Layout & CSS, Mozilla Corporation
pgprADJfWnfym.pgp
Description: PGP signature
_______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

