diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-05 13:57:29 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-05 13:57:29 +0000 |
commit | fbcc5d9afb4506eea1003d024a5fac5d601cc196 (patch) | |
tree | 5ae5371f5216b1c6d9623534e1261ac606337280 /core/fpdfapi/page/cpdf_pageobjectholder.cpp | |
parent | ac42dd2d4b5bfefcbdd023b196db45bff94a1a7c (diff) | |
download | pdfium-fbcc5d9afb4506eea1003d024a5fac5d601cc196.tar.xz |
Add test for FPDF_GetPageSizeByIndex()
Ensure that FPDF_GetPageSizeByIndex() doesn't do a full page parse.
Issue was noticed on CL https://pdfium-review.googlesource.com/32830
Change-Id: I51966e0b91e1a002d33ee51f00c0428fa1cda04d
Reviewed-on: https://pdfium-review.googlesource.com/33792
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index 87a1aebaab..4d4fc56ac2 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -14,6 +14,7 @@ #include "core/fpdfapi/page/cpdf_contentparser.h" #include "core/fpdfapi/page/cpdf_pageobject.h" #include "core/fpdfapi/parser/cpdf_dictionary.h" +#include "core/fpdfapi/parser/cpdf_document.h" CPDF_PageObjectHolder::CPDF_PageObjectHolder(CPDF_Document* pDoc, CPDF_Dictionary* pFormDict) @@ -38,6 +39,8 @@ void CPDF_PageObjectHolder::ContinueParse(PauseIndicatorIface* pPause) { return; m_ParseState = CONTENT_PARSED; + m_pDocument->IncrementParsedPageCount(); + if (m_pParser->GetCurStates()) m_LastCTM = m_pParser->GetCurStates()->m_CTM; |