Hi, I'm wondering when MozAfterPaint are firing/are supposed to be firing. I have this example extension: http://www.kantjils.nl/moz/[email protected] This extension sets pref("dom.send_after_paint_to_content", true); , in case you wondered, according to the documentation this should enable MozAfterPaint for web content: https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#MozAfterPaint
According to that same documentation: "Listeners added by trusted content, such as extensions or other chrome code, are notified of all repaints." So when you have the extension installed, go to this url: chrome://mozafterpainttest/content/mozafterpainttest.xul The iframe of that chrome url points to http://www.kantjils.nl/moz/mozafterpainttest/fennec.html That page is scrolling 3 times, with a timeout of 1 second. It's using a MozAfterPaint event handler, that does the scrolling after 1 second: window.addEventListener("MozAfterPaint", function() {setTimeout(function() {doScroll(45);},1000);}, false); So clearly, the MozAfterPaint event is called in the web document 3 times. The chrome://mozafterpainttest/content/mozafterpainttest.xul chrome document has also an MozAfterPaint listener, that's counting the amount of that MozAfterPaint event that is called. The result is shown in the top left button. Now on Fennec trunk Windows, the button is just incremented 1 time after the first scroll, then it stops incrementing. Then suddenly after 5 seconds or so, it increments to the number 2. On Firefox trunk, the button starts with number 1, for some reason, which is strange, because it should only be possible to increment at earliest 500ms after page load. Then the button increments to 2, and after 5 seconds or so, it increments to number 3. Why is the chrome MozAfterPaint event handler not reporting all the same MozAfterPaint events as web content? Why is trunk Firefox starting with number 1, while that shouldn't even be possible, afaict? Why is suddenly, for no obvious reason, afaict, a MozAfterPaint event being called after 5 seconds? Regards, Martijn -- Martijn Wargers - Help Mozilla! http://quality.mozilla.org/ http://wiki.mozilla.org/Mozilla_QA_Community irc://irc.mozilla.org/qa - /nick mw22 _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

