Skip Menu |

This queue is for tickets about the CSS-Minifier-XS CPAN distribution.

Report information
The Basics
Id: 97612
Status: open
Priority: 0/
Queue: CSS-Minifier-XS

People
Owner: GTERMARS [...] cpan.org
Requestors: RADFORD [...] cpan.org
Cc: david [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: 0.09



CC: david [...] cpan.org
Subject: 0% should not be converted to 0
According to http://www.w3.org/TR/css3-animations/ Show quoted text
> Note that the percentage unit specifier must be used on percentage values. Therefore, ‘0’ is an invalid keyframe selector.
This cause iOS6 devices to error on animations. I have attached a patch to revert the 0% optimization.
Subject: XS.patch
--- XS.xs.orig 2014-07-29 21:17:40.000000000 -0700 +++ XS.xs 2014-07-29 21:17:58.000000000 -0700 @@ -417,7 +417,6 @@ if (0 == strcmp(ptr, "px")) { return 1; } if (0 == strcmp(ptr, "pt")) { return 1; } if (0 == strcmp(ptr, "pc")) { return 1; } - if (0 == strcmp(ptr, "%")) { return 1; } /* Nope, string contains something else; its not a Zero Unit */ return 0;
RT-Send-CC: david [...] cpan.org
Hi All, I have created a new patch that will also update the appropriate test files as well. Thank you, Adam On Wed Jul 30 00:29:09 2014, RADFORD wrote: Show quoted text
> According to http://www.w3.org/TR/css3-animations/ >
> > Note that the percentage unit specifier must be used on percentage > > values. Therefore, ‘0’ is an invalid keyframe selector.
> > This cause iOS6 devices to error on animations. I have attached a > patch to revert the 0% optimization.
Subject: perl-CSS-Minifier-XS.do-not-remove-percent-from-zero.patch
diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-point-zero.css CSS-Minifier-XS-0.09/t/css/zero-units-point-zero.css *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-point-zero.css 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-point-zero.css 2017-03-16 13:33:56.503439822 -0400 *************** *** 5,10 **** p.pt { width: .0pt } p.pc { width: .0pc } p.px { width: .0px } p.em { width: .0em } p.ex { width: .0ex } - p.pct { width: .0% } --- 5,9 ---- diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-point-zero.min CSS-Minifier-XS-0.09/t/css/zero-units-point-zero.min *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-point-zero.min 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-point-zero.min 2017-03-16 13:34:04.991399757 -0400 *************** *** 1 **** ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0}p.pct{width:0} --- 1 ---- ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0} diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero.css CSS-Minifier-XS-0.09/t/css/zero-units-zero.css *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero.css 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-zero.css 2017-03-16 13:34:10.223375047 -0400 *************** *** 5,10 **** p.pt { width: 0pt } p.pc { width: 0pc } p.px { width: 0px } p.em { width: 0em } p.ex { width: 0ex } - p.pct { width: 0% } --- 5,9 ---- diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero.min CSS-Minifier-XS-0.09/t/css/zero-units-zero.min *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero.min 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-zero.min 2017-03-16 13:34:20.055328583 -0400 *************** *** 1 **** ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0}p.pct{width:0} --- 1 ---- ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0} diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-zerooo.css CSS-Minifier-XS-0.09/t/css/zero-units-zerooo.css *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-zerooo.css 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-zerooo.css 2017-03-16 13:34:24.995305223 -0400 *************** *** 5,10 **** p.pt { width: 000pt } p.pc { width: 000pc } p.px { width: 000px } p.em { width: 000em } p.ex { width: 000ex } - p.pct { width: 000% } --- 5,9 ---- diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-zerooo.min CSS-Minifier-XS-0.09/t/css/zero-units-zerooo.min *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-zerooo.min 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-zerooo.min 2017-03-16 13:34:34.511260199 -0400 *************** *** 1 **** ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0}p.pct{width:0} --- 1 ---- ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0} diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero-point-zero.css CSS-Minifier-XS-0.09/t/css/zero-units-zero-point-zero.css *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero-point-zero.css 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-zero-point-zero.css 2017-03-16 13:34:41.707226129 -0400 *************** *** 5,10 **** p.pt { width: 0.0pt } p.pc { width: 0.0pc } p.px { width: 0.0px } p.em { width: 0.0em } p.ex { width: 0.0ex } - p.pct { width: 0.0% } --- 5,9 ---- diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero-point-zero.min CSS-Minifier-XS-0.09/t/css/zero-units-zero-point-zero.min *** CSS-Minifier-XS-0.09.orig/t/css/zero-units-zero-point-zero.min 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/t/css/zero-units-zero-point-zero.min 2017-03-16 13:34:53.355170941 -0400 *************** *** 1 **** ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0}p.pct{width:0} --- 1 ---- ! p.in{width:0}p.cm{width:0}p.mm{width:0}p.pt{width:0}p.pc{width:0}p.px{width:0}p.em{width:0}p.ex{width:0} diff -r -C 5 -N CSS-Minifier-XS-0.09.orig/XS.xs CSS-Minifier-XS-0.09/XS.xs *** CSS-Minifier-XS-0.09.orig/XS.xs 2017-03-16 13:33:02.339694782 -0400 --- CSS-Minifier-XS-0.09/XS.xs 2017-03-16 13:33:31.291558655 -0400 *************** *** 415,425 **** if (0 == strcmp(ptr, "mm")) { return 1; } if (0 == strcmp(ptr, "in")) { return 1; } if (0 == strcmp(ptr, "px")) { return 1; } if (0 == strcmp(ptr, "pt")) { return 1; } if (0 == strcmp(ptr, "pc")) { return 1; } - if (0 == strcmp(ptr, "%")) { return 1; } /* Nope, string contains something else; its not a Zero Unit */ return 0; } --- 415,424 ----