7#include "fpdfsdk/cpdfsdk_annotiterator.h"
8#include "fpdfsdk/cpdfsdk_baannot.h"
9#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
10#include "fpdfsdk/cpdfsdk_helpers.h"
11#include "fpdfsdk/cpdfsdk_pageview.h"
12#include "testing/embedder_test.h"
13#include "third_party/base/check.h"
14#include "third_party/base/check_op.h"
29 ASSERT_TRUE(
OpenDocument(
"links_highlights_annots.pdf"));
34 CPDFSDKFormFillEnvironmentFromFPDFFormHandle(
form_handle());
35 ASSERT_TRUE(m_pFormFillEnv);
38 ASSERT_TRUE(m_pPageView);
41 CPDFSDK_FormFillEnvironment*
GetFormFillEnv()
const {
return m_pFormFillEnv; }
47 m_pFormFillEnv->GetFocusableAnnotSubtypes());
51 for (size_t i = 1; i < n; i++) {
60 FPDF_PAGE m_page =
nullptr;
61 CPDFSDK_PageView* m_pPageView =
nullptr;
62 CPDFSDK_FormFillEnvironment* m_pFormFillEnv =
nullptr;
66 std::vector<CPDF_Annot::Subtype> focusable_annot_types = {
67 CPDF_Annot::Subtype::WIDGET, CPDF_Annot::Subtype::LINK,
68 CPDF_Annot::Subtype::HIGHLIGHT};
70 GetFormFillEnv()->SetFocusableAnnotSubtypes(focusable_annot_types);
84 pAnnot = GetNthFocusableAnnot(4);
CPDFSDK_Annot * GetFirstAnnot()
CPDFSDK_Annot * GetNextAnnot(CPDFSDK_Annot *pAnnot)
static bool OnKillFocus(ObservedPtr< CPDFSDK_Annot > &pAnnot, Mask< FWL_EVENTFLAG > nFlags)
virtual CPDF_Annot::Subtype GetAnnotSubtype() const =0
static bool OnSetFocus(ObservedPtr< CPDFSDK_Annot > &pAnnot, Mask< FWL_EVENTFLAG > nFlags)
CPDFSDK_FormFillEnvironment * GetFormFillEnv() const
CPDFSDK_Annot * GetNthFocusableAnnot(size_t n)
CPDFSDK_PageView * GetPageView() const
void UnloadPage(FPDF_PAGE page)
FPDF_PAGE LoadPage(int page_number)
FPDF_FORMHANDLE form_handle() const
bool OpenDocument(const std::string &filename)
TEST_F(CPDFSDK_BAAnnotTest, TabToLinkOrHighlightAnnot)
IPDF_Page * IPDFPageFromFPDFPage(FPDF_PAGE page)