+if (/>Browser engines/ ... m{</table>}) {
+ my $apple = $id =~ s/^AppleWebKit ?//;
+ $apple .. 1 or next;
+ my ($abs) = m/>showCount\((\d+),/;
+
+ state %version;
+ if (defined $count2) {
+ $version{$id} = $abs;
+ next;
+ }
+
+ # replace safari total percentage by individual version counts
+ # have to use combined distribution for multiple platforms :(
+ for my $browser (qw/ safari ios_saf /) {
+ my $multiplier = delete $count{$browser}{'0.0'} or next;
+ $multiplier /= $abs; # total number
+ while (my ($verwebkit, $count) = each %version) {
+ my $ver = safariver($verwebkit, $browser eq 'ios_saf');
+ $count{$browser}{$ver} += $count * $multiplier;
+ }
+ }
+ last;
+}
+