[Laszlo-checkins] r13127 - openlaszlo/trunk/WEB-INF/lps/lfc/core
ptw@openlaszlo.org
ptw at openlaszlo.org
Mon Mar 2 16:12:45 PST 2009
Author: ptw
Date: 2009-03-02 16:12:44 -0800 (Mon, 02 Mar 2009)
New Revision: 13127
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/core/PresentationTypes.lzs
Log:
Change 20090302-ptw-5 by ptw at dueling-banjos.home on 2009-03-02 19:10:19 EST
in /Users/ptw/OpenLaszlo/trunk-3
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Work around swf8 Number coercion bug
Bugs Fixed: LPP-7848 Infinity doesn't work as a css value in swf8
Technical Reviewer: max (pending)
QA Reviewer: mdemmon (pending)
Details:
Treat 'Infinity' and '-Infinity' as special cases.
Tests:
Test case from bug in swf8
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/PresentationTypes.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/PresentationTypes.lzs 2009-03-02 23:49:48 UTC (rev 13126)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/PresentationTypes.lzs 2009-03-03 00:12:44 UTC (rev 13127)
@@ -82,6 +82,14 @@
*/
class NumberPresentationType extends PresentationType {
static function accept(value) {
+ // NOTE [2009-03-02 ptw] Only required for swf8 whose Number
+ // does not understand Infinity
+ if ($swf8) {
+ switch (value) {
+ case "Infinity": return Infinity;
+ case "-Infinity": return (- Infinity);
+ }
+ }
return Number(value);
}
static var present = PresentationType.present;
@@ -129,6 +137,10 @@
case "false": return false;
case "true": return true;
case "NaN": return 0/0;
+ // NOTE [2009-03-02 ptw] Only required for swf8 whose Number
+ // does not understand Infinity
+ case "Infinity": return Infinity;
+ case "-Infinity": return (- Infinity);
case "":
// Should this return the empty string, or null? The empty
// string is more JSON-like, null is what Adam proposed in
More information about the Laszlo-checkins
mailing list