summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_view.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-04 17:47:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 17:47:28 +0000
commit2491990f50f8ea48a509eb0ccc0193b4c1a3f776 (patch)
treea8b1f335d099f866493273731c91dcb4d2063d71 /fpdfsdk/fpdf_view.cpp
parent28d30b4870fb5327937fa0541d0059fc439736aa (diff)
downloadpdfium-2491990f50f8ea48a509eb0ccc0193b4c1a3f776.tar.xz
Revert "Make pagview decisions at runtime for non-xfa pages."
This reverts commit d8126c2e72a60403c73f4187d4041364d45a8d61. Reason for revert: Blocking previous revert. Change-Id: I144841ad257401ab626b981ef7691d3b8003a49a Reviewed-on: https://pdfium-review.googlesource.com/33711 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_view.cpp')
-rw-r--r--fpdfsdk/fpdf_view.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index f0ceb1f378..d5c2a7e3dd 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -734,9 +734,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page) {
RetainPtr<IPDF_Page> pPage;
pPage.Unleak(IPDFPageFromFPDFPage(page));
- if (pPage->AsXFAPage())
- return;
-
+#ifndef PDF_ENABLE_XFA
CPDFSDK_PageView* pPageView =
static_cast<CPDFSDK_PageView*>(pPage->AsPDFPage()->GetView());
if (!pPageView || pPageView->IsBeingDestroyed())
@@ -751,6 +749,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page) {
// first because it will attempt to reset the View on the |pPage| during
// destruction.
pPageView->GetFormFillEnv()->RemovePageView(pPage.Get());
+#endif // PDF_ENABLE_XFA
}
FPDF_EXPORT void FPDF_CALLCONV FPDF_CloseDocument(FPDF_DOCUMENT document) {