From cc965275f436267684a3f185ea3335e203cee6f9 Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 29 Jul 2014 06:38:16 -0700 Subject: Fix the typo of "Resources" keyword BUG=None R=thestig@chromium.org Review URL: https://codereview.chromium.org/420793004 --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index 11370075d6..b90c784f6f 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -4181,7 +4181,7 @@ FX_BOOL CPDF_DataAvail::HaveResourceAncestor(CPDF_Dictionary *pDict) if (!pParentDict) { return FALSE; } - CPDF_Object *pRet = pParentDict->GetElement("Resource"); + CPDF_Object *pRet = pParentDict->GetElement("Resources"); if (pRet) { m_pPageResource = pRet; return TRUE; @@ -4287,11 +4287,12 @@ FX_BOOL CPDF_DataAvail::IsPageAvail(FX_INT32 iPage, IFX_DownloadHints* pHints) } } if (m_pPageDict && !m_bNeedDownLoadResource) { - CPDF_Object *pRes = m_pPageDict->GetElement("Resource"); - if (!pRes) { + m_pPageResource = m_pPageDict->GetElement("Resources"); + if (!m_pPageResource) { m_bNeedDownLoadResource = HaveResourceAncestor(m_pPageDict); + } else { + m_bNeedDownLoadResource = TRUE; } - m_bNeedDownLoadResource = FALSE; } if (m_bNeedDownLoadResource) { FX_BOOL bRet = CheckResources(pHints); -- cgit v1.2.3