Title: [291277] releases/WebKitGTK/webkit-2.36/Source/WebCore
Revision
291277
Author
carlo...@webkit.org
Date
2022-03-15 02:35:33 -0700 (Tue, 15 Mar 2022)

Log Message

Merge r290883 - makeprop.pl breaks reproducible builds
https://bugs.webkit.org/show_bug.cgi?id=237521

Reviewed by Carlos Garcia Campos.

* css/makeprop.pl: Sort hash elements so the output file is always
the same across different builds.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/ChangeLog (291276 => 291277)


--- releases/WebKitGTK/webkit-2.36/Source/WebCore/ChangeLog	2022-03-15 09:35:29 UTC (rev 291276)
+++ releases/WebKitGTK/webkit-2.36/Source/WebCore/ChangeLog	2022-03-15 09:35:33 UTC (rev 291277)
@@ -1,3 +1,13 @@
+2022-03-07  Alberto Garcia  <be...@igalia.com>
+
+        makeprop.pl breaks reproducible builds
+        https://bugs.webkit.org/show_bug.cgi?id=237521
+
+        Reviewed by Carlos Garcia Campos.
+
+        * css/makeprop.pl: Sort hash elements so the output file is always
+        the same across different builds.
+
 2022-03-01  Michael Catanzaro  <mcatanz...@gnome.org>
 
         Misc compiler warnings, late Feb 2022 edition

Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/css/makeprop.pl (291276 => 291277)


--- releases/WebKitGTK/webkit-2.36/Source/WebCore/css/makeprop.pl	2022-03-15 09:35:29 UTC (rev 291276)
+++ releases/WebKitGTK/webkit-2.36/Source/WebCore/css/makeprop.pl	2022-03-15 09:35:33 UTC (rev 291277)
@@ -55,7 +55,7 @@
 my $jsonDecoder = JSON::PP->new->utf8;
 my $jsonHashRef = $jsonDecoder->decode($input);
 my $propertiesHashRef = $jsonHashRef->{properties};
-my @allNames = keys(%$propertiesHashRef);
+my @allNames = sort keys(%$propertiesHashRef);
 die "We've reached more than 1024 CSS properties, please make sure to update CSSProperty/StylePropertyMetadata accordingly" if @allNames > 1024;
 
 my %defines = map { $_ => 1 } split(/ /, $defines);
@@ -472,7 +472,7 @@
 {
     switch (id) {
 EOF
-  foreach my $name (keys %runtimeFlags) {
+  foreach my $name (sort keys %runtimeFlags) {
     print GPERF "    case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
     print GPERF "        return RuntimeEnabledFeatures::sharedFeatures()." . $runtimeFlags{$name} . "Enabled();\n";
   }
@@ -500,7 +500,7 @@
     switch (id) {
 EOF
 
-foreach my $name (keys %settingsFlags) {
+foreach my $name (sort keys %settingsFlags) {
   print GPERF "    case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
   print GPERF "        return settings->" . $settingsFlags{$name} . "();\n";
 }
@@ -647,8 +647,8 @@
 {
     switch (id) {
 EOF
-for my $logicalPropertyGroup (values %logicalPropertyGroups) {
-    for my $name (values %{ $logicalPropertyGroup->{"logical"} }) {
+for my $logicalPropertyGroup (sort values %logicalPropertyGroups) {
+    for my $name (sort values %{ $logicalPropertyGroup->{"logical"} }) {
         print GPERF "    case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
     }
 }
@@ -665,9 +665,9 @@
     switch (id) {
 EOF
 
-for my $logicalPropertyGroup (values %logicalPropertyGroups) {
+for my $logicalPropertyGroup (sort values %logicalPropertyGroups) {
     for my $kind ("logical", "physical") {
-        for my $name (values %{ $logicalPropertyGroup->{$kind} }) {
+        for my $name (sort values %{ $logicalPropertyGroup->{$kind} }) {
             print GPERF "    case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
         }
     }
@@ -685,16 +685,18 @@
     switch (id1) {
 EOF
 
-for my $logicalPropertyGroup (values %logicalPropertyGroups) {
+for my $logicalPropertyGroup (sort values %logicalPropertyGroups) {
     my $logical = $logicalPropertyGroup->{"logical"};
     my $physical = $logicalPropertyGroup->{"physical"};
     for my $first ($logical, $physical) {
         my $second = $first eq $logical ? $physical : $logical;
-        while (my ($resolver, $name) = each %{ $first }) {
+        for my $resolver (sort keys %{ $first }) {
+            my $name = $first->{$resolver};
             print GPERF "    case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
         }
         print GPERF "        switch (id2) {\n";
-        while (my ($resolver, $name) = each %{ $second }) {
+        for my $resolver (sort keys %{ $second }) {
+            my $name = $second->{$resolver};
             print GPERF "        case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
         }
         print GPERF << "EOF";
@@ -718,8 +720,9 @@
     switch (propertyID) {
 EOF
 
-for my $logicalPropertyGroup (values %logicalPropertyGroups) {
-    while (my ($resolver, $name) = each %{ $logicalPropertyGroup->{"logical"} }) {
+for my $logicalPropertyGroup (sort values %logicalPropertyGroups) {
+    for my $resolver (sort keys %{ $logicalPropertyGroup->{"logical"} }) {
+        my $name = $logicalPropertyGroup->{"logical"}->{$resolver};
         my $kind = $logicalPropertyGroup->{"kind"};
         my $kindId = nameToId($kind);
         my $resolverEnum = "LogicalBox" . $kindId . "::" . nameToId($resolver);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to