diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-12 19:21:46 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-12 19:21:46 +0000 |
commit | a3843c99e7a631b2fbf87bbc12834e61bfb7b6f2 (patch) | |
tree | 4bc4f0c8c75b40a8a7cfe1246a36b69a1ac9900c /core | |
parent | 82c730bf83c7582d360fc4080c7729115b0a9550 (diff) | |
download | pdfium-a3843c99e7a631b2fbf87bbc12834e61bfb7b6f2.tar.xz |
Remove some #ifdef XFA in favor of runtime checks.chromium/3457
Make LoadDocumentImpl() logic match FPDFAvail_GetDocument() logic, so
that the XFA extension is loaded before checking unsupported features.
Add some comments along the way.
Change-Id: I040e40fcca872f7c0a46e921bce1146f0fe42588
Reviewed-on: https://pdfium-review.googlesource.com/34931
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/page/ipdf_page.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/fpdfapi/page/ipdf_page.h b/core/fpdfapi/page/ipdf_page.h index 7c9fce7726..9b28559a94 100644 --- a/core/fpdfapi/page/ipdf_page.h +++ b/core/fpdfapi/page/ipdf_page.h @@ -20,6 +20,11 @@ class CPDFXFA_Page; // Interface implemented by both page types (CPDF_Page and CPDFXFA_Page). class IPDF_Page : public Retainable { public: + // There are actually 3 cases: a PDF page, an XFA page backed by a PDF page, + // and an XFA page not backed by a PDF page. AsPDFPage() will return the + // PDF page in either of the first two cases. AsXFAPage() is a straight + // downcast and is null if not either of the last two cases. Hence, both + // of these may return non-null on a given page. virtual CPDF_Page* AsPDFPage() = 0; virtual CPDFXFA_Page* AsXFAPage() = 0; |