summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-12-29 10:18:43 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-12-29 10:18:43 +0800
commit8be8a4452a947ce125dd1feea00cc9fd23714ec6 (patch)
tree27113413aeed27d481236e645b1abb58c969b7f0 /core
parent1134cc9f56c85d13ec14eaa78726ef02121cb18c (diff)
downloadpdfium-8be8a4452a947ce125dd1feea00cc9fd23714ec6.tar.xz
Fix partial information printed with blank window covering the centerchromium/2612chromium/2611chromium/2610chromium/2609chromium/2608chromium/2607
BUG=482206 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1551563002 .
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_page.h3
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp1
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp2
3 files changed, 6 insertions, 0 deletions
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index efbfa67280..d58537aa7e 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -67,6 +67,8 @@ class CPDF_PageObjects {
FX_BOOL BackgroundAlphaNeeded() const { return m_bBackgroundAlphaNeeded; }
+ FX_BOOL HasImageMask() const { return m_bHasImageMask; }
+
CFX_FloatRect CalcBoundingBox() const;
CPDF_Dictionary* m_pFormDict;
@@ -89,6 +91,7 @@ class CPDF_PageObjects {
CFX_PtrList m_ObjectList;
FX_BOOL m_bBackgroundAlphaNeeded;
+ FX_BOOL m_bHasImageMask;
FX_BOOL m_bReleaseMembers;
CPDF_ContentParser* m_pParser;
ParseState m_ParseState;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 1fef74b99b..7e2492fad7 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -675,6 +675,7 @@ CPDF_PageObjects::CPDF_PageObjects(FX_BOOL bReleaseMembers)
m_Transparency(0),
m_ObjectList(128),
m_bBackgroundAlphaNeeded(FALSE),
+ m_bHasImageMask(FALSE),
m_bReleaseMembers(bReleaseMembers),
m_pParser(nullptr),
m_ParseState(CONTENT_NOT_PARSED) {}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 865c6b7116..264b6fb36f 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -710,6 +710,8 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
CPDF_ImageObject* pObj = AddImage(pXObject, NULL, FALSE);
m_LastImageName = name;
m_pLastImage = pObj->m_pImage;
+ if (!m_pObjectList->m_bHasImageMask)
+ m_pObjectList->m_bHasImageMask = m_pLastImage->IsMask();
} else if (type == "Form") {
AddForm(pXObject);
} else {