Merge to XFA: Fix a regression with cut off images.
authorLei Zhang <thestig@chromium.org>
Wed, 6 May 2015 21:00:24 +0000 (14:00 -0700)
committerLei Zhang <thestig@chromium.org>
Wed, 6 May 2015 21:00:24 +0000 (14:00 -0700)
This regressed in commit 3f41851 due to shadow variables.

BUG=478164
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1101443004

(cherry picked from commit 97d10aff654e42c1b7c3d2abf33fbcf8d341799e)

Review URL: https://codereview.chromium.org/1127163003

DEPS
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

diff --git a/DEPS b/DEPS
index 88e3a3c..f4eb0ee 100644 (file)
--- a/DEPS
+++ b/DEPS
@@ -3,7 +3,7 @@ deps = {
     "https://chromium.googlesource.com/external/gyp",
 
   "testing/corpus":
-     "https://pdfium.googlesource.com/pdfium_tests@e733fe1d98fad50c9b5f4023f08db429143b1291",
+     "https://pdfium.googlesource.com/pdfium_tests@73e1d0c915fe574a470fcbc76dd36246ac9fec45",
 
   "testing/gmock":
      "https://chromium.googlesource.com/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271",
index 79d7351..2e642be 100644 (file)
@@ -238,7 +238,7 @@ FX_BOOL CPDF_DIBSource::Load(CPDF_Document* pDoc, const CPDF_Stream* pStream, CP
     if (m_bColorKey) {
         m_bpp = 32;
         m_AlphaFlag = 2;
-        FX_SAFE_DWORD pitch = CalculatePitch32(m_bpp, m_Width);
+        pitch = CalculatePitch32(m_bpp, m_Width);
         if (!pitch.IsValid()) {
             return FALSE;
         }
@@ -282,7 +282,7 @@ int CPDF_DIBSource::ContinueToLoadMask()
     if (m_bColorKey) {
         m_bpp = 32;
         m_AlphaFlag = 2;
-        FX_SAFE_DWORD pitch = CalculatePitch32(m_bpp, m_Width);
+        pitch = CalculatePitch32(m_bpp, m_Width);
         if (!pitch.IsValid()) {
             return 0;
         }