Roll third_party/freetype/src/ 31757f969..f37083edf (54 commits)

https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/31757f969fba..f37083edf0ef

Update failing tests and the test corpus to make everything pass.

BUG=pdfium:1295
TBR=drott@chromium.org

Change-Id: I128d8f1415a7ce581a1d63381ee0710a1e81ace3
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/DEPS b/DEPS
index c768939..1e6613e 100644
--- a/DEPS
+++ b/DEPS
@@ -20,14 +20,14 @@
   'clang_revision': '9d46446d550f1993279c6cafb996d0296d3ecc00',
   'code_coverage_revision': 'b53d904eb74afb18f4ddc27db4f75552b1237514',
   'depot_tools_revision': '26af0d34d281440ad0dc6d2e43fe60f32ef62da0',
-  'freetype_revision': '31757f969fba60d75404f31e8f1168bef5011770',
+  'freetype_revision': 'f37083edf0ef562fb8bae0dfc6f916b1037f71fe',
   'gtest_revision': 'f71fb4f9a912ec945401cc49a287a759b6131026',
   'icu_revision': '64e5d7d43a1ff205e3787ab6150bbc1a1837332b',
   'instrumented_lib_revision': 'a959e4f0cb643003f2d75d179cede449979e3e77',
   'jinja2_revision': '45571de473282bd1d8b63a8dfcb1fd268d0635d2',
   'jpeg_turbo_revision': 'e1669e3707c6448a01c8a0dc3e4b20976a4dacf3',
   'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
-  'pdfium_tests_revision': 'db4764592814ededcb9a51c86fb8f8a1a6a9f5f7',
+  'pdfium_tests_revision': '2e04ecc4ecf4a83d18dd27c5279f5fb401918f49',
   'skia_revision': '0c229970754242a038c91328873197c62d60770d',
   'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
   'trace_event_revision': '936ba8a963284a6b3737cf2f0474a7131073abee',
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp
index c34d59e..ca71f24 100644
--- a/fpdfsdk/fpdf_annot_embeddertest.cpp
+++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -689,15 +689,15 @@
   static const char kMd5TwoPaths[] = "7eed0cfba780f1d4dd8068f717d3a6bf";
   static const char kMd5NewAnnot[] = "1de8212d43b7066a6df042095c2aca61";
 #elif defined(OS_WIN)
-  static const char kMd5Original[] = "6f3cc2dd37479ce7cc072bfb0c63c275";
-  static const char kMd5ModifiedPath[] = "c0c2eb2aba73ad15b3240e342fbe0d72";
-  static const char kMd5TwoPaths[] = "2306bf04915fe001b5f4726843d184c8";
-  static const char kMd5NewAnnot[] = "64a319f145768cb09944d2109efe394e";
+  static const char kMd5Original[] = "6aa001a77ec05d0f1b0d1d22e28744d4";
+  static const char kMd5ModifiedPath[] = "a7a8d675a6ddbcbdfecee65a33ba19e1";
+  static const char kMd5TwoPaths[] = "7c0bdd4552329704c47a7cce47edbbd6";
+  static const char kMd5NewAnnot[] = "3c48d492b4f62941fed0fb62f729f31e";
 #else
-  static const char kMd5Original[] = "964f89bbe8911e540a465cf1a64b7f7e";
-  static const char kMd5ModifiedPath[] = "9a38048fb3ac1b2c9a4b34139caa993c";
-  static const char kMd5TwoPaths[] = "ece3d4df54b3395d6a2bf7a29b17239c";
-  static const char kMd5NewAnnot[] = "4299493de84c249f42f220f30f2bbb67";
+  static const char kMd5Original[] = "b42cef463483e668eaf4055a65e4f1f5";
+  static const char kMd5ModifiedPath[] = "6ff77d6d1fec4ea571fabe0c7a19b517";
+  static const char kMd5TwoPaths[] = "ca37ad549e74ac5b359a055708f3e7b6";
+  static const char kMd5NewAnnot[] = "0d7a0e33fbf41ff7fa5d732ab2c5edff";
 #endif
 
   // Open a file with two annotations and load its first page.
@@ -890,13 +890,13 @@
   static const char kMd5NewImage[] = "ff012f5697436dfcaec25b32d1333596";
   static const char kMd5ModifiedImage[] = "86cf8cb2755a7a2046a543e66d9c1e61";
 #elif defined(OS_WIN)
-  static const char kMd5Original[] = "6f3cc2dd37479ce7cc072bfb0c63c275";
-  static const char kMd5NewImage[] = "d19c6fcfd9a170802fcfb9adfa13557e";
-  static const char kMd5ModifiedImage[] = "1273cf2363570a50d1aa0c95b1318197";
+  static const char kMd5Original[] = "6aa001a77ec05d0f1b0d1d22e28744d4";
+  static const char kMd5NewImage[] = "3d77d06a971bcb9fb54db082f1082c8b";
+  static const char kMd5ModifiedImage[] = "dc4f4afc26c345418330d31c065020e1";
 #else
-  static const char kMd5Original[] = "964f89bbe8911e540a465cf1a64b7f7e";
-  static const char kMd5NewImage[] = "9ea8732dc9d579f68853f16892856208";
-  static const char kMd5ModifiedImage[] = "74239d2a8c55c9de1dbb9cd8781895aa";
+  static const char kMd5Original[] = "b42cef463483e668eaf4055a65e4f1f5";
+  static const char kMd5NewImage[] = "528e6243dc29d54f36b61e0d3287d935";
+  static const char kMd5ModifiedImage[] = "6d9e59f3e57a1ff82fb258356b7eb731";
 #endif
 
   // Open a file with two annotations and load its first page.
@@ -975,13 +975,13 @@
   static const char kMd5NewText[] = "60031c1b0330cf1e1575f7d46687d429";
   static const char kMd5ModifiedText[] = "79f5cfb0b07caaf936f65f6a7a57ce77";
 #elif defined(OS_WIN)
-  static const char kMd5Original[] = "6f3cc2dd37479ce7cc072bfb0c63c275";
-  static const char kMd5NewText[] = "87d55e09f9096de7e6552f5ae79afd3b";
-  static const char kMd5ModifiedText[] = "26e94fbd3af4b1e65479327507600114";
+  static const char kMd5Original[] = "6aa001a77ec05d0f1b0d1d22e28744d4";
+  static const char kMd5NewText[] = "204cc01749a70b8afc246a4ca33c7eb6";
+  static const char kMd5ModifiedText[] = "641261a45e8dfd68c89b80bfd237660d";
 #else
-  static const char kMd5Original[] = "964f89bbe8911e540a465cf1a64b7f7e";
-  static const char kMd5NewText[] = "30f3f5b989612ca03827d95f184f0979";
-  static const char kMd5ModifiedText[] = "076c8f24a09ddc0e49f7e758edead6f0";
+  static const char kMd5Original[] = "b42cef463483e668eaf4055a65e4f1f5";
+  static const char kMd5NewText[] = "00197ad6206f763febad5719e5935306";
+  static const char kMd5ModifiedText[] = "85853bc0aaa5a4e3af04e58b9cbfff23";
 #endif
 
   // Open a file with two annotations and load its first page.
@@ -1113,9 +1113,9 @@
 #if defined(OS_MACOSX)
   static const char kMd5[] = "4d64e61c9c0f8c60ab3cc3234bb73b1c";
 #elif defined(OS_WIN)
-  static const char kMd5[] = "9ee141f698c3fcb56c050dffd6c82624";
+  static const char kMd5[] = "20b612ebd46babcb44c48c903e2c5a48";
 #else
-  static const char kMd5[] = "c96ee1f316d7f5a1b154de9f9d467f01";
+  static const char kMd5[] = "1d7bea2042c6fea0558ff2aef05811b5";
 #endif
 
   // Open the saved annotation.
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 559e46d..52ca84f 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -645,9 +645,9 @@
 #if defined(OS_MACOSX)
     const char kOriginalMD5[] = "5a5eb63cb21cc15084fea1f14284b8df";
 #elif defined(OS_WIN)
-    const char kOriginalMD5[] = "587c507a40f613f9c530b2ce2d58d655";
+    const char kOriginalMD5[] = "00542ee435b37749c4453be63bf7bdb6";
 #else
-    const char kOriginalMD5[] = "2edc6e70d54889aa0c0b7bdf3e168f86";
+    const char kOriginalMD5[] = "41647268d5911d049801803b15c2dfb0";
 #endif
     ScopedFPDFBitmap page_bitmap = RenderPage(page);
     CompareBitmap(page_bitmap.get(), 200, 200, kOriginalMD5);
@@ -691,11 +691,11 @@
   const char kNonPrimesMD5[] = "57e76dc7375d896704f0fd6d6d1b9e65";
   const char kNonPrimesAfterSaveMD5[] = "6304512d0150bbd5578e8e22d3121103";
 #elif defined(OS_WIN)
-  const char kNonPrimesMD5[] = "4d906b57fba36c70c600cf50d60f508c";
-  const char kNonPrimesAfterSaveMD5[] = "4d906b57fba36c70c600cf50d60f508c";
+  const char kNonPrimesMD5[] = "86e371fdae30c2471f476631f3f93413";
+  const char kNonPrimesAfterSaveMD5[] = "86e371fdae30c2471f476631f3f93413";
 #else
-  const char kNonPrimesMD5[] = "33d9c45bec41ead92a295e252f6b7922";
-  const char kNonPrimesAfterSaveMD5[] = "33d9c45bec41ead92a295e252f6b7922";
+  const char kNonPrimesMD5[] = "67ab13115d0cc34e99a1003c28047b40";
+  const char kNonPrimesAfterSaveMD5[] = "67ab13115d0cc34e99a1003c28047b40";
 #endif
   {
     ScopedFPDFBitmap page_bitmap = RenderPage(page);
@@ -1838,9 +1838,9 @@
 #if defined(OS_MACOSX)
     const char md5[] = "40b3ef04f915ff4c4208948001763544";
 #elif defined(OS_WIN)
-    const char md5[] = "aba523a8110d01ed9bd7b7781ff74045";
+    const char md5[] = "5ded49fe157f89627903553771431e3d";
 #else
-    const char md5[] = "b8a21668f1dab625af7c072e07fcefc4";
+    const char md5[] = "344534539aa7c5cc78404cfff4bde7fb";
 #endif
     CompareBitmap(page_bitmap.get(), 612, 792, md5);
 
@@ -2444,7 +2444,7 @@
   }
 
   // Check that the text renders properly.
-  const char md5[] = "c68cd79aa72bf83a7b25271370d46b21";
+  const char md5[] = "5159a72903fe57bf0cf645c894de8a74";
   {
     ScopedFPDFBitmap page_bitmap = RenderPage(page);
     CompareBitmap(page_bitmap.get(), 612, 792, md5);
diff --git a/testing/resources/pixel/bug_845697_expected.pdf.0.png b/testing/resources/pixel/bug_845697_expected.pdf.0.png
index a55063c..3bc224b 100644
--- a/testing/resources/pixel/bug_845697_expected.pdf.0.png
+++ b/testing/resources/pixel/bug_845697_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png
index 3ac5671..f49d591 100644
--- a/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/barcode_test_expected_win.pdf.0.png b/testing/resources/pixel/xfa_specific/barcode_test_expected_win.pdf.0.png
new file mode 100644
index 0000000..23b80a7
--- /dev/null
+++ b/testing/resources/pixel/xfa_specific/barcode_test_expected_win.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected.pdf.0.png
index da0687a..aded8b5 100644
--- a/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected_mac.pdf.0.png b/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected_mac.pdf.0.png
index 9ba2f38..aebb572 100644
--- a/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected_mac.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/dynamic_list_box_allow_multiple_selection_expected_mac.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected.pdf.0.png
index 493f459..d20d7ea 100644
--- a/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected_win.pdf.0.png b/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected_win.pdf.0.png
index bfe7fad..734b7e4 100644
--- a/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected_win.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/dynamic_password_field_background_fill_expected_win.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected.pdf.0.png
index 6b22031..1375930 100644
--- a/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected_win.pdf.0.png b/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected_win.pdf.0.png
index fc31cfa..eae383c 100644
--- a/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected_win.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/dynamic_table_color_and_width_expected_win.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png
index d7f1de6..a3d9830 100644
--- a/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_list_box_caption_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/static_list_box_caption_expected.pdf.0.png
index 45a8983..b164cc4 100644
--- a/testing/resources/pixel/xfa_specific/static_list_box_caption_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/static_list_box_caption_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_list_box_caption_expected_mac.pdf.0.png b/testing/resources/pixel/xfa_specific/static_list_box_caption_expected_mac.pdf.0.png
index 677ba28..7cba6b9 100644
--- a/testing/resources/pixel/xfa_specific/static_list_box_caption_expected_mac.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/static_list_box_caption_expected_mac.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.0.png
index d49fc36..1565e3e 100644
--- a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.1.png b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.1.png
index 3e60b4d..c73f1a9 100644
--- a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.1.png
+++ b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected.pdf.1.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.0.png b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.0.png
index 79f2e3f..58aee9e 100644
--- a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.1.png b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.1.png
index 1d99751..ad36aa9 100644
--- a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.1.png
+++ b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_mac.pdf.1.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.0.png b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.0.png
index 9530509..ea939ac 100644
--- a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.1.png b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.1.png
index 3e60b4d..c73f1a9 100644
--- a/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.1.png
+++ b/testing/resources/pixel/xfa_specific/static_password_field_rotate_expected_win.pdf.1.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.0.png
index dd2cb88..6855361 100644
--- a/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.0.png
+++ b/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.1.png b/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.1.png
index a0e6fdf..1f5c1bb 100644
--- a/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.1.png
+++ b/testing/resources/pixel/xfa_specific/xfa_node_caption_expected.pdf.1.png
Binary files differ
diff --git a/third_party/freetype/README.pdfium b/third_party/freetype/README.pdfium
index aa378ef..d5ae975 100644
--- a/third_party/freetype/README.pdfium
+++ b/third_party/freetype/README.pdfium
@@ -1,7 +1,7 @@
 Name: FreeType
 URL: http://www.freetype.org/
-Version: VER-2-9-1-351
-Revision: 31757f969fba60d75404f31e8f1168bef5011770
+Version: VER-2-10-0-51
+Revision: f37083edf0ef562fb8bae0dfc6f916b1037f71fe
 Security Critical: yes
 License: FreeType License (FTL)
 License File: FTL.TXT
diff --git a/xfa/fwl/cfwl_edit_embeddertest.cpp b/xfa/fwl/cfwl_edit_embeddertest.cpp
index 1d79105..e408281 100644
--- a/xfa/fwl/cfwl_edit_embeddertest.cpp
+++ b/xfa/fwl/cfwl_edit_embeddertest.cpp
@@ -77,7 +77,7 @@
   EXPECT_STREQ(L"defgh", WideString::FromUTF16LE(buf, len).c_str());
 
   // TODO(hnakashima): This is incorrect. Visually 'abcdefgh' are selected.
-  const char kDraggedMD5[] = "69c13fe53b5fc422ebeab56d101a4658";
+  const char kDraggedMD5[] = "f131526c8edd04e44de17b2647ec54c8";
   {
     ScopedFPDFBitmap page_bitmap =
         RenderLoadedPageWithFlags(page(), FPDF_ANNOT);
@@ -87,7 +87,7 @@
 
 TEST_F(CFWLEditEmbedderTest, SimpleFill) {
   CreateAndInitializeFormPDF("xfa/email_recommended.pdf");
-  const char kBlankMD5[] = "eea5c72701270ac4a7edcc4df66d812a";
+  const char kBlankMD5[] = "8dda78a3afaf9f7b5210eb81cacc4600";
   {
     ScopedFPDFBitmap page_bitmap =
         RenderLoadedPageWithFlags(page(), FPDF_ANNOT);
@@ -98,7 +98,7 @@
   for (size_t i = 0; i < 10; ++i)
     FORM_OnChar(form_handle(), page(), 'a' + i, 0);
 
-  const char kFilledMD5[] = "e73263fcea46c18d874b3d5a79f53805";
+  const char kFilledMD5[] = "211e4e46eb347aa2bc7c425556d600b0";
   {
     ScopedFPDFBitmap page_bitmap =
         RenderLoadedPageWithFlags(page(), FPDF_ANNOT);
@@ -115,7 +115,7 @@
   for (size_t i = 5; i < 10; ++i)
     FORM_OnChar(form_handle(), page(), 'a' + i, 0);
 
-  const char kFilledMD5[] = "e73263fcea46c18d874b3d5a79f53805";
+  const char kFilledMD5[] = "211e4e46eb347aa2bc7c425556d600b0";
   {
     ScopedFPDFBitmap page_bitmap =
         RenderLoadedPageWithFlags(page(), FPDF_ANNOT);