In article <[EMAIL PROTECTED]>, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> Henri Sivonen wrote: > > OK, but I am not walking into SVG subtrees anyway. > > OK, but do you want to assume that no other languages like that are added? I'm not sure what kind of forward-looking precautions should be taken. The alternative is, of course, that this code needs to be revised if such a substantial change is made to the engine. Is there a stable API that exposes the same data as getComputedStyle but without converting the style system data to strings? The reason why I am looking at nsIFrame is to avoid the overhead of going via string representations of data that exists as numbers and enumerations. > >>>>> Does an element even have a primary nsIFrame if it has display: none;? > >>>> No. > >>> That's a sufficient test then? > >> Test for what? > > > > For testing that the element and the subtree is being rendered > > You've never defined what you mean by "rendered", so I have no idea. For the purpose of what I am interested in for this feature, an element is rendered if its non-whitespace text content was visible (assuming different color and background) to the user if the view port was tall enough not to clip the canvas at all. If the CSS boxes of elements overlap, I'd preliminarily consider the elements that are left behind the other boxes to be "rendered", but I don't care that much if the API I end up using does not consider them to be rendered. So "rendered" only needs to fit reasonably well with an intuitive understanding of what is visible on the page (if scrolled). This is used for a heuristic, so it is pragmatic to let the data that is exposed by the available interfaces to dictate the details. I haven't explored how XBL affects an nsIFrame-based approach. And so far, I have no idea how to deal with SVG except by not walking into SVG subtrees at all. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/ _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

