[Laszlo-checkins] r9037 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml

pbr@openlaszlo.org pbr at openlaszlo.org
Thu May 8 06:11:14 PDT 2008


Author: pbr
Date: 2008-05-08 06:11:10 -0700 (Thu, 08 May 2008)
New Revision: 9037

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
Log:
Change 20080507-Philip-8 by Philip at Philip-DC on 2008-05-07 20:54:59 EDT
     in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: runlzteset fails because isIE is missing

New Features:

Bugs Fixed: LPP-5954

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
The browser detect code at the front of LzTimeKernel.js fails in rhino because Lz.__BrowserDetect does not exist. My first solution was to modify rhino.js, but this causes other code to execute in the kernel (in bLzSprite.__updateQuirks()). I added a new quirk and it is only true for IE. LzTimKernel.js was the first loaded kernel file and I moved it to the last because it now refers to something in LzSprite.

Library.lzs: Move LzTimeKernel to the end to remove forward reference
LzSprite.js: Add ie_timer_closure quirk which is true for IE
LzTimeKernel.js: use ie_timer_closure quirk instead of Lz.__BrowserDetect


Tests:
The isIE error is gone from running buildtools/runlztest.sh. I see other errors when I run this but they don't appear to be caused by this issue.

Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M      WEB-INF/lps/lfc/kernel/dhtml/Library.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080507-Philip-8.tar



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/Library.lzs	2008-05-08 01:03:58 UTC (rev 9036)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/Library.lzs	2008-05-08 13:11:10 UTC (rev 9037)
@@ -6,7 +6,6 @@
   *
   */
 
-#include "kernel/dhtml/LzTimeKernel.js"
 #include "kernel/dhtml/LFC.js"
 //#include "kernel/dhtml/LzRequires.js"
 #include "kernel/dhtml/LzPool.js"
@@ -22,3 +21,4 @@
 #include "kernel/dhtml/LzHTTPLoader.js"
 #include "kernel/dhtml/LzScreenKernel.js"
 #include "kernel/dhtml/LzContextMenuKernel.lzs"
+#include "kernel/dhtml/LzTimeKernel.js"

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2008-05-08 01:03:58 UTC (rev 9036)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2008-05-08 13:11:10 UTC (rev 9037)
@@ -234,6 +234,7 @@
     ,safari_paste_event: false
     ,text_event_charcode: true
     ,keypress_function_keys: true
+    ,ie_timer_closure: false
 }
 
 LzSprite.prototype.capabilities = {
@@ -274,6 +275,9 @@
 
             quirks['ie_opacity'] = true;
 
+            // IE needs closure around setTimeout, setInterval in LzTimeKernel
+            quirks['ie_timer_closure'] = true;
+
             // IE DOM leak prevention
             quirks['ie_leak_prevention'] = true;
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js	2008-05-08 01:03:58 UTC (rev 9036)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js	2008-05-08 13:11:10 UTC (rev 9037)
@@ -14,7 +14,8 @@
 // apply(). A workaround can be found here:
 // http://webreflection.blogspot.com/2007/06/simple-settimeout-setinterval-extra.html
 
-if (Lz.__BrowserDetect.isIE) {
+if (LzSprite.prototype.quirks.ie_timer_closure) {
+//if (Lz.__BrowserDetect.isIE) {
   (function(f){
     window.setTimeout = f(window.setTimeout);
     window.setInterval = f(window.setInterval);



More information about the Laszlo-checkins mailing list