1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  | 
From 83f11d630aa1cb6d5ceb292364412f7b0585a201 Mon Sep 17 00:00:00 2001
From: Matt Jolly <kangie@gentoo.org>
Date: Mon, 19 May 2025 11:21:10 -0700
Subject: [PATCH] Fix build with system libpng
`cbc692a42241970e1da492d5b14326e81ecb1061` refactored
`fxcodec::CFX_DIBAttribute` and changed the names of its members.
Unfortunately this change appears to have been typo'd in the
'system libpng' build path, which is not checked by CI, resulting
in downstream build failures in Chromium.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Change-Id: Id4c2c24f76cb709a0bc78badcaf63eb9c5868fe3
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132130
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
---
 AUTHORS                          | 1 +
 core/fxcodec/png/png_decoder.cpp | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 3cd57a711..567f8f5c9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -32,6 +32,7 @@ Justin Pierce <brkfstmnchr@gmail.com>
 Ke Liu <stackexploit@gmail.com>
 Luật Nguyễn <manhluat93.php@gmail.com>
 Manuel Geißer <geisserml@gmail.com>
+Matt Jolly <kangie@gentoo.org>
 Michael Doppler <m.doppler@gmail.com>
 Miklos Vajna <vmiklos@vmiklos.hu>
 Minh Trần <myoki.crystal@gmail.com>
diff --git a/core/fxcodec/png/png_decoder.cpp b/core/fxcodec/png/png_decoder.cpp
index 278e381ea..7b6edcd04 100644
--- a/core/fxcodec/png/png_decoder.cpp
+++ b/core/fxcodec/png/png_decoder.cpp
@@ -52,8 +52,8 @@ void _png_load_bmp_attribute(png_structp png_ptr,
                              CFX_DIBAttribute* pAttribute) {
   if (pAttribute) {
 #if defined(PNG_pHYs_SUPPORTED)
-    pAttribute->xdpi_ = png_get_x_pixels_per_meter(png_ptr, info_ptr);
-    pAttribute->ydpi_ = png_get_y_pixels_per_meter(png_ptr, info_ptr);
+    pAttribute->x_dpi_ = png_get_x_pixels_per_meter(png_ptr, info_ptr);
+    pAttribute->y_dpi_ = png_get_y_pixels_per_meter(png_ptr, info_ptr);
     png_uint_32 res_x, res_y;
     int unit_type;
     png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, &unit_type);
  |