[Laszlo-checkins] r13874 - in openlaszlo/trunk/WEB-INF/lps/lfc: core kernel/dhtml
ptw@openlaszlo.org
ptw at openlaszlo.org
Tue May 12 07:24:30 PDT 2009
Author: ptw
Date: 2009-05-12 07:24:28 -0700 (Tue, 12 May 2009)
New Revision: 13874
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20090512-ptw-h by ptw at dueling-banjos.home on 2009-05-12 09:26:57 EDT
in /Users/ptw/OpenLaszlo/trunk-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Correct initial value for constrained attributes
Bugs Fixed: LPP-8088 DHTML: many warnings from applyConstraintMethod()
Technical Reviewer: hminsky (Message-ID: <8c61fad60905120713l4108039cv73cf90d0e5a1f9e9 at mail.gmail.com>)
QA Reviewer: philip at pbrdev.com (pending)
Details:
LzSprite: reinstate CSSDimension warning
LzNode: Use `null` rather than `void 0` for the initial value of
constrained attributes to avoid creating `NaN`s in numeric
expressions
Tests:
smokecheck on all runtimes
test/extensions/html on all runtimes
Phil please test if this also solves LPP-8175
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs 2009-05-12 13:54:44 UTC (rev 13873)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs 2009-05-12 14:24:28 UTC (rev 13874)
@@ -246,7 +246,10 @@
// Ensure dynamic properties exist (for `with(this)`),
// above test works in all runtimes to detect missing
// properties
- this[key] = void 0;
+ // NOTE: [2009-05-11 ptw] (LPP-8088) We use `null`
+ // rather than `void 0` so we don't inject `NaN`s into
+ // numeric attributes
+ this[key] = null;
}
}
}
@@ -1029,7 +1032,10 @@
// Ensure dynamic properties exist (for `with(this)`),
// above test works in all runtimes to detect missing
// properties
- this[key] = void 0;
+ // NOTE: [2009-05-11 ptw] (LPP-8088) We use `null`
+ // rather than `void 0` so we don't inject `NaN`s into
+ // numeric attributes
+ this[key] = null;
}
} else if (! this[setr]) {
// TODO: should already be declared, so we should just be
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-05-12 13:54:44 UTC (rev 13873)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-05-12 14:24:28 UTC (rev 13874)
@@ -901,14 +901,11 @@
} else if (value === -Infinity) {
result = ~(~0>>>1);
}
- // NOTE: [2009-05-08 ptw] Triggers too many warnings due to
- // contraints running in random order and picking up `undefined`
- // as a value in a numeric expression, which casts to NaN
-// if ($debug) {
-// if (value !== result) {
-// Debug.warn("%w: coerced %w to %w", arguments.callee, value, result);
-// }
-// }
+ if ($debug) {
+ if (value !== result) {
+ Debug.warn("%w: coerced %w to %w", arguments.callee, value, result);
+ }
+ }
return Math.round(result) + (units ? units : 'px');
}
More information about the Laszlo-checkins
mailing list