Modified: trunk/Source/WebCore/ChangeLog (210494 => 210495)
--- trunk/Source/WebCore/ChangeLog 2017-01-08 01:22:46 UTC (rev 210494)
+++ trunk/Source/WebCore/ChangeLog 2017-01-08 06:02:25 UTC (rev 210495)
@@ -3,6 +3,15 @@
Avoid triggering rebuilds for minor changes of CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=166810
+ Post-review cleanup suggested by Darin Adler.
+
+ * css/makeprop.pl:
+
+2017-01-07 Simon Fraser <[email protected]>
+
+ Avoid triggering rebuilds for minor changes of CSSProperties.json
+ https://bugs.webkit.org/show_bug.cgi?id=166810
+
Reviewed by Daniel Bates.
We expect to make lots of metadata-related changes to CSSProperties.json, and
Modified: trunk/Source/WebCore/css/makeprop.pl (210494 => 210495)
--- trunk/Source/WebCore/css/makeprop.pl 2017-01-08 01:22:46 UTC (rev 210494)
+++ trunk/Source/WebCore/css/makeprop.pl 2017-01-08 06:02:25 UTC (rev 210495)
@@ -180,7 +180,7 @@
sub replaceFileIfChanged($$)
{
my ($tempFile, $file) = @_;
-
+
if (compare($tempFile, $file) != 0) {
copy($tempFile, $file) or die "Failed to copy $tempFile to $file: $!";
}
@@ -189,7 +189,7 @@
my $gperfTempFile = "CSSPropertyNames.gperf.tmp";
-open GPERF, ">$gperfTempFile" || die "Could not open $gperfTempFile for writing";
+open GPERF, ">", $gperfTempFile or die "Could not open $gperfTempFile for writing";
print GPERF << "EOF";
%{
/* This file is automatically generated from $inputFile by makeprop, do not edit */
@@ -348,9 +348,9 @@
replaceFileIfChanged($gperfTempFile, "CSSPropertyNames.gperf");
-my $properyNamesHeaderTempFile = "CSSPropertyNames.h.tmp";
+my $propertyNamesHeaderTempFile = "CSSPropertyNames.h.tmp";
-open HEADER, ">$properyNamesHeaderTempFile" || die "Could not open $properyNamesHeaderTempFile for writing";
+open HEADER, ">", $propertyNamesHeaderTempFile or die "Could not open $propertyNamesHeaderTempFile for writing";
print HEADER << "EOF";
/* This file is automatically generated from $inputFile by makeprop, do not edit */
@@ -423,7 +423,7 @@
close HEADER;
-replaceFileIfChanged($properyNamesHeaderTempFile, "CSSPropertyNames.h");
+replaceFileIfChanged($propertyNamesHeaderTempFile, "CSSPropertyNames.h");
#
# StyleBuilder.cpp generator.
@@ -916,7 +916,7 @@
my $styleBuilderTempFile = "StyleBuilder.cpp.tmp";
-open STYLEBUILDER, ">$styleBuilderTempFile" || die "Could not open $styleBuilderTempFile for writing";
+open STYLEBUILDER, ">", $styleBuilderTempFile or die "Could not open $styleBuilderTempFile for writing";
print STYLEBUILDER << "EOF";
/* This file is automatically generated from $inputFile by makeprop, do not edit */
@@ -996,7 +996,7 @@
my $stylePropertyShorthandFunctionsHeaderTempFile = "StylePropertyShorthandFunctions.h.tmp";
-open SHORTHANDS_H, ">$stylePropertyShorthandFunctionsHeaderTempFile" || die "Could not open $stylePropertyShorthandFunctionsHeaderTempFile for writing";
+open SHORTHANDS_H, ">", $stylePropertyShorthandFunctionsHeaderTempFile or die "Could not open $stylePropertyShorthandFunctionsHeaderTempFile for writing";
print SHORTHANDS_H << "EOF";
/* This file is automatically generated from $inputFile by makeprop, do not edit */
@@ -1028,7 +1028,7 @@
my $stylePropertyShorthandFunctionsTempFile = "StylePropertyShorthandFunctions.cpp.tmp";
-open SHORTHANDS_CPP, ">$stylePropertyShorthandFunctionsTempFile" || die "Could not open $stylePropertyShorthandFunctionsTempFile for writing";
+open SHORTHANDS_CPP, ">", $stylePropertyShorthandFunctionsTempFile or die "Could not open $stylePropertyShorthandFunctionsTempFile for writing";
print SHORTHANDS_CPP << "EOF";
/* This file is automatically generated from $inputFile by makeprop, do not edit */
@@ -1146,4 +1146,4 @@
if (not $gperf) {
$gperf = $ENV{GPERF} ? $ENV{GPERF} : "gperf";
}
-system("\"$gperf\" --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf --output-file=CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";
+system("\"$gperf\" --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf --output-file=CSSPropertyNames.cpp") == 0 or die "calling gperf failed: $?";