summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_editpage.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-05-08 20:32:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-08 20:32:08 +0000
commit7b094f81483240f50dfc12e51cf545a8f0d5933d (patch)
treeca0cb1640471aa895ff381def2638f1baf8f309c /fpdfsdk/fpdf_editpage.cpp
parent55bbb0a2e7a95bf2c08cbd1d7f1563aec7e5b97d (diff)
downloadpdfium-7b094f81483240f50dfc12e51cf545a8f0d5933d.tar.xz
Revert "Ensure that XFA Pages always have a corresponding PDF page"
This reverts commit e7207f33f8024b59fc85abb1b4594b0fbab5361b. Reason for revert: Causes crash in some XFA forms - crbug.com/840922 This is a merge, not a clean revert. Original change's description: > Ensure that XFA Pages always have a corresponding PDF page > > The PDF page may be blank, un-numbered, or untracked by CPDF, but > this provides a place for all XFA pages to "extend" from down the > road. > > Change-Id: If1003be0f261154e61e9793ccba7e1f43cd73104 > Reviewed-on: https://pdfium-review.googlesource.com/31771 > Commit-Queue: Tom Sepez <tsepez@chromium.org> > Reviewed-by: dsinclair <dsinclair@chromium.org> Change-Id: Ia7f286321552b225a95f461aa8a6aef979f5c991 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:840922 Reviewed-on: https://pdfium-review.googlesource.com/32210 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editpage.cpp')
-rw-r--r--fpdfsdk/fpdf_editpage.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 19c301bf12..ce597d6d6e 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -186,6 +186,7 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDFPage_New(FPDF_DOCUMENT document,
auto* pContext = static_cast<CPDFXFA_Context*>(pDoc->GetExtension());
if (pContext) {
auto pXFAPage = pdfium::MakeRetain<CPDFXFA_Page>(pContext, page_index);
+ pXFAPage->LoadPDFPage(pPageDict);
return FPDFPageFromUnderlying(pXFAPage.Leak()); // Caller takes ownership.
}
// Eventually, fallthru into non-XFA case once page type is consistent.