Remove bWillCommit argument from OnField_Format() methods.

It is always passed as true.

Change-Id: I645d2ee479b86b2071068197b882e3e7324bfef2
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp
index 9e7c548..4b10400 100644
--- a/fpdfsdk/cpdfsdk_interactiveform.cpp
+++ b/fpdfsdk/cpdfsdk_interactiveform.cpp
@@ -306,7 +306,7 @@
       WideString script = action.GetJavaScript();
       if (!script.IsEmpty()) {
         IJS_Runtime::ScopedEventContext pContext(pRuntime);
-        pContext->OnField_Format(pFormField, &sValue, true);
+        pContext->OnField_Format(pFormField, &sValue);
         Optional<IJS_Runtime::JS_Error> err = pContext->RunScript(script);
         if (!err)
           return sValue;
diff --git a/fxjs/cjs_event_context.cpp b/fxjs/cjs_event_context.cpp
index 3dd2435..27e8120 100644
--- a/fxjs/cjs_event_context.cpp
+++ b/fxjs/cjs_event_context.cpp
@@ -206,9 +206,8 @@
 }
 
 void CJS_EventContext::OnField_Format(CPDF_FormField* pTarget,
-                                      WideString* Value,
-                                      bool bWillCommit) {
-  m_pEventRecorder->OnField_Format(pTarget, Value, bWillCommit);
+                                      WideString* Value) {
+  m_pEventRecorder->OnField_Format(pTarget, Value);
 }
 
 void CJS_EventContext::OnField_Keystroke(WideString* strChange,
diff --git a/fxjs/cjs_event_context.h b/fxjs/cjs_event_context.h
index 6a28b43..6a953e6 100644
--- a/fxjs/cjs_event_context.h
+++ b/fxjs/cjs_event_context.h
@@ -62,9 +62,7 @@
                          CPDF_FormField* pTarget,
                          WideString* pValue,
                          bool* pRc) override;
-  void OnField_Format(CPDF_FormField* pTarget,
-                      WideString* Value,
-                      bool bWillCommit) override;
+  void OnField_Format(CPDF_FormField* pTarget, WideString* Value) override;
   void OnField_Keystroke(WideString* strChange,
                          const WideString& strChangeEx,
                          bool bKeyDown,
diff --git a/fxjs/cjs_event_context_stub.h b/fxjs/cjs_event_context_stub.h
index 341b995..06d0184 100644
--- a/fxjs/cjs_event_context_stub.h
+++ b/fxjs/cjs_event_context_stub.h
@@ -53,9 +53,7 @@
                          CPDF_FormField* pTarget,
                          WideString* pValue,
                          bool* pRc) override {}
-  void OnField_Format(CPDF_FormField* pTarget,
-                      WideString* Value,
-                      bool bWillCommit) override {}
+  void OnField_Format(CPDF_FormField* pTarget, WideString* Value) override {}
   void OnField_Keystroke(WideString* strChange,
                          const WideString& strChangeEx,
                          bool KeyDown,
diff --git a/fxjs/cjs_eventrecorder.cpp b/fxjs/cjs_eventrecorder.cpp
index af752b5..59febf0 100644
--- a/fxjs/cjs_eventrecorder.cpp
+++ b/fxjs/cjs_eventrecorder.cpp
@@ -219,15 +219,14 @@
 }
 
 void CJS_EventRecorder::OnField_Format(CPDF_FormField* pTarget,
-                                       WideString* pValue,
-                                       bool bWillCommit) {
+                                       WideString* pValue) {
   ASSERT(pValue);
   Initialize(JET_FIELD_FORMAT);
 
   m_nCommitKey = 0;
   m_strTargetName = pTarget->GetFullName();
   m_pValue = pValue;
-  m_bWillCommit = bWillCommit;
+  m_bWillCommit = true;
 }
 
 void CJS_EventRecorder::OnScreen_Focus(bool bModifier,
diff --git a/fxjs/cjs_eventrecorder.h b/fxjs/cjs_eventrecorder.h
index 83be14d..acf9856 100644
--- a/fxjs/cjs_eventrecorder.h
+++ b/fxjs/cjs_eventrecorder.h
@@ -81,9 +81,7 @@
                          CPDF_FormField* pTarget,
                          WideString* Value,
                          bool* pbRc);
-  void OnField_Format(CPDF_FormField* pTarget,
-                      WideString* Value,
-                      bool bWillCommit);
+  void OnField_Format(CPDF_FormField* pTarget, WideString* Value);
   void OnField_Keystroke(WideString* strChange,
                          const WideString& strChangeEx,
                          bool KeyDown,
diff --git a/fxjs/ijs_event_context.h b/fxjs/ijs_event_context.h
index e83c423..e2c6407 100644
--- a/fxjs/ijs_event_context.h
+++ b/fxjs/ijs_event_context.h
@@ -66,9 +66,7 @@
                                  CPDF_FormField* pTarget,
                                  WideString* Value,
                                  bool* bRc) = 0;
-  virtual void OnField_Format(CPDF_FormField* pTarget,
-                              WideString* Value,
-                              bool bWillCommit) = 0;
+  virtual void OnField_Format(CPDF_FormField* pTarget, WideString* Value) = 0;
   virtual void OnField_Keystroke(WideString* strChange,
                                  const WideString& strChangeEx,
                                  bool KeyDown,