Diff
Modified: branches/safari-612.1.2-branch/Source/WebCore/ChangeLog (272441 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/ChangeLog 2021-02-05 22:52:19 UTC (rev 272441)
+++ branches/safari-612.1.2-branch/Source/WebCore/ChangeLog 2021-02-05 23:01:39 UTC (rev 272442)
@@ -1,3 +1,36 @@
+2021-02-05 Russell Epstein <[email protected]>
+
+ Cherry-pick r272377. rdar://problem/73989711
+
+ Process LocalizableAdditions string file correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=221358
+
+ Reviewed by Tim Horton.
+
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/scripts/preprocessor.pm:
+ (applyPreprocessor):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-04 Megan Gardner <[email protected]>
+
+ Process LocalizableAdditions string file correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=221358
+
+ Reviewed by Tim Horton.
+
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/scripts/preprocessor.pm:
+ (applyPreprocessor):
+
2021-02-01 Miguel Gomez <[email protected]>
[CoordGraphics] Avoid painting backing stores for zero-opacity layers
Modified: branches/safari-612.1.2-branch/Source/WebCore/DerivedSources-input.xcfilelist (272441 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/DerivedSources-input.xcfilelist 2021-02-05 22:52:19 UTC (rev 272441)
+++ branches/safari-612.1.2-branch/Source/WebCore/DerivedSources-input.xcfilelist 2021-02-05 23:01:39 UTC (rev 272442)
@@ -1144,6 +1144,7 @@
$(PROJECT_DIR)/plugins/DOMMimeTypeArray.idl
$(PROJECT_DIR)/plugins/DOMPlugin.idl
$(PROJECT_DIR)/plugins/DOMPluginArray.idl
+$(PROJECT_DIR)/preprocess-localizable-strings.pl
$(PROJECT_DIR)/storage/Storage.idl
$(PROJECT_DIR)/storage/StorageEvent.idl
$(PROJECT_DIR)/svg/Document+SVG.idl
Modified: branches/safari-612.1.2-branch/Source/WebCore/DerivedSources-output.xcfilelist (272441 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/DerivedSources-output.xcfilelist 2021-02-05 22:52:19 UTC (rev 272441)
+++ branches/safari-612.1.2-branch/Source/WebCore/DerivedSources-output.xcfilelist 2021-02-05 23:01:39 UTC (rev 272442)
@@ -2637,6 +2637,7 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSXRWebGLLayerInit.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSXSLTProcessor.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSXSLTProcessor.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/LocalizableAdditions.strings.out
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/MathMLElementFactory.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/MathMLElementFactory.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/MathMLElementTypeHelpers.h
Modified: branches/safari-612.1.2-branch/Source/WebCore/DerivedSources.make (272441 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/DerivedSources.make 2021-02-05 22:52:19 UTC (rev 272441)
+++ branches/safari-612.1.2-branch/Source/WebCore/DerivedSources.make 2021-02-05 23:01:39 UTC (rev 272442)
@@ -1321,9 +1321,12 @@
IDL_PATHS := $(sort $(foreach IDL_FILE, $(JS_BINDING_IDLS), $(realpath $(dir $(IDL_FILE)))))
+ADDITIONS_PATHS = \
+ $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions \
+ $(SDKROOT)/usr/local/include/WebKitAdditions
+
ADDITIONAL_BINDING_IDLS_PATHS = \
- $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions \
- $(SDKROOT)/usr/local/include/WebKitAdditions \
+ $(ADDITIONS_PATHS) \
$(IDL_PATHS)
JS_BINDING_IDLS += \
@@ -1370,6 +1373,7 @@
JSMathMLElementWrapperFactory.h \
JSSVGElementWrapperFactory.cpp \
JSSVGElementWrapperFactory.h \
+ LocalizableAdditions.strings.out \
PlugInsResources.h \
SVGElementFactory.cpp \
SVGElementFactory.h \
@@ -1499,6 +1503,17 @@
# --------
+# .strings files
+
+POSSIBLE_LOCALIZABLE_STRINGS_FILES := $(wildcard $(foreach ADDITIONS_PATH,$(ADDITIONS_PATHS),$(ADDITIONS_PATH)/LocalizableAdditions.strings.txt))
+
+LOCALIZABLE_STRINGS_FILE = $(word 1,$(POSSIBLE_LOCALIZABLE_STRINGS_FILES))
+
+LocalizableAdditions.strings.out : $(WebCore)/preprocess-localizable-strings.pl $(WebCore)/bindings/scripts/preprocessor.pm $(LOCALIZABLE_STRINGS_FILE) $(FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES)
+ $(PERL) $< --defines "$(FEATURE_AND_PLATFORM_DEFINES)" $@ LocalizableAdditions.strings.txt $(LOCALIZABLE_STRINGS_FILE)
+
+# --------
+
# user agent style sheets
USER_AGENT_STYLE_SHEETS = \
Modified: branches/safari-612.1.2-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (272441 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-02-05 22:52:19 UTC (rev 272441)
+++ branches/safari-612.1.2-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-02-05 23:01:39 UTC (rev 272442)
@@ -8099,7 +8099,7 @@
445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalDefaultSystemAppearance.h; sourceTree = "<group>"; };
445775E92047303B008DCE5D /* LocalDefaultSystemAppearance.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalDefaultSystemAppearance.mm; sourceTree = "<group>"; };
446DC64624A29D9B0061F390 /* PlaybackTargetClientContextIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlaybackTargetClientContextIdentifier.h; sourceTree = "<group>"; };
- 446EE4E8255E0D9200454463 /* Localizable.strings */ = {isa = PBXFileReference; explicitFileType = text.plist.strings; fileEncoding = 4; name = Localizable.strings; path = DerivedSources/WebCore/en.lproj/Localizable.strings; sourceTree = BUILT_PRODUCTS_DIR; };
+ 446EE4E8255E0D9200454463 /* LocalizableAdditions.strings.out */ = {isa = PBXFileReference; explicitFileType = text.plist.strings; fileEncoding = 4; name = LocalizableAdditions.strings.out; path = DerivedSources/WebCore/en.lproj/LocalizableAdditions.strings.out; sourceTree = BUILT_PRODUCTS_DIR; };
4471710B205AF945000A116E /* MediaQueryParserContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryParserContext.cpp; sourceTree = "<group>"; };
4471710C205AF945000A116E /* MediaQueryParserContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaQueryParserContext.h; sourceTree = "<group>"; };
447958021643B47B001E0A7F /* ParsedContentType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentType.cpp; sourceTree = "<group>"; };
@@ -21693,7 +21693,7 @@
AA61BB5423167474002FE25A /* JSMathMLElementWrapperFactory.h */,
8574D1F10ADE6122004CBA11 /* JSSVGElementWrapperFactory.cpp */,
8574D1F20ADE6122004CBA11 /* JSSVGElementWrapperFactory.h */,
- 446EE4E8255E0D9200454463 /* Localizable.strings */,
+ 446EE4E8255E0D9200454463 /* LocalizableAdditions.strings.out */,
FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */,
44A28AAB12DFB8AC00AE923B /* MathMLElementFactory.h */,
FABE72FC1059C21100D999DD /* MathMLNames.cpp */,
@@ -35740,9 +35740,8 @@
inputFileListPaths = (
);
inputPaths = (
- $BUILT_PRODUCTS_DIR/usr/local/include/WebKitAdditions/LocalizableAdditions.strings,
- $SDKROOT/usr/local/include/WebKitAdditions/LocalizableAdditions.strings,
$SRCROOT/en.lproj/Localizable.strings,
+ $BUILT_PRODUCTS_DIR/DerivedSources/WebCore/LocalizableAdditions.strings.out,
);
name = "Concatenate and Copy Localizable.strings";
outputFileListPaths = (
@@ -35752,7 +35751,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n exit 0;\nfi\n\nDST_DIR=\"$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/en.lproj\"\nmkdir -p \"$DST_DIR\"\n\nif [ -e $BUILT_PRODUCTS_DIR/usr/local/include/WebKitAdditions/LocalizableAdditions.strings.txt ] ; then\n cat $SRCROOT/en.lproj/Localizable.strings $BUILT_PRODUCTS_DIR/usr/local/include/WebKitAdditions/LocalizableAdditions.strings.txt > $DST_DIR/Localizable.strings\nelif [ -e $SDKROOT/usr/local/include/WebKitAdditions/LocalizableAdditions.strings.txt ] ; then\n cat $SRCROOT/en.lproj/Localizable.strings $SDKROOT/usr/local/include/WebKitAdditions/LocalizableAdditions.strings.txt > $DST_DIR/Localizable.strings\nelse\n cp $SRCROOT/en.lproj/Localizable.strings $DST_DIR/Localizable.strings\nfi\n";
+ shellScript = "if [ \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n exit 0;\nfi\n\nDST_DIR=\"$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/en.lproj\"\nmkdir -p \"$DST_DIR\"\n\nif [ -e $BUILT_PRODUCTS_DIR/DerivedSources/WebCore/LocalizableAdditions.strings.out ] ; then\n cat $SRCROOT/en.lproj/Localizable.strings $BUILT_PRODUCTS_DIR/DerivedSources/WebCore/LocalizableAdditions.strings.out > $DST_DIR/Localizable.strings\nelse\n cp $SRCROOT/en.lproj/Localizable.strings $DST_DIR/Localizable.strings\nfi\n";
};
5325BDCC21DFF33E00A0DEE1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Modified: branches/safari-612.1.2-branch/Source/WebCore/bindings/scripts/preprocessor.pm (272441 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/bindings/scripts/preprocessor.pm 2021-02-05 22:52:19 UTC (rev 272441)
+++ branches/safari-612.1.2-branch/Source/WebCore/bindings/scripts/preprocessor.pm 2021-02-05 23:01:39 UTC (rev 272442)
@@ -42,6 +42,7 @@
my $fileName = shift;
my $defines = shift;
my $preprocessor = shift;
+ my $keepComments = shift;
my @args = ();
if (!$preprocessor) {
@@ -51,6 +52,9 @@
} else {
$preprocessor = $ENV{CC} || (-x "/usr/bin/clang" ? "/usr/bin/clang" : "/usr/bin/gcc");
push(@args, qw(-E -P -x c++));
+ if ($keepComments) {
+ push(@args, qw(-C));
+ }
}
}
Added: branches/safari-612.1.2-branch/Source/WebCore/preprocess-localizable-strings.pl (0 => 272442)
--- branches/safari-612.1.2-branch/Source/WebCore/preprocess-localizable-strings.pl (rev 0)
+++ branches/safari-612.1.2-branch/Source/WebCore/preprocess-localizable-strings.pl 2021-02-05 23:01:39 UTC (rev 272442)
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+#
+# Copyright (C) 2006, 2021 Apple Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+
+# Usage: preprocess-localized-strings.pl <header> <output> <input> ...
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/bindings/scripts";
+
+use Getopt::Long;
+
+my $defines;
+my $preprocessor;
+GetOptions('defines=s' => \$defines,
+ 'preprocessor=s' => \$preprocessor);
+
+my $out = $ARGV[0];
+shift;
+
+open OUT, ">", $out or die;
+
+for my $in (@ARGV) {
+ $in =~ /(\w+)\.txt$/ or $in =~ /(\w+)\.strings$/ or die;
+
+ my $text;
+ require preprocessor;
+ $text = join('', applyPreprocessor($in, $defines, $preprocessor, "YES"));
+
+ print OUT $text;
+}