This seems like the wrong place to do this. CSS permits negative
dimensions. You are allowed to have negative margins on divs, for
instance. (And I wonder if we really mean to use floor here, vs.
round? Actually, why are we not just passing through the float? CSS
allows fractional dimensions too, no?)
On 2007-06-11, at 22:13 EDT, [EMAIL PROTECTED] wrote:
Author: max
Date: 2007-06-11 19:13:16 -0700 (Mon, 11 Jun 2007)
New Revision: 5387
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20070611-maxcarlson-M by [EMAIL PROTECTED] on 2007-06-11
17:47:04 PDT
in /Users/maxcarlson/openlaszlo/legals-clean
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Prevent invalid CSS values from being set in DHTML
New Features:
Bugs Fixed: LPP-3880 - IE/dhtml: vacation survey crashes when run
Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzSprite.js - CSSDimension() tests for and corrects
negative values.
Tests: http://localhost:8080/legals/demos/vacation-survey/vacation-
survey.lzx?lzr=dhtml passes in ie 7
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/
LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/
LzSprite.js 2007-06-12 01:48:50 UTC (rev 5386)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/
LzSprite.js 2007-06-12 02:13:16 UTC (rev 5387)
@@ -446,6 +446,7 @@
}
LzSprite.prototype.CSSDimension = function (value, units) {
+ if (value < 0) value = 0;
return Math.floor(value) + (units ? units : 'px');
}
_______________________________________________
Laszlo-checkins mailing list
[EMAIL PROTECTED]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins