Rename some "remain" variables to "remaining"

Make the variable names more grammatically correct.

Change-Id: Iaa16069b9d55bcd8ae890db5f9ee2e2389c6ff6e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113410
Reviewed-by: Nigi <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index 92c35f8..2312aa6 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -181,13 +181,13 @@
 void CPWL_EditImpl::UndoStack::Undo() {
   DCHECK(!m_bWorking);
   m_bWorking = true;
-  int nUndoRemain = 1;
-  while (CanUndo() && nUndoRemain > 0) {
-    nUndoRemain += m_UndoItemStack[m_nCurUndoPos - 1]->Undo();
+  int undo_remaining = 1;
+  while (CanUndo() && undo_remaining > 0) {
+    undo_remaining += m_UndoItemStack[m_nCurUndoPos - 1]->Undo();
     m_nCurUndoPos--;
-    nUndoRemain--;
+    undo_remaining--;
   }
-  DCHECK_EQ(nUndoRemain, 0);
+  DCHECK_EQ(undo_remaining, 0);
   DCHECK(m_bWorking);
   m_bWorking = false;
 }
@@ -1783,8 +1783,8 @@
 void CPWL_EditImpl::ReplaceAndKeepSelection(const WideString& text) {
   AddEditUndoItem(std::make_unique<UndoReplaceSelection>(this, false));
   bool is_insert_undo_clear = ClearSelection();
-  // It is necessary to determine whether the value of `m_nUndoRemain` is 2 or 3
-  // based on ClearSelection().
+  // It is necessary to determine whether the value of `undo_remaining_` is 2 or
+  // 3 based on ClearSelection().
   if (!is_insert_undo_clear) {
     m_Undo.GetLastAddItem()->set_undo_remaining(2);
   }
@@ -1803,8 +1803,8 @@
 void CPWL_EditImpl::ReplaceSelection(const WideString& text) {
   AddEditUndoItem(std::make_unique<UndoReplaceSelection>(this, false));
   bool is_insert_undo_clear = ClearSelection();
-  // It is necessary to determine whether the value of `m_nUndoRemain` is 2 or 3
-  // based on ClearSelection().
+  // It is necessary to determine whether the value of `undo_remaining_` is 2 or
+  // 3 based on ClearSelection().
   if (!is_insert_undo_clear) {
     m_Undo.GetLastAddItem()->set_undo_remaining(2);
   }
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index 7d4ef85..52b51a6 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -189,17 +189,17 @@
   CXFA_FFApp* pApp = m_pDoc->GetApp();
   CXFA_FFApp::CallbackIface* pAppProvider = pApp->GetAppProvider();
   if (pAppProvider && iCount) {
-    int32_t iRemain = iCount > 7 ? iCount - 7 : 0;
-    iCount -= iRemain;
+    int32_t remaining = iCount > 7 ? iCount - 7 : 0;
+    iCount -= remaining;
     WideString wsMsg;
     for (int32_t i = 0; i < iCount; i++)
       wsMsg += m_NullTestMsgArray[i] + L"\n";
 
-    if (iRemain > 0) {
+    if (remaining > 0) {
       wsMsg += L"\n" + WideString::Format(
                            L"Message limit exceeded. Remaining %d "
                            L"validation errors not reported.",
-                           iRemain);
+                           remaining);
     }
     pAppProvider->MsgBox(wsMsg, pAppProvider->GetAppTitle(),
                          static_cast<uint32_t>(AlertIcon::kStatus),