browser: apply vendor prefix exceptions
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 3 Mar 2015 20:39:39 +0000 (21:39 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:42 +0000 (05:43 +0200)
browser.plp

index 375f3005ea468568f0b04f1ced14f46be1b128c4..48bd6e587f4e100279101c6e81a036506552b7d7 100644 (file)
@@ -58,7 +58,9 @@ my %DSTATS = (
        x => sub {
                join(' ',
                        'requires prefix',
-                       (map "-$_-", $caniuse->{agents}->{$_[0]}->{prefix} // ()),
+                       map {"-$_-"}
+                       ($caniuse->{agents}->{$_[0]}->{prefix_exceptions} // {})->{$_[1]}
+                       // $caniuse->{agents}->{$_[0]}->{prefix} // (),
                );
        },
 );
@@ -386,7 +388,7 @@ sub saybrowsercols {
 
                        # prepare version hover details
                        my $title = sprintf('%.1f%% %s', $usage * $usagepct, join(', ',
-                               map { ref $_ eq 'CODE' ? $_->($browser) : $_ }
+                               map { ref $_ eq 'CODE' ? $_->($browser, $span[0]->[0]) : $_ }
                                map { $DSTATS{$_} // () }
                                map { split / /, $_ }
                                $prev