Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: fpdfsdk/src/javascript/Field.cpp

Issue 1473503002: Introduce "underlying types" to abstract XFA differences. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase past Jun's CL. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/javascript/Field.cpp
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 4119b8c32e41e709666da82a8f688a22e1e011bc..39e15e9868bb32fc7671442b8ee0104b6c9a8f3b 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)) {

Powered by Google App Engine
This is Rietveld 408576698