Run clang-format --full on directories that start with 'f'.

Then do some minor touchups on the result in fxbarcode/.

Change-Id: I132d3e5db89eb7ec036d3372aaeec3d7c60234c8
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/63734
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_actionhandler.cpp b/fpdfsdk/cpdfsdk_actionhandler.cpp
index b8a50c4..6b2b4b9 100644
--- a/fpdfsdk/cpdfsdk_actionhandler.cpp
+++ b/fpdfsdk/cpdfsdk_actionhandler.cpp
@@ -293,51 +293,51 @@
   ASSERT(type != CPDF_AAction::kCalculate);
   ASSERT(type != CPDF_AAction::kFormat);
 
-  RunScript(
-      pFormFillEnv, script,
-      [type, data, pFormField](IJS_EventContext* context) {
-        switch (type) {
-          case CPDF_AAction::kCursorEnter:
-            context->OnField_MouseEnter(data->bModifier, data->bShift,
-                                        pFormField);
-            break;
-          case CPDF_AAction::kCursorExit:
-            context->OnField_MouseExit(data->bModifier, data->bShift,
-                                       pFormField);
-            break;
-          case CPDF_AAction::kButtonDown:
-            context->OnField_MouseDown(data->bModifier, data->bShift,
-                                       pFormField);
-            break;
-          case CPDF_AAction::kButtonUp:
-            context->OnField_MouseUp(data->bModifier, data->bShift, pFormField);
-            break;
-          case CPDF_AAction::kGetFocus:
-            context->OnField_Focus(data->bModifier, data->bShift, pFormField,
-                                   &data->sValue);
-            break;
-          case CPDF_AAction::kLoseFocus:
-            context->OnField_Blur(data->bModifier, data->bShift, pFormField,
-                                  &data->sValue);
-            break;
-          case CPDF_AAction::kKeyStroke:
-            context->OnField_Keystroke(
-                &data->sChange, data->sChangeEx, data->bKeyDown,
-                data->bModifier, &data->nSelEnd, &data->nSelStart, data->bShift,
-                pFormField, &data->sValue, data->bWillCommit, data->bFieldFull,
-                &data->bRC);
-            break;
-          case CPDF_AAction::kValidate:
-            context->OnField_Validate(&data->sChange, data->sChangeEx,
-                                      data->bKeyDown, data->bModifier,
-                                      data->bShift, pFormField, &data->sValue,
-                                      &data->bRC);
-            break;
-          default:
-            NOTREACHED();
-            break;
-        }
-      });
+  RunScript(pFormFillEnv, script,
+            [type, data, pFormField](IJS_EventContext* context) {
+              switch (type) {
+                case CPDF_AAction::kCursorEnter:
+                  context->OnField_MouseEnter(data->bModifier, data->bShift,
+                                              pFormField);
+                  break;
+                case CPDF_AAction::kCursorExit:
+                  context->OnField_MouseExit(data->bModifier, data->bShift,
+                                             pFormField);
+                  break;
+                case CPDF_AAction::kButtonDown:
+                  context->OnField_MouseDown(data->bModifier, data->bShift,
+                                             pFormField);
+                  break;
+                case CPDF_AAction::kButtonUp:
+                  context->OnField_MouseUp(data->bModifier, data->bShift,
+                                           pFormField);
+                  break;
+                case CPDF_AAction::kGetFocus:
+                  context->OnField_Focus(data->bModifier, data->bShift,
+                                         pFormField, &data->sValue);
+                  break;
+                case CPDF_AAction::kLoseFocus:
+                  context->OnField_Blur(data->bModifier, data->bShift,
+                                        pFormField, &data->sValue);
+                  break;
+                case CPDF_AAction::kKeyStroke:
+                  context->OnField_Keystroke(
+                      &data->sChange, data->sChangeEx, data->bKeyDown,
+                      data->bModifier, &data->nSelEnd, &data->nSelStart,
+                      data->bShift, pFormField, &data->sValue,
+                      data->bWillCommit, data->bFieldFull, &data->bRC);
+                  break;
+                case CPDF_AAction::kValidate:
+                  context->OnField_Validate(&data->sChange, data->sChangeEx,
+                                            data->bKeyDown, data->bModifier,
+                                            data->bShift, pFormField,
+                                            &data->sValue, &data->bRC);
+                  break;
+                default:
+                  NOTREACHED();
+                  break;
+              }
+            });
 }
 
 void CPDFSDK_ActionHandler::RunDocumentOpenJavaScript(
diff --git a/fpdfsdk/fpdf_doc.cpp b/fpdfsdk/fpdf_doc.cpp
index ec361d5..b0a2324 100644
--- a/fpdfsdk/fpdf_doc.cpp
+++ b/fpdfsdk/fpdf_doc.cpp
@@ -233,9 +233,7 @@
 }
 
 FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFDest_GetView(FPDF_DEST dest,
-                 unsigned long* pNumParams,
-                 FS_FLOAT* pParams) {
+FPDFDest_GetView(FPDF_DEST dest, unsigned long* pNumParams, FS_FLOAT* pParams) {
   if (!dest) {
     *pNumParams = 0;
     return 0;
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_widgethandler.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_widgethandler.cpp
index 8251b5d..3b58b3b 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_widgethandler.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_widgethandler.cpp
@@ -249,8 +249,7 @@
 void CPDFXFA_WidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {}
 
 void CPDFXFA_WidgetHandler::ReleaseAnnot(
-    std::unique_ptr<CPDFSDK_Annot> pAnnot) {
-}
+    std::unique_ptr<CPDFSDK_Annot> pAnnot) {}
 
 CFX_FloatRect CPDFXFA_WidgetHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
                                                  CPDFSDK_Annot* pAnnot) {
diff --git a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
index efdafce..54fe91a3 100644
--- a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
@@ -27,7 +27,6 @@
 
 CPWL_EditCtrl::~CPWL_EditCtrl() = default;
 
-
 void CPWL_EditCtrl::OnCreated() {
   SetFontSize(GetCreationParams()->fFontSize);
   m_pEdit->SetFontMap(GetFontMap());
diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp
index e9ed669..f607837 100644
--- a/fpdfsdk/pwl/cpwl_wnd.cpp
+++ b/fpdfsdk/pwl/cpwl_wnd.cpp
@@ -89,9 +89,7 @@
     }
   }
 
-  void ReleaseCapture() {
-    m_aMousePath.clear();
-  }
+  void ReleaseCapture() { m_aMousePath.clear(); }
 
   CPWL_Wnd* GetFocusedWindow() const { return m_pMainKeyboardWnd.Get(); }
 
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h
index 3436a69..6e8f073 100644
--- a/fpdfsdk/pwl/cpwl_wnd.h
+++ b/fpdfsdk/pwl/cpwl_wnd.h
@@ -112,24 +112,24 @@
     CreateParams(const CreateParams& other);
     ~CreateParams();
 
-    CFX_FloatRect rcRectWnd;                          // required
-    UnownedPtr<TimerHandlerIface> pTimerHandler;      // required
-    UnownedPtr<IPWL_SystemHandler> pSystemHandler;    // required
-    UnownedPtr<IPVT_FontMap> pFontMap;                // required
-    ObservedPtr<ProviderIface> pProvider;             // required
-    UnownedPtr<FocusHandlerIface> pFocusHandler;      // optional
-    uint32_t dwFlags = 0;                             // optional
-    CFX_Color sBackgroundColor;                       // optional
-    BorderStyle nBorderStyle = BorderStyle::SOLID;    // optional
-    int32_t dwBorderWidth = 1;                        // optional
-    CFX_Color sBorderColor;                           // optional
-    CFX_Color sTextColor;                             // optional
-    int32_t nTransparency = 255;                      // optional
-    float fFontSize;                                  // optional
-    CPWL_Dash sDash;                                  // optional
-    CPWL_MsgControl* pMsgControl = nullptr;           // ignore
-    int32_t eCursorType = FXCT_ARROW;                 // ignore
-    CFX_Matrix mtChild;                               // ignore
+    CFX_FloatRect rcRectWnd;                        // required
+    UnownedPtr<TimerHandlerIface> pTimerHandler;    // required
+    UnownedPtr<IPWL_SystemHandler> pSystemHandler;  // required
+    UnownedPtr<IPVT_FontMap> pFontMap;              // required
+    ObservedPtr<ProviderIface> pProvider;           // required
+    UnownedPtr<FocusHandlerIface> pFocusHandler;    // optional
+    uint32_t dwFlags = 0;                           // optional
+    CFX_Color sBackgroundColor;                     // optional
+    BorderStyle nBorderStyle = BorderStyle::SOLID;  // optional
+    int32_t dwBorderWidth = 1;                      // optional
+    CFX_Color sBorderColor;                         // optional
+    CFX_Color sTextColor;                           // optional
+    int32_t nTransparency = 255;                    // optional
+    float fFontSize;                                // optional
+    CPWL_Dash sDash;                                // optional
+    CPWL_MsgControl* pMsgControl = nullptr;         // ignore
+    int32_t eCursorType = FXCT_ARROW;               // ignore
+    CFX_Matrix mtChild;                             // ignore
   };
 
   static bool IsSHIFTKeyDown(uint32_t nFlag);
diff --git a/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp b/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
index 52510f5..9776ddc 100644
--- a/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
@@ -20,10 +20,11 @@
  * limitations under the License.
  */
 
+#include "fxbarcode/qrcode/BC_QRCoderMaskUtil.h"
+
 #include "fxbarcode/common/BC_CommonByteMatrix.h"
 #include "fxbarcode/qrcode/BC_QRCoder.h"
 #include "fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h"
-#include "fxbarcode/qrcode/BC_QRCoderMaskUtil.h"
 
 namespace {
 
diff --git a/fxbarcode/qrcode/BC_QRCoderMaskUtil.h b/fxbarcode/qrcode/BC_QRCoderMaskUtil.h
index 6cbbe2f..b2da2a8 100644
--- a/fxbarcode/qrcode/BC_QRCoderMaskUtil.h
+++ b/fxbarcode/qrcode/BC_QRCoderMaskUtil.h
@@ -7,6 +7,8 @@
 #ifndef FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_
 #define FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_
 
+#include <stdint.h>
+
 class CBC_CommonByteMatrix;
 
 class CBC_QRCoderMaskUtil {
diff --git a/fxbarcode/qrcode/BC_QRCoderVersion.cpp b/fxbarcode/qrcode/BC_QRCoderVersion.cpp
index e2efa45..9263ee7 100644
--- a/fxbarcode/qrcode/BC_QRCoderVersion.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderVersion.cpp
@@ -47,8 +47,7 @@
   m_totalCodeWords = m_ecBlocksArray[0]->GetTotalDataCodeWords();
 }
 
-CBC_QRCoderVersion::~CBC_QRCoderVersion() {
-}
+CBC_QRCoderVersion::~CBC_QRCoderVersion() = default;
 
 // static
 void CBC_QRCoderVersion::Initialize() {
diff --git a/fxjs/cfxjs_engine_unittest.cpp b/fxjs/cfxjs_engine_unittest.cpp
index 0902fdb..e0f7301 100644
--- a/fxjs/cfxjs_engine_unittest.cpp
+++ b/fxjs/cfxjs_engine_unittest.cpp
@@ -40,28 +40,30 @@
   v8::HandleScope handle_scope(isolate());
 
   // Object: 0
-  engine()->DefineObj("perm", FXJSOBJTYPE_DYNAMIC,
-                      [](CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) {
-                        pEngine->SetObjectPrivate(
-                            obj, pdfium::MakeUnique<CJS_Object>(obj, nullptr));
-                        perm_created = true;
-                      },
-                      [](v8::Local<v8::Object> obj) {
-                        perm_destroyed = true;
-                        CFXJS_Engine::SetObjectPrivate(obj, nullptr);
-                      });
+  engine()->DefineObj(
+      "perm", FXJSOBJTYPE_DYNAMIC,
+      [](CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) {
+        pEngine->SetObjectPrivate(obj,
+                                  pdfium::MakeUnique<CJS_Object>(obj, nullptr));
+        perm_created = true;
+      },
+      [](v8::Local<v8::Object> obj) {
+        perm_destroyed = true;
+        CFXJS_Engine::SetObjectPrivate(obj, nullptr);
+      });
 
   // Object: 1
-  engine()->DefineObj("temp", FXJSOBJTYPE_DYNAMIC,
-                      [](CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) {
-                        pEngine->SetObjectPrivate(
-                            obj, pdfium::MakeUnique<CJS_Object>(obj, nullptr));
-                        temp_created = true;
-                      },
-                      [](v8::Local<v8::Object> obj) {
-                        temp_destroyed = true;
-                        CFXJS_Engine::SetObjectPrivate(obj, nullptr);
-                      });
+  engine()->DefineObj(
+      "temp", FXJSOBJTYPE_DYNAMIC,
+      [](CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) {
+        pEngine->SetObjectPrivate(obj,
+                                  pdfium::MakeUnique<CJS_Object>(obj, nullptr));
+        temp_created = true;
+      },
+      [](v8::Local<v8::Object> obj) {
+        temp_destroyed = true;
+        CFXJS_Engine::SetObjectPrivate(obj, nullptr);
+      });
 
   engine()->InitializeEngine();
 
diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp
index bd17de0..c5b02fe 100644
--- a/fxjs/cjs_publicmethods.cpp
+++ b/fxjs/cjs_publicmethods.cpp
@@ -343,7 +343,6 @@
   return StrArray;
 }
 
-
 double CJS_PublicMethods::ParseDate(const WideString& value,
                                     bool* bWrongFormat) {
   double dt = FX_GetDateTime();
diff --git a/fxjs/cjs_util.h b/fxjs/cjs_util.h
index 74e96cc..6f55b3a 100644
--- a/fxjs/cjs_util.h
+++ b/fxjs/cjs_util.h
@@ -50,7 +50,6 @@
   static const char kName[];
   static const JSMethodSpec MethodSpecs[];
 
-
   CJS_Result printd(CJS_Runtime* pRuntime,
                     const std::vector<v8::Local<v8::Value>>& params);
   CJS_Result printf(CJS_Runtime* pRuntime,
diff --git a/fxjs/fx_date_helpers.h b/fxjs/fx_date_helpers.h
index 9f23a67..3657694 100644
--- a/fxjs/fx_date_helpers.h
+++ b/fxjs/fx_date_helpers.h
@@ -47,22 +47,22 @@
 }  // namespace fxjs
 
 using fxjs::FX_GetDateTime;
-using fxjs::FX_GetYearFromTime;
-using fxjs::FX_GetMonthFromTime;
 using fxjs::FX_GetDayFromTime;
 using fxjs::FX_GetHourFromTime;
 using fxjs::FX_GetMinFromTime;
+using fxjs::FX_GetMonthFromTime;
 using fxjs::FX_GetSecFromTime;
-using fxjs::FX_IsValidMonth;
-using fxjs::FX_IsValidDay;
+using fxjs::FX_GetYearFromTime;
 using fxjs::FX_IsValid24Hour;
+using fxjs::FX_IsValidDay;
 using fxjs::FX_IsValidMinute;
+using fxjs::FX_IsValidMonth;
 using fxjs::FX_IsValidSecond;
 using fxjs::FX_LocalTime;
+using fxjs::FX_MakeDate;
 using fxjs::FX_MakeDay;
 using fxjs::FX_MakeTime;
-using fxjs::FX_MakeDate;
-using fxjs::FX_ParseStringInteger;
 using fxjs::FX_ParseDateUsingFormat;
+using fxjs::FX_ParseStringInteger;
 
 #endif  // FXJS_FX_DATE_HELPERS_H_
diff --git a/fxjs/xfa/cfxjse_class.cpp b/fxjs/xfa/cfxjse_class.cpp
index 2860837..f6caf07 100644
--- a/fxjs/xfa/cfxjse_class.cpp
+++ b/fxjs/xfa/cfxjse_class.cpp
@@ -17,8 +17,8 @@
 #include "fxjs/xfa/cfxjse_value.h"
 #include "third_party/base/ptr_util.h"
 
-using pdfium::fxjse::kFuncTag;
 using pdfium::fxjse::kClassTag;
+using pdfium::fxjse::kFuncTag;
 
 namespace {
 
diff --git a/fxjs/xfa/cfxjse_formcalc_context.cpp b/fxjs/xfa/cfxjse_formcalc_context.cpp
index 4ce1e21..9f78017 100644
--- a/fxjs/xfa/cfxjse_formcalc_context.cpp
+++ b/fxjs/xfa/cfxjse_formcalc_context.cpp
@@ -33,8 +33,8 @@
 #include "xfa/fxfa/parser/cxfa_timezoneprovider.h"
 #include "xfa/fxfa/parser/xfa_utils.h"
 
-using pdfium::fxjse::kFuncTag;
 using pdfium::fxjse::kClassTag;
+using pdfium::fxjse::kFuncTag;
 
 namespace {
 
diff --git a/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp b/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp
index 6fa89fb..19fc730 100644
--- a/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp
+++ b/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp
@@ -1517,7 +1517,10 @@
   ASSERT_TRUE(OpenDocument("simple_xfa.pdf"));
 
   const char* const tests[] = {
-      "F()", "()", "()()()", "Round(2.0)()",
+      "F()",
+      "()",
+      "()()()",
+      "Round(2.0)()",
   };
 
   for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index e509d15..7d9d320 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -1550,4 +1550,3 @@
 void CJX_Object::ScriptSubmitFormatMode(CFXJSE_Value* pValue,
                                         bool bSetting,
                                         XFA_Attribute eAttribute) {}
-