diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-04 18:26:07 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-04 18:26:07 +0000 |
commit | f06ed6d3578fff9e1d2990e5757dc460e60e5dd3 (patch) | |
tree | 80a0b51c34053bcce961d43905afaef33b33c4da /fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | |
parent | 168c763539e70bea450701470c47a8991f578336 (diff) | |
download | pdfium-f06ed6d3578fff9e1d2990e5757dc460e60e5dd3.tar.xz |
Revert "Make CPDF_Document cache CPDF_Pages"
This reverts commit f0d9d28a034fe3650c3c2d662090c1e8687ddb16.
Reason for revert: avoid parsing page.
Change-Id: Id3478f7e38f1cbe95d098e00158b1d7d9dc6f76e
Reviewed-on: https://pdfium-review.googlesource.com/33750
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_page.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index f4120896a8..4d7e3bc222 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -34,9 +34,10 @@ bool CPDFXFA_Page::LoadPDFPage() { if (!pDict) return false; - if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict) - m_pPDFPage = pPDFDoc->GetOrCreatePDFPage(pDict); - + if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict) { + m_pPDFPage = pdfium::MakeRetain<CPDF_Page>(pPDFDoc, pDict, true); + m_pPDFPage->ParseContent(); + } return true; } @@ -79,7 +80,9 @@ bool CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) { if (!m_pContext || m_iPageIndex < 0 || !pageDict) return false; - m_pPDFPage = m_pContext->GetPDFDoc()->GetOrCreatePDFPage(pageDict); + m_pPDFPage = + pdfium::MakeRetain<CPDF_Page>(m_pContext->GetPDFDoc(), pageDict, true); + m_pPDFPage->ParseContent(); return true; } |