Jonathan wrote: > Thank you for your help and patience. I am referring to the top level > frame of the outermost frame. > i.e. the 'top' window in javascript term.
Assuming you know you're dealing with a web page, you have several options: 1) If you only care about working with Gecko 1.9 or earlier, just walk up the parent frame chain, including cross-document parents (layout utils has a function for this), until you get to a frame that has no parent or cross-document parent. This will be the root frame of the 'top' window. 2) If you want to be more future-proof, you need to get the docshell your image is in (e.g. by QI from the prescontext's container), get its same-type root docshell, get its presshell, and get the root frame of that. Approach #1 depends on content not being linked into the chrome viewmanager tree, which will likely stop being the case. Approach 2 doesn't make any assumptions about that point. -Boris _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

