summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-12 19:21:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-12 19:21:46 +0000
commita3843c99e7a631b2fbf87bbc12834e61bfb7b6f2 (patch)
tree4bc4f0c8c75b40a8a7cfe1246a36b69a1ac9900c /core/fpdfapi/page
parent82c730bf83c7582d360fc4080c7729115b0a9550 (diff)
downloadpdfium-chromium/3457.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/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/ipdf_page.h5
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;