summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_page.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-01 17:22:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-01 17:22:44 +0000
commit302c8ce0ee78ecb10398c9b1fa2796d116bbb4a5 (patch)
tree4a3995149b3e9feb6017dd39bb22918feb46c6fb /core/fpdfapi/page/cpdf_page.cpp
parentba367068887aca9f700289aa1b8c198920ca39a2 (diff)
downloadpdfium-302c8ce0ee78ecb10398c9b1fa2796d116bbb4a5.tar.xz
Introduce the concept of CPDF_Page::Extension
Similar tp CPDF_Document::Extension, this is a base type for fpdfsdk/ to use to improve layering. While we're at it, make pages point to documents to prove they don't outlive them. Another small step towards not passing XFA objects across FPDF. Change-Id: Idcee9da3a18c06331fa56f3d6c188e4ce27d34f2 Reviewed-on: https://pdfium-review.googlesource.com/31631 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_page.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_page.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_page.cpp b/core/fpdfapi/page/cpdf_page.cpp
index d679766273..eee6673650 100644
--- a/core/fpdfapi/page/cpdf_page.cpp
+++ b/core/fpdfapi/page/cpdf_page.cpp
@@ -22,7 +22,9 @@
CPDF_Page::CPDF_Page(CPDF_Document* pDocument,
CPDF_Dictionary* pPageDict,
bool bPageCache)
- : CPDF_PageObjectHolder(pDocument, pPageDict), m_PageSize(100, 100) {
+ : CPDF_PageObjectHolder(pDocument, pPageDict),
+ m_PageSize(100, 100),
+ m_pPDFDocument(pDocument) {
if (bPageCache)
m_pPageRender = pdfium::MakeUnique<CPDF_PageRenderCache>(this);
if (!pPageDict)