Convert CPDFSDK_PageView to have a CPDFSDK_FormFillEnvironment
This CL changes CPDFSDK_PageView to have a CPDFSDK_FormFillEnvironment instead
of a CPDFSDK_Document.
Review-Url: https://codereview.chromium.org/2400673002
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
index 574efc1..077c7fa 100644
--- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp
+++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -208,7 +208,7 @@
CPDFSDK_Annot::ObservedPtr pNext(
GetNextAnnot(pFocusAnnot, !m_pEnv->IsSHIFTKeyDown(nFlag)));
if (pNext && pNext.Get() != pFocusAnnot) {
- pPage->GetSDKDocument()->SetFocusAnnot(&pNext);
+ pPage->GetFormFillEnv()->GetSDKDocument()->SetFocusAnnot(&pNext);
return TRUE;
}
}
@@ -226,11 +226,7 @@
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlag) {
ASSERT(*pAnnot);
- if (!GetAnnotHandler(pAnnot->Get())->OnSetFocus(pAnnot, nFlag))
- return FALSE;
-
- (*pAnnot)->GetPageView()->GetSDKDocument();
- return TRUE;
+ return GetAnnotHandler(pAnnot->Get())->OnSetFocus(pAnnot, nFlag);
}
FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKillFocus(