Add third_party/fp16 dependency

Add fp16 dependency, which is required for V8.

For context, see:
https://chromium.googlesource.com/v8/v8.git/+/6196de89e304b22a007397fcd7424d29d18dbd09

Also fix pre-existing comment error in DEPS mentioning the wrong name
for fuchsia_gn_sdk_revision.

Change-Id: I35ca746380099544e7d3c783aa506bf73017a8f6
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/115290
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/.gitignore b/.gitignore
index ec715b0..1a5e559 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
 /third_party/catapult
 /third_party/cpu_features/src
 /third_party/depot_tools
+/third_party/fp16/src
 /third_party/freetype/src
 /third_party/fuchsia-gn-sdk
 /third_party/fuchsia-sdk/images
diff --git a/DEPS b/DEPS
index 2e253ce..782c8dc 100644
--- a/DEPS
+++ b/DEPS
@@ -102,11 +102,15 @@
   # and whatever else without interference from each other.
   'depot_tools_revision': '1714cc6e5ae38710150329dc4222a11be492e994',
   # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling fp16
+  # and whatever else without interference from each other.
+  'fp16_revision': '0a92994d729ff76a58f692d3028ca1b64b145d91',
+  # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling freetype
   # and whatever else without interference from each other.
   'freetype_revision': 'ca76683b781db5d06ef1a0e2cb62a767e7dbe626',
   # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling freetype
+  # the commit queue can handle CLs rolling Fuchsia gn sdk
   # and whatever else without interference from each other.
   'fuchsia_gn_sdk_revision': '3f588d789b567e53fa284be308db4dbf3787d8f3',
   # Three lines of non-changing comments so that
@@ -329,6 +333,10 @@
     Var('chromium_git') + '/chromium/tools/depot_tools.git@' +
         Var('depot_tools_revision'),
 
+  'third_party/fp16/src':
+    Var('chromium_git') + '/external/github.com/Maratyszcza/FP16.git@' +
+        Var('fp16_revision'),
+
   'third_party/freetype/src':
     Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
         Var('freetype_revision'),
diff --git a/third_party/fp16/BUILD.gn b/third_party/fp16/BUILD.gn
new file mode 100644
index 0000000..5956fc9
--- /dev/null
+++ b/third_party/fp16/BUILD.gn
@@ -0,0 +1,16 @@
+# Copyright 2024 The PDFium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("fp16_config") {
+  include_dirs = [ "src/include" ]
+}
+
+source_set("fp16") {
+  public = [ "src/include/fp16.h" ]
+
+  configs -= [ "//build/config/compiler:chromium_code" ]
+  configs += [ "//build/config/compiler:no_chromium_code" ]
+
+  public_configs = [ ":fp16_config" ]
+}
diff --git a/third_party/fp16/LICENSE b/third_party/fp16/LICENSE
new file mode 100644
index 0000000..9a13c79
--- /dev/null
+++ b/third_party/fp16/LICENSE
@@ -0,0 +1,12 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Facebook Inc.
+Copyright (c) 2017 Georgia Institute of Technology
+Copyright 2019 Google LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/third_party/fp16/README.pdfium b/third_party/fp16/README.pdfium
new file mode 100644
index 0000000..1015e01
--- /dev/null
+++ b/third_party/fp16/README.pdfium
@@ -0,0 +1,19 @@
+Name: FP16
+Short Name: fp16
+URL: https://github.com/Maratyszcza/FP16
+Version: 0a92994d729ff76a58f692d3028ca1b64b145d91
+Date: 2022/10/24
+License: MIT
+License File: LICENSE
+Security Critical: Yes
+Shipped: yes
+
+Description:
+Header-only library for conversion to/from half-precision floating point formats
+
+This copy should be synced with chromium's copy in chromium/src/third_party/fp16
+
+Local Modifications:
+- Included only the header files in the `include` directory in `src/`.
+- Extracted LICENSE file separately.
+