|
Lines 284-291
sub addProperty($$)
a/Source/WebCore/css/makeprop.pl_sec1
|
| 284 |
} elsif ($codegenOptionName eq "comment") { |
284 |
} elsif ($codegenOptionName eq "comment") { |
| 285 |
next; |
285 |
next; |
| 286 |
} elsif ($codegenOptionName eq "high-priority") { |
286 |
} elsif ($codegenOptionName eq "high-priority") { |
|
|
287 |
die "$name is a shorthand, but has high-priority" if exists $codegenProperties->{"longhands"}; |
| 287 |
$nameIsHighPriority{$name} = 1; |
288 |
$nameIsHighPriority{$name} = 1; |
| 288 |
} elsif ($codegenOptionName eq "sink-priority") { |
289 |
} elsif ($codegenOptionName eq "sink-priority") { |
|
|
290 |
die "$name is a shorthand, but has sink-priority" if exists $codegenProperties->{"longhands"}; |
| 289 |
$namePriorityShouldSink{$name} = 1; |
291 |
$namePriorityShouldSink{$name} = 1; |
| 290 |
} elsif ($codegenOptionName eq "related-property") { |
292 |
} elsif ($codegenOptionName eq "related-property") { |
| 291 |
$relatedProperty{$name} = $codegenProperties->{"related-property"} |
293 |
$relatedProperty{$name} = $codegenProperties->{"related-property"} |
|
Lines 353-366
sub addProperty($$)
a/Source/WebCore/css/makeprop.pl_sec2
|
| 353 |
|
355 |
|
| 354 |
sub sortByDescendingPriorityAndName |
356 |
sub sortByDescendingPriorityAndName |
| 355 |
{ |
357 |
{ |
| 356 |
# Sort names with high priority to the front |
358 |
# Sort shorthands to the back |
|
|
359 |
if (exists $propertiesWithStyleBuilderOptions{$a}{"longhands"} < exists $propertiesWithStyleBuilderOptions{$b}{"longhands"}) { |
| 360 |
return -1; |
| 361 |
} |
| 362 |
if (exists $propertiesWithStyleBuilderOptions{$a}{"longhands"} > exists $propertiesWithStyleBuilderOptions{$b}{"longhands"}) { |
| 363 |
return 1; |
| 364 |
} |
| 365 |
# Sort longhands with high priority to the front |
| 357 |
if (!!$nameIsHighPriority{$a} < !!$nameIsHighPriority{$b}) { |
366 |
if (!!$nameIsHighPriority{$a} < !!$nameIsHighPriority{$b}) { |
| 358 |
return 1; |
367 |
return 1; |
| 359 |
} |
368 |
} |
| 360 |
if (!!$nameIsHighPriority{$a} > !!$nameIsHighPriority{$b}) { |
369 |
if (!!$nameIsHighPriority{$a} > !!$nameIsHighPriority{$b}) { |
| 361 |
return -1; |
370 |
return -1; |
| 362 |
} |
371 |
} |
| 363 |
# Defer names with a related property to the back |
372 |
# Defer longhands with a related property to the back, before shorthands |
| 364 |
if (!!$relatedProperty{$a} < !!$relatedProperty{$b}) { |
373 |
if (!!$relatedProperty{$a} < !!$relatedProperty{$b}) { |
| 365 |
return -1; |
374 |
return -1; |
| 366 |
} |
375 |
} |
|
Lines 849-857
my $firstLowPriorityPropertyName;
a/Source/WebCore/css/makeprop.pl_sec3
|
| 849 |
my $lastLowPriorityPropertyName; |
858 |
my $lastLowPriorityPropertyName; |
| 850 |
my $firstDeferredPropertyName; |
859 |
my $firstDeferredPropertyName; |
| 851 |
my $lastDeferredPropertyName; |
860 |
my $lastDeferredPropertyName; |
|
|
861 |
my $firstShorthand; |
| 862 |
my $lastShorthand; |
| 852 |
foreach my $name (@names) { |
863 |
foreach my $name (@names) { |
| 853 |
# Assumes that @names is sorted by descending priorities. |
864 |
# Assumes that @names is sorted by descending priorities. |
| 854 |
if ($nameIsHighPriority{$name}) { |
865 |
if (exists $propertiesWithStyleBuilderOptions{$name}{"longhands"}) { |
|
|
866 |
$firstShorthand = $name if !$firstShorthand; |
| 867 |
$lastShorthand = $name; |
| 868 |
} elsif ($nameIsHighPriority{$name}) { |
| 855 |
$firstHighPriorityPropertyName = $name if !$firstHighPriorityPropertyName; |
869 |
$firstHighPriorityPropertyName = $name if !$firstHighPriorityPropertyName; |
| 856 |
$lastHighPriorityPropertyName = $name; |
870 |
$lastHighPriorityPropertyName = $name; |
| 857 |
} elsif (!$relatedProperty{$name}) { |
871 |
} elsif (!$relatedProperty{$name}) { |
|
Lines 880-886
print HEADER "const CSSPropertyID lastHighPriorityProperty = CSSProperty" . $nam
a/Source/WebCore/css/makeprop.pl_sec4
|
| 880 |
print HEADER "const CSSPropertyID firstLowPriorityProperty = CSSProperty" . $nameToId{$firstLowPriorityPropertyName} . ";\n"; |
894 |
print HEADER "const CSSPropertyID firstLowPriorityProperty = CSSProperty" . $nameToId{$firstLowPriorityPropertyName} . ";\n"; |
| 881 |
print HEADER "const CSSPropertyID lastLowPriorityProperty = CSSProperty" . $nameToId{$lastLowPriorityPropertyName} . ";\n"; |
895 |
print HEADER "const CSSPropertyID lastLowPriorityProperty = CSSProperty" . $nameToId{$lastLowPriorityPropertyName} . ";\n"; |
| 882 |
print HEADER "const CSSPropertyID firstDeferredProperty = CSSProperty" . $nameToId{$firstDeferredPropertyName} . ";\n"; |
896 |
print HEADER "const CSSPropertyID firstDeferredProperty = CSSProperty" . $nameToId{$firstDeferredPropertyName} . ";\n"; |
| 883 |
print HEADER "const CSSPropertyID lastDeferredProperty = CSSProperty" . $nameToId{$lastDeferredPropertyName} . ";\n\n"; |
897 |
print HEADER "const CSSPropertyID lastDeferredProperty = CSSProperty" . $nameToId{$lastDeferredPropertyName} . ";\n"; |
|
|
898 |
print HEADER "const CSSPropertyID firstShorthand = CSSProperty" . $nameToId{$firstShorthand} . ";\n"; |
| 899 |
print HEADER "const CSSPropertyID lastShorthand = CSSProperty" . $nameToId{$lastShorthand} . ";\n\n"; |
| 884 |
|
900 |
|
| 885 |
print HEADER "static const CSSPropertyID computedPropertyIDs[] = {\n"; |
901 |
print HEADER "static const CSSPropertyID computedPropertyIDs[] = {\n"; |
| 886 |
my $numComputedPropertyIDs = 0; |
902 |
my $numComputedPropertyIDs = 0; |