- static var ColorPattern = new RegExp("^\\s*(rgb|hsl|hsv)a?\\s*\\(*([^,]+),([^,]+),([^,\\)]+),?([^\\)]+)?\\)\\s*$"); + static var ColorPattern = new RegExp("^\\s*(rgb|hsl|hsv)a?\\s*\\(([^,]+),([^,]+),([^,\\)]+),?([^\\)]+)?\\)\\s*$");

An optional non-capturing group is required instead of two optional expressions at the end, otherwise "rgb(100,100,100,)" gets accepted which is invalid per [1].

[1] http://www.w3.org/TR/2010/WD-CSS2-20101207/grammar.html

On 1/21/2011 8:30 PM, P T Withington wrote:
Change ptw-20110121-Euz by [email protected] on 2011-01-21 14:23:20 EST
     in /Users/ptw/OpenLaszlo/trunk-3/WEB-INF/lps/lfc
     for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc

Summary: roundrect bombs on negative height/width

Bugs Fixed: LPP-9695 views with negative width and/or height and a background 
color draws incorrectly (partial)

Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected] (pending)

Overview:

     This only fixes swf10.  The DHTML runtime does not appear to allow
     negative height/width at all.

Details:

     LzKernelUtils: Clamp radius scale factor between -1 and 1

     LzUtils: Type-oh noticed in passing.  Make more informative error
     messsage for bad CSS colors.

Tests:
     test case from bug report

Files:
M       kernel/LzKernelUtils.lzs
M       services/LzUtils.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20110121-Euz.tar


Reply via email to