Is there a chrome-only API like .elementFromPoint that will tell me which XBL anonymous element is at a point?

Background: in the replacement binding for click-to-play plugins, we have a <div class="mainBox"> child which fills up the plugin area. So that users can click on the binding, we set the z-index of this mainBox to topmost (bug 752516). Note that we don't change the layout, positioning, or z-index of the plugin element itself, because that could affect other aspects of the page.

This doesn't completely solve the problem because of the way DOM stacking contexts work. So in bug 853973, I'm trying to determine whether there is page content overlaying the plugin element using plugin.getBoundingClientRect and then .elementFromPoint. But this code doesn't detect the z-order of the anonymous mainBox, so it breaks the testcase http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/general/plugin_bug752516.html?force=1 where setting the z-order is good enough.

I poked at nsIDOMWindowUtils.elementFromPoint and that doesn't seem to have any way to ask for results including anonymous elements.

Any suggestions?

Current patch is in bug 853973, if that would help.

--BDS

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to