[webkit-qt] jsMath behavior different on win vs. linux
Carter, Nathan
NCARTER at bentley.edu
Mon Apr 12 10:37:57 PDT 2010
My original post in this thread was because jsMath was behaving differently on different OSes, using the same QtWebkit. Posts since then have been about creating a minimal compilable example of the behavior, which is not yet done, but other investigations I've done tell me much more specifically how jsMath is behaving differently.
By modifying some of the internal jsMath code, I've (had my program) spit out debugging information at key points. Here is the difference. When I call jsMath.Process( a div in my document ), it does
jsMath.Autoload.Script.Push( 'Process', that div );
This works the same on both platforms. However, on Mac and Linux, subsequent jsMath magic brings about calls to these jsMath.Autoload.Script functions.
jsMath.Autoload.Script.xmlLoad (of plugins/tex2math.js)
jsMath.Autoload.Script.endLoad
jsMath.Autoload.Script.AfterLoad
jsMath.Autoload.Script.RunStack
jsMath.Autoload.Script.RunStack
(in here, all pushed functions get called)
They happen in this order, with indentation showing what calls what. But on Windows, the only result of the Push() call (besides having the item put onto the internal queue) is that later a jsMath.Autoload.Script.setURL() call happens, but the RunStack calls never happen, and thus routines I've asked jsMath to Synchronize() do not ever get called.
How jsMath gets the xmlLoad call started based simply on adding something to the end of an array, I have not yet discovered. (The array doesn't have any special setters/handlers that I know of, not that I know what the heck I'm talking about in that regard.) But setTimeout() is used internally a lot to propagate some of these calls to others; I've done very primitive testing of setTimeout() and clearTimeout() through the QtWebkit web inspector on the Windows machine I'm using and it seems to work fine.
I'm boggled, and will keep digging. Any tips are welcome.
Nathan
More information about the webkit-qt
mailing list