Repository navigation
Sync S15: merge upstream PDFium up to 5f092b529 (Oct 30 2026) - #96
Merged
Merged
Conversation
Relocate pdfium::ScopedLocale from testing/ into core/fxcrt:test_support
so that core/fxge:test_support can depend on it directly. Gate the
setlocale() implementation on IS_LINUX || IS_CHROMEOS and provide a
no-op implementation on other platforms.
Instantiate pdfium::ScopedLocale("C") in DisplayListDeviceDriver
routines that format floating-point values so that display list output
always uses dots as decimal separators regardless of the active locale.
Bypass-Check-License: Moved files.
Change-Id: I775b0e22172e7b90087bdadd52d939c246758e7c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
This CL allows for the addition of {{header x.y}} in .in files to allow
for headers to contain version x.y in the headers. This allows for PDFs
with specific versions to be generated based on their templates.
Change-Id: Idcc6bb2539ceed90c1eafd5850dcb5f35815f421
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/161930
Reviewed-by: Andy Phan <andyphan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
This CL adds a test case to demonstrate that saving a PDF 2.0 file non-incrementally results in an incorrect header version of 1.0 instead of preserving the original 2.0 version. Bug: 576363144 Change-Id: Ibf93e920cef428325769b7b839054dd0b1411462 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/161810 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
This CL ensures that the major version is properly included in the file header when saving a document non-incrementally. Previously, the header set the major version digit to 1 regardless of the major version (writing %PDF-1.Y instead of %PDF-X.Y), resulting in an incorrect version format in the saved file. This CL fixes this issue and updates tests as needed. Bug: 576363144 Change-Id: Icd7e3af7ef1e7105b95bc3884fc490f1188a43ed Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/161811 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Aryan Krishnan <aryankrishnan4b@gmail.com>
In CFX_Path::GetRect(), exact floating-point comparisons cause clip paths with microscopic matrix shear (e.g. c = ~1e-8) to fail axis-aligned rectangle detection, forcing AGG to rasterize and intersect full polygon scanline masks instead of using fast integer bounding box clips. Replace exact float inequality with FXSYS_IsFloatEqual() to recognize near-axis-aligned rectangles. On the bug's test PDF (page 227, 100 repeats), this further reduces render CPU time from 2.83s to 0.41s (-85%, or -91% from the 4.73s baseline). * Use PointsEqual() and FXSYS_IsFloatEqual() in CFX_Path. * Update expectations in CFXPath.MicroShearTransformTolerance and FivePointRectFuzzyEndpoints unit tests. Bug: 550515869 Change-Id: I170ca4b4af453fca0a2509bf4a27298c80eef4de Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/161890 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Andy Phan <andyphan@chromium.org>
PDFium uses Siso with built-in RBE client, so buildtools/reclient is no longer used. Remove reclient_package, reclient_version, and buildtools/reclient from DEPS and tools/roll_pdfium_deps.py. Bug: 379584977 Change-Id: Ie4601cc206373d0396c055da77a6384793ae5d89 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162230 Auto-Submit: Fumitoshi Ukai <ukai@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Per ISO 32000-1:2008 section 7.5.4, a PDF file that has never been incrementally updated shall contain only one cross-reference subsection starting at object 0, with free entries forming a linked list starting and ending at object 0. The pre-existing CPDF_Creator code does not behave this way. While most PDF readers tolerate the behavior, and it can make the xref smaller, it technically violates the spec. Add a new test case in CPDFCreatorEmbedderTest to check how free entries are currently being handled. Add xref_free_objects.pdf with some deliberate object number gaps for use in this test case. This CL is AI generated. Bug: 42271313 Change-Id: Id84d0a6e01838c96b193b587c948ec904e045c24 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162210 Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Make it easy to roll the new libyuv DEPS entry added by CL [1]. Update roll_pdfium_deps_test.py to verify it works. Remove an obsolete test data entry along the way. [1] https://pdfium-review.googlesource.com/c/159396 Change-Id: I4ffc85b5401066711064c028ae8f7dc3bcd609d3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162290 Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Replace golden PNG comparisons in FPDFTransformEmbedderTest with display list string matching. This removes golden PNG files and verifies clip rects and transformation matrices directly. Change-Id: I0696a81f45224b26ffd20b02dc8375f73b743e02 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160357 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
https://chromium.googlesource.com/libyuv/libyuv.git/+log/eb8eda9c7973..1e2e3a359936 Created with: roll-dep third_party/libyuv Change-Id: Ida3d510672a423c1e079bfcaff395fa37e5cde32 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162310 Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Replace golden PNG comparisons in FPDFEditPathEmbedderTest with display list checks. This eliminates 2 golden PNG files and validates matrix transformations and path insertions directly against vector commands. Change-Id: I431e6176469cbdff5b837ff3ea321d5ee96392af Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160358 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Replace golden PNG comparisons in FPDFEditPageEmbedderTest with display list checks. This deletes 7 golden PNG files and directly verifies page rotations, object deactivations, and newly added paths using display list commands. Change-Id: Id104dc532f6191ebd0df509bdf46846a8b023b0d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160359 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Put the ByteStringPool to use after 10 years of sitting there doing nothing. Change-Id: Iff4317ac29f203dc2f7b19e4ca83f37a723007d6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160494 Auto-Submit: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Replace golden PNG comparisons in FPDFRenderPatternEmbedderTest and FPDFSaveEmbedderTest with display list checks verifying the absence of draw commands. Change-Id: Ic21d0b62060b9bd9e302151bc60925f6b0fed017 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160360 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Replace golden PNG comparisons in BrotliEnabledEmbedderTest, BrotliDisabledEmbedderTest, and BrotliV5EmbedderTest with display list checks. Keep BrotliDecodeParms using bitmap comparison since it tests lossless image stream decoding with predictor parameters. Change-Id: I72e1216f360772ba6e3eb154c683cfc5664f03d6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160110 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Convert several tests in fpdf_edit_embeddertest.cpp and fpdf_annot_embeddertest.cpp from bitmap-based pixel comparisons to display list comparisons. This eliminates (most) raster-dependent flakiness when running tests under Skia and Fontations on Linux. Also update EmbedderTest::CompareDisplayList() to write out the expectation file when --write-results is passed, matching the behavior of CompareBitmapWithExpectationSuffix(). Remove the now obsolete expectation PNG files for the converted tests. Change-Id: I89527374e44916c88dcff150918ca20755d7f16f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162390 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Remove the unreferenced GpStream IStream implementation and six unused GDI+ function pointer entries from cgdi_plus_ext.cpp. No functional change; all is dead code. Change-Id: I1389d2269b73f7ec5bf5479efcffa673c8229ab8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162411 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
This CL sets pdf_enable_brotli_override to true in the PDFium build overrides. Brotli support is now compiled in by default, but it remains disabled at runtime unless the library is explicitly loaded with the m_BrotliEnabled configuration set to true. Bug: 475855993 Change-Id: If77f8ca2df93e2083274d54c1cdda05b58fe2bb3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/151650 Reviewed-by: Andy Phan <andyphan@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Fix various constants where one can potentially assign nullptr to them. Change-Id: I2997370b894be1f0f44b8a6d5d6f39a41251a8ed Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162470 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
All 4 of these orderings should produce the exact same copy-paste text as the PDF spec makes no distinction on the ordering of the content stream. Currently only the second option works correctly in PDFium. In particular there's a bug involving the bidi classification of diacritic marks (I know of at least one bug where they are marked unconditionally as kLeftWeak which is incorrect, they should have the same bidi class as their base character). There are also whitespace heuristics that depend on ordering and are overly sensitive, which is demonstrated here. There may be more bugs involved than just those. Originally I manually created and checked these test cases at https://crbug.com/525093248#comment23. I prompted Gemini to turn this into a real test case. The font is NotoSansArabic-Regular Version 2.005. I tried to make this work with no font like the arabic.in test case but with this one FPDFText_GetText() was returning empty strings due to the way PDFium ignores glyphs with 0 width. Bug: 525093248 Change-Id: I6055bba925884e3892402ba9791b7f30cb0d3063 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162291 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Add docs/infra.md to explain how build infrastructure works. Move the existing blurb about the waterfall there, and link to infra.md in its place. TAG=agy CONV=d2d0e2c5-b99a-4cd3-858e-c27ac1ef31fc Change-Id: I2659e7684fd0f5b2f04016f084732eac6c587a2f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/160672 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
For `fxcrt::Zip(first, second)`, the code in the ZipView2 ctor is `CHECK_LE(first.size(), second.size());`. So the comments at the top of the file should match that. Change-Id: I6b129e9109b8b51980bae236aa732ab0c2f7c400 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162450 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Switch from iterating over span + raw pointer to using fxcrt::Zip(). Also finish initializing libjpeg before allocating memory. Change-Id: Ib57ac99d1752af34e45aa8e4a1e07e6481352361 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/161570 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Increase the tolerance on some pixel-diff options to account for minor differences in glyph rendering. Bug: 42271123 Change-Id: I550588c04c4404461122a1bd31b3d35b28514ba7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162510 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
…rolls) https://skia.googlesource.com/skia.git/+log/5b1a7f7c0644..0abfcf118530 Created with: roll-dep third_party/skia Change-Id: Ia10e6710ca811299cfb7abc2152658aa36459a30 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162531 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
https://chromium.googlesource.com/chromium/src/testing/scripts/rust.git/+log/9c16e2f4c17e..9022dfb9a7ba Created with: roll-dep testing/scripts/rust Change-Id: I410eba1bea5dcb9efe063862c0b1fb5f4dc66cb6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162511 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
https://chromium.googlesource.com/chromium/src/third_party/rust/+log/b8c38a533c84..79a8603b966b Then update GN paths to match the new Fontations crate versions. After that, update core/fxge/skrifa/src/main.rs to fix the build: - Import `OutlinePen` from `skrifa::outline`. - Update `Charset::glyph_id()` and `Charset::string_id()` callers now that they return `Option` instead of `Result`. Created with: roll-dep third_party/rust Change-Id: Ie4e360dfe3b10dfe04587e37a1474f63c4018c23 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162570 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
When invoking libyuv functions with a height of 1, the source and destination stride parameters only apply after processing the first row and have no effect on a single scanline. Replace the redundant pixel_count * N stride calculations in ReverseRGB() and CompositeRow_Bgr2Bgra_NoBlend_NoClip() with 0 to match existing single-row libyuv calls in CFX_DIBBase. Change-Id: Icc4daebd7105af8855b06dad46abb5fdfeaa4359 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162532 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
…mits) https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git/+log/dc6144ac93b2..2b864a17731e Created with: roll-dep base/allocator/partition_allocator Change-Id: Ifb5dd6360bae259f39f7ab913891c8e9d36335f9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162610 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Roll third_party/abseil-cpp/ a00d74bb5..56722f9eb (10 commits) https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git/+log/a00d74bb55b3..56722f9eb6f4 Created with: roll-dep third_party/abseil-cpp Roll buildtools/ 64e87f9fb..d0d4c192e (8 commits) https://chromium.googlesource.com/chromium/src/buildtools.git/+log/64e87f9fbdaf..d0d4c192e3c7 Created with: roll-dep buildtools Roll third_party/libc++/src/ 97b436da4..9ba7713d3 (88 commits) https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git/+log/97b436da4c33..9ba7713d3a0f Created with: roll-dep third_party/libc++/src Change-Id: I6e7e01b8905e7e94910a1bb0bf5bae760eef62dd Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162534 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Roll build/ ebdaeefa6..0c62137b8 (275 commits) https://chromium.googlesource.com/chromium/src/build.git/+log/ebdaeefa62db..0c62137b8623 Created with: roll-dep build Roll tools/clang/ 52b22f34f..7ea1bdeea (24 commits) https://chromium.googlesource.com/chromium/src/tools/clang/+log/52b22f34fa14..7ea1bdeeaf49 Roll clang+rust llvmorg-24-init-7747-g62397f8b-67:llvmorg-24-init-14453-ge063be79-1 Created with: roll-dep tools/clang Roll tools/rust/ e61a63fae..b7b03f53f (11 commits) https://chromium.googlesource.com/chromium/src/tools/rust/+log/e61a63fae238..b7b03f53fe7d Created with: roll-dep tools/rust Change-Id: I99c8c46507f668573770411e152a3d913e053482 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162630 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Consistently write sizeof(BITMAPINFOHEADER) everywhere. Change-Id: Icaef8d1e81103a6f1c503271d0514d66f28d8766 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162650 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Andy Phan <andyphan@chromium.org>
- crowbar.txtpb: add latest {} on the upstream release tags. Little CMS
tags releases as lcms2.19.1, lcms2.19, ..., which semver {} cannot
parse (it finds only the old bare tags 2.11 and 2.12, a rollback). A
generic policy matches lcms<major>.<minor>[.<patch>] and skips the rc
tags (lcms2.20rc1).
- Roll from lcms2.19 (b76633e60c83) to lcms2.19.1 (21c582a594fe), 8
upstream commits. All patches still apply unchanged. The sed drops the
14-day bake-in that resolve sets: it is meant for CI rolls, and this
CL rolls now.
$ crowbar resolve --no-dry-run ./third_party/lcms
$ sed -i '/not_valid_until/d' third_party/lcms/crowbar.txtpb
$ crowbar promote --no-dry-run ./third_party/lcms
$ crowbar build --no-dry-run ./third_party/lcms
- src/ changes in 2 files: cmsIT8SetDataFormat() rejects a negative
field index, and MemoryWrite() truncates the output instead of failing
when the memory block is too small. Neither is on PDFium's path:
PDFium only opens profiles from memory, creates the sRGB profile and
runs transforms; it never parses CGATS or writes a profile into
memory:
$ git grep -ohE '\bcms[A-Z]\w*\(' -- ':!third_party' | sort -u
cmsChannelsOf(
cmsCloseProfile(
cmsCreate_sRGBProfile(
cmsCreateTransform(
cmsDeleteTransform(
cmsDoTransform(
cmsGetColorSpace(
cmsOpenProfileFromMem(
- README.pdfium: Version and Revision as written by crowbar promote.
Fixed: 538008161
Change-Id: I089ba63155514e63cf18146cab5284a06266b94f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Standalone PDFium already builds with PartitionAlloc and BackupRefPtr enabled by default on Clang builds, but skia/BUILD.gn did not pass SK_USE_PARTITION_ALLOC or SK_USE_PARTITION_ALLOC_AS_MALLOC, causing Skia to fall back to its no-op raw_ptr implementation. Mirror Chromium's skia/BUILD.gn by defining SK_USE_PARTITION_ALLOC (and SK_USE_PARTITION_ALLOC_AS_MALLOC when PartitionAlloc-Everywhere is active) and adding ../third_party:pdfium_pa to Skia targets when pdf_use_partition_alloc is enabled. Bug: 351867706 Change-Id: Ib565611ebd7c0346c72a7f178bcb5bf8b7a60b65 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162670 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Holding a cppgc::Persistent on the stack is generally an anti-pattern, as it incurs global registration overhead in cppgc::PersistentRegion. However, it is required to root local collections across re-entrant JavaScript execution because conservative stack scanning cannot be safely enabled due to off-stack off-cppgc-heap "malloc'd" backing stores. To minimize the cost of Persistent registrations, introduce indirection through garbage-collected containers (GCedVector, GCedSet, GCedList, GCedMap) in fxjs/gc/containers.h. This allows holding a single cppgc::Persistent on the stack while storing all contained elements in standard STL containers traced via ContainerTrace(). Expose public storage to avoid pass-through boilerplate while retaining full STL container semantics. Use GCedMap and GCedVector in CXFA_Document::DoProtoMerge() to protect queued and target CXFA_Node instances from being collected during synchronous SOM resolution. Fixed: 574304407 Change-Id: Ib523e7a46e11fa0dda02bcd0906dfa3c44a906f8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162030 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Vectorize row operations in CFX_ScanlineCompositor - two with portable
Highway kernels, and one with libyuv.
* CompositeRowBgra2Bgra (Porter-Duff "over", packed BGRA, normal,
no clip) -> Highway kernel RunBgra2Bgra, with runtime target
dispatch (SSE4/AVX2/AVX-512/NEON) via HWY_DYNAMIC_DISPATCH.
* CompositeRow_Bgr2Bgra_NoBlend_NoClip (src_Bpp==4, opaque BGRA copy,
alpha forced 0xFF) -> Highway kernel RunBgra2BgrxForceOpaque.
* CompositeRow_Rgb2Rgb_NoBlend_NoClip (opaque BGR24 -> BGRx expand,
src_Bpp==3) -> libyuv::RGB24ToARGB when PDF_USE_LIBYUV, scalar
otherwise.
Correctness: the two Highway kernels reproduce their scalar reference
byte-for-byte. New unit tests in cfx_scanlinecompositor_unittest.cpp
compare SIMD vs scalar across widths spanning all vector/tail boundaries
(1..9,15..17,31..33,63..65,100,257). A third test drives the libyuv
BGR24->BGRx expand through the public CompositeRgbBitmapLine path,
asserting RGB is copied verbatim and the kBgrx padding byte is 0xFF
under PDF_USE_LIBYUV (left untouched by the scalar fallback).
Bug: 573945429
Change-Id: I50dd8c96e9628eeca68c6f8d5c9edf09d7496785
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/161910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Do not hard-code constants which may not be supportable. Add a new test to bounce between the two font backends when both are linked into the binary. Return the actual FPDF_ public constants as well to avoid converting back to these from bool. Change-Id: I1c4c7415c257bc3e8164b1ba323e0c3f73077bfe Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162591 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
This is a remnant from a time when chrome needed to control which font manger was created at build time. PDFium public api V5 provides this control at runtime via a library init argument instead. Pre-requisite for https://crrev.com/c/8694745 Change-Id: I77db02a2d8e976b6415a38337b92a5303bfc3e6b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Introduce CFXJSE_Engine::ScriptNodeArrayScope to manage the lifetime and restoration of script_node_array_ using AutoRestorer. This replaces the manual pair of SetNodesOfRunScript(&refNodes) and SetNodesOfRunScript(nullptr). Fix two issues: Restoring to nullptr in all cases was likely a bug for nested calculate scripts. Failure to set to nullptr upon entry in the non-calculate cases was likely a bug allowing the nested script to pollute the caller's ref-nodes. Using an RAII scope ensures that nested script invocations restore the outer script's node array upon completion and prevents leaving dangling pointers if an early return occurs. Change-Id: Ia405f3f6a0457e2b30850ddc9efe3bbd15a4b478 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/162130 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Release-gate sync: 39 upstream commits, 2b2d56c to 5f092b5 (upstream's tip, more than a day old). Report: docs/embedpdf/syncs/2026-11-01-5f092b529.md. - Toolchain and Skia rolls (build, clang, rust, libc++, abseil, PartitionAlloc, Skia, libyuv); all our patches still apply. - Upstream's remaining embedder tests compare display lists: drop the 21 goldens we had changed; our ink and free text dumps are ours (own appearance generator); our page-rotation test uses the display list. - wasm32 builds without libyuv: emsdk 3.1.72's clang crashes on libyuv's new WASM SIMD rows. - Brotli is compiled in by default upstream; our release builds leave it out (nothing enables it; 168 KB smaller on darwin-arm64). Where it is built, its switch is EPDF_TLS, as start-up runs on every thread. - Upstream's new xref test expects our complete xref; its Arabic /ActualText test records what the fork extracts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release-gate sync: 39 upstream commits, 2b2d56c to 5f092b5 (upstream's tip). Report:
docs/embedpdf/syncs/2026-11-01-5f092b529.md.EPDF_TLS./ActualTexttest records what the fork extracts (upstream gets variant 2 right, the fork doesn't; open question in the report).Local checks (darwin-arm64): unit tests; embedder tests (12 Mac golden failures, all from S14's list); layer mode; tag, C API, globals and exports checks; every target's patches; wasm32 build. Merge with a merge commit, not squash.