Convert another batch of fpdfsdk files to avoid shortening

Many of these are just checked_cast, because they are assigned
at API boundaries to types that can't be changed, or used in
arithmetic.

Change-Id: I5ab65bb51279b235a9e25dfb742eabf37697a75c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/91351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 95b2bb7..beed063 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -340,7 +340,8 @@
     return;
 
   ByteString bsUrl = URL.ToUTF16LE();
-  js_platform->Doc_submitForm(js_platform, form_data.data(), form_data.size(),
+  js_platform->Doc_submitForm(js_platform, form_data.data(),
+                              fxcrt::CollectionSize<int>(form_data),
                               AsFPDFWideString(&bsUrl));
 }
 
@@ -404,7 +405,7 @@
     const WideString& text,
     bool bFocus) {
   if (m_pInfo && m_pInfo->FFI_SetTextFieldFocus) {
-    int nCharacters = text.GetLength();
+    size_t nCharacters = text.GetLength();
     ByteString bsUTFText = text.ToUTF16LE();
     auto* pBuffer = reinterpret_cast<const unsigned short*>(bsUTFText.c_str());
     m_pInfo->FFI_SetTextFieldFocus(m_pInfo, pBuffer, nCharacters, bFocus);