Break circular dependency between formfiller and pwl.

(formfiller <-> pwl) becomes: (formfiller -> pwl -> formfiller:fontmap)

Change-Id: I9e1f96bd8511a39b1e0eb33685cc50e063a5721d
Reviewed-on: https://pdfium-review.googlesource.com/c/47157
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/BUILD.gn b/fpdfsdk/BUILD.gn
index 3b1a04b..d4b9d6e 100644
--- a/fpdfsdk/BUILD.gn
+++ b/fpdfsdk/BUILD.gn
@@ -63,11 +63,13 @@
     "../core/fxge",
     "../fxjs",
     "formfiller",
+    "formfiller:fontmap",
     "pwl",
   ]
   allow_circular_includes_from = [
     "../fxjs",
     "formfiller",
+    "formfiller:fontmap",
     "pwl",
   ]
   visibility = [ "../*" ]
diff --git a/fpdfsdk/formfiller/BUILD.gn b/fpdfsdk/formfiller/BUILD.gn
index c84922f..f309197 100644
--- a/fpdfsdk/formfiller/BUILD.gn
+++ b/fpdfsdk/formfiller/BUILD.gn
@@ -7,8 +7,6 @@
 
 jumbo_source_set("formfiller") {
   sources = [
-    "cba_fontmap.cpp",
-    "cba_fontmap.h",
     "cffl_button.cpp",
     "cffl_button.h",
     "cffl_checkbox.cpp",
@@ -32,6 +30,24 @@
   ]
   configs += [ "../../:pdfium_core_config" ]
   deps = [
+    ":fontmap",
+    "../../:pdfium_public_headers",
+    "../../core/fpdfapi/page",
+    "../../core/fpdfapi/parser",
+    "../../core/fxcrt",
+    "../../core/fxge",
+    "../pwl",
+  ]
+  visibility = [ "../../*" ]
+}
+
+jumbo_source_set("fontmap") {
+  sources = [
+    "cba_fontmap.cpp",
+    "cba_fontmap.h",
+  ]
+  configs += [ "../../:pdfium_core_config" ]
+  deps = [
     "../../:pdfium_public_headers",
     "../../core/fpdfapi",
     "../../core/fpdfapi/font",
@@ -40,8 +56,6 @@
     "../../core/fpdfdoc",
     "../../core/fxcrt",
     "../../core/fxge",
-    "../pwl",
   ]
-  allow_circular_includes_from = [ "../pwl" ]
   visibility = [ "../../*" ]
 }
diff --git a/fpdfsdk/pwl/BUILD.gn b/fpdfsdk/pwl/BUILD.gn
index 5a5019a..d37fe69 100644
--- a/fpdfsdk/pwl/BUILD.gn
+++ b/fpdfsdk/pwl/BUILD.gn
@@ -49,6 +49,7 @@
     "../../core/fpdfdoc",
     "../../core/fxcrt",
     "../../core/fxge",
+    "../formfiller:fontmap",
   ]
   visibility = [ "../../*" ]
 }