summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Field.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-24 09:50:51 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-24 09:50:51 -0800
commit50d12ada784ad3ba3f9ed6935d59f1ce828695e5 (patch)
tree27caed4654213e5433256147a7c6b1b085692a32 /fpdfsdk/src/javascript/Field.cpp
parenta2167107bbcef6a3e3687d49a5b1e62503391316 (diff)
downloadpdfium-50d12ada784ad3ba3f9ed6935d59f1ce828695e5.tar.xz
Introduce "underlying types" to abstract XFA differences.
See the comment in fsdk_define.h. Also tidy up a bit, and remove dead DeletePages(). This should help us match master more closely (given corresponding changes on the master side). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1473503002 .
Diffstat (limited to 'fpdfsdk/src/javascript/Field.cpp')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 4119b8c32e..39e15e9868 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -3397,9 +3397,8 @@ FX_BOOL Field::setFocus(IJS_Context* cc,
pWidget = pInterForm->GetWidget(pFormField->GetControl(0));
} else {
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
- ASSERT(pEnv);
- CPDFXFA_Page* pPage =
- (CPDFXFA_Page*)pEnv->FFI_GetCurrentPage(m_pDocument->GetDocument());
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(
+ pEnv->FFI_GetCurrentPage(m_pDocument->GetUnderlyingDocument()));
if (!pPage)
return FALSE;
if (CPDFSDK_PageView* pCurPageView = m_pDocument->GetPageView(pPage)) {