Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3376)

Unified Diff: core/fpdfdoc/cpdf_annot.cpp

Issue 2323203002: Define behaviors of FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfdoc/cpdf_annot.cpp
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp
index 4e0b04e9b623195c36ff47093d66f53cf7d53941..f06f476df5d8a91792506ef07236901b5c84a4e6 100644
--- a/core/fpdfdoc/cpdf_annot.cpp
+++ b/core/fpdfdoc/cpdf_annot.cpp
@@ -322,6 +322,19 @@ FX_BOOL CPDF_Annot::DrawInContext(const CPDF_Page* pPage,
CPDF_RenderContext* pContext,
const CFX_Matrix* pUser2Device,
AppearanceMode mode) {
+ if (IsAnnotationHidden(m_pAnnotDict))
Lei Zhang 2016/09/09 07:09:01 The newly added code is the same as the code in Dr
jaepark 2016/09/09 18:44:32 Done.
+ return FALSE;
+
+ if (m_nSubtype == CPDF_Annot::Subtype::POPUP && !m_bOpenState)
+ return FALSE;
+
+ // It might happen that by the time this annotation instance was created,
+ // it was flagged as "hidden" (e.g. /F 2), and hence CPVT_GenerateAP decided
+ // to not "generate" its AP.
+ // If for a reason the object is no longer hidden, but still does not have
+ // its "AP" generated, generate it now.
+ GenerateAPIfNeeded();
+
CFX_Matrix matrix;
CPDF_Form* pForm =
FPDFDOC_Annot_GetMatrix(pPage, this, mode, pUser2Device, matrix);

Powered by Google App Engine
This is Rietveld 408576698