Remove character width check from cpdf_textpage.cpp [pdfium : main]

0 views
Skip to first unread message

Aryan Krishnan (Gerrit)

unread,
Feb 4, 2026, 11:07:13 AMFeb 4
to Lei Zhang, Tom Sepez, pdfium-...@googlegroups.com
Attention needed from Lei Zhang and Tom Sepez

Aryan Krishnan added 4 comments

Commit Message
Line 9, Patchset 3:This CL removes the character width check to fix bugs in tests such as FPDFTextEmbedderTest.Bug921, FPDFTextEmbedderTest.WhitespaceCharCount and FPDFTextEmbedderTest.Bug444176962. All of these tests had similar issues of very thin characters not being loaded correctly due to a check that filters them out. This CL works to update the expectations to their correct values after removing the check to demonstrate how the removal of the check addresses the issues with some characters being accidentally removed.
Lei Zhang . resolved

wrap

Aryan Krishnan

Done

File core/fpdftext/cpdf_textpage.cpp
Line 857, Patchset 3: if (str.GetLength() >= 2 && str[str.GetLength() - 1] == ' ' &&
Lei Zhang . resolved

I think this can be simplified to `if (bPrevSpace && str.GetLength() > 1) {`

Lei Zhang

Or wrap the entire for-loop above inside a `str.GetLength() > 1` check. No need to do any of this if `str` is 0 or 1 char long.

Aryan Krishnan

Did both, considering the loop can also delete characters, It would still require the check for string length being > 1 for the if statement.

Line 857, Patchset 3: if (str.GetLength() >= 2 && str[str.GetLength() - 1] == ' ' &&
Lei Zhang . resolved

The CL description doesn't mention what's going on here.

Aryan Krishnan

Done

Line 859, Patchset 3: temp_text_buf_.Delete(str.GetLength() - 1, 1);
Lei Zhang . resolved

Calculate this index once and save it to a local variable.

Aryan Krishnan

Done.

Open in Gerrit

Related details

Attention is currently required from:
  • Lei Zhang
  • Tom Sepez
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: pdfium
Gerrit-Branch: main
Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
Gerrit-Change-Number: 142110
Gerrit-PatchSet: 4
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Lei Zhang <the...@chromium.org>
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Comment-Date: Wed, 04 Feb 2026 16:07:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Lei Zhang <the...@chromium.org>
unsatisfied_requirement
open
diffy

Lei Zhang (Gerrit)

unread,
Feb 4, 2026, 12:35:00 PMFeb 4
to Aryan Krishnan, Lei Zhang, Tom Sepez, pdfium-...@googlegroups.com
Attention needed from Aryan Krishnan and Tom Sepez

Lei Zhang voted and added 2 comments

Votes added by Lei Zhang

Code-Review+1

2 comments

File core/fpdftext/cpdf_textpage.cpp
Line 843, Patchset 4 (Latest): bool bPrevSpace = false;
Lei Zhang . unresolved

Move this one line down to reduce its scope.

Line 860, Patchset 4 (Latest): if (bPrevSpace && str.GetLength() > 1 && str[last_idx] == ' ') {
Lei Zhang . unresolved

Can check `last_idx` instead.

Open in Gerrit

Related details

Attention is currently required from:
  • Aryan Krishnan
  • Tom Sepez
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: pdfium
Gerrit-Branch: main
Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
Gerrit-Change-Number: 142110
Gerrit-PatchSet: 4
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Comment-Date: Wed, 04 Feb 2026 17:34:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Aryan Krishnan (Gerrit)

unread,
Feb 4, 2026, 12:36:56 PMFeb 4
to Lei Zhang, Tom Sepez, pdfium-...@googlegroups.com
Attention needed from Lei Zhang and Tom Sepez

Aryan Krishnan added 2 comments

File core/fpdftext/cpdf_textpage.cpp
Line 843, Patchset 4: bool bPrevSpace = false;
Lei Zhang . resolved

Move this one line down to reduce its scope.

Aryan Krishnan

Done

Line 860, Patchset 4: if (bPrevSpace && str.GetLength() > 1 && str[last_idx] == ' ') {
Lei Zhang . resolved

Can check `last_idx` instead.

Aryan Krishnan

Yeah was considering that, just thought it would be less readable than the GetLength() call. Will edit.

Done.

Open in Gerrit

Related details

Attention is currently required from:
  • Lei Zhang
  • Tom Sepez
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: pdfium
Gerrit-Branch: main
Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
Gerrit-Change-Number: 142110
Gerrit-PatchSet: 5
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Lei Zhang <the...@chromium.org>
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Comment-Date: Wed, 04 Feb 2026 17:36:52 +0000
unsatisfied_requirement
open
diffy

Lei Zhang (Gerrit)

unread,
Feb 4, 2026, 12:39:49 PMFeb 4
to Aryan Krishnan, Lei Zhang, Tom Sepez, pdfium-...@googlegroups.com
Attention needed from Aryan Krishnan and Tom Sepez

Lei Zhang voted

Code-Review+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Aryan Krishnan
  • Tom Sepez
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: pdfium
Gerrit-Branch: main
Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
Gerrit-Change-Number: 142110
Gerrit-PatchSet: 5
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Comment-Date: Wed, 04 Feb 2026 17:39:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Tom Sepez (Gerrit)

unread,
Feb 4, 2026, 2:54:07 PMFeb 4
to Aryan Krishnan, Pdfium LUCI CQ, Lei Zhang, pdfium-...@googlegroups.com
Attention needed from Aryan Krishnan

Tom Sepez voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Aryan Krishnan
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 5
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Attention: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Comment-Date: Wed, 04 Feb 2026 19:54:04 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Lei Zhang (Gerrit)

    unread,
    Feb 4, 2026, 2:59:04 PMFeb 4
    to Aryan Krishnan, Tom Sepez, Pdfium LUCI CQ, Lei Zhang, pdfium-...@googlegroups.com
    Attention needed from Aryan Krishnan

    Lei Zhang voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aryan Krishnan
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 5
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Attention: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Comment-Date: Wed, 04 Feb 2026 19:59:01 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Pdfium LUCI CQ (Gerrit)

    unread,
    Feb 4, 2026, 2:59:57 PMFeb 4
    to Aryan Krishnan, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Pdfium LUCI CQ submitted the change

    Change information

    Commit message:
    Remove character width check from cpdf_textpage.cpp


    This CL removes the character width check to fix bugs in tests such as
    FPDFTextEmbedderTest.Bug921, FPDFTextEmbedderTest.WhitespaceCharCount
    and FPDFTextEmbedderTest.Bug444176962. All of these tests had similar
    issues of very thin characters not being loaded correctly due to a
    check that filters them out. This CL works to update the expectations
    to their correct values after removing the check to demonstrate how the
    removal of the check addresses the issues with some characters being
    accidentally removed.

    This CL also adds a section to CPDF_TextPage::CloseTempLine() to avoid
    additional whitespace characters incorrectly being counted.
    Bug: 444176962, 40643656
    Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Reviewed-by: Tom Sepez <tse...@chromium.org>
    Commit-Queue: Lei Zhang <the...@chromium.org>
    Reviewed-by: Lei Zhang <the...@chromium.org>
    Files:
    • M core/fpdftext/cpdf_textpage.cpp
    • M fpdfsdk/fpdf_text_embeddertest.cpp
    Change size: M
    Delta: 2 files changed, 30 insertions(+), 36 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Tom Sepez, +1 by Lei Zhang
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    open
    diffy
    satisfied_requirement

    Aryan Krishnan (Gerrit)

    unread,
    Feb 4, 2026, 10:32:05 PMFeb 4
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan added 1 comment

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Aryan Krishnan . resolved

    @the...@chromium.org This crashed the auto-roller it is either 1 of 2 things in my opinion.

    1. Test expectations for chromium/pdf need to still be updated
    2. There is something wrong with this patch.

    I am going to prepare for both approaches by updating the patch to use new testing expectations and also prepare a revert of this if something truly is broken.

    Am making a CL for revert, let's merge it if it is case 2.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Thu, 05 Feb 2026 03:32:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 4, 2026, 10:32:55 PMFeb 4
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan has created a revert of this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: revert
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 4, 2026, 10:44:38 PMFeb 4
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan added 1 comment

    Patchset-level comments
    Aryan Krishnan . unresolved

    @the...@chromium.org This crashed the auto-roller it is either 1 of 2 things in my opinion.

    1. Test expectations for chromium/pdf need to still be updated
    2. There is something wrong with this patch.

    I am going to prepare for both approaches by updating the patch to use new testing expectations and also prepare a revert of this if something truly is broken.

    Am making a CL for revert, let's merge it if it is case 2.

    Aryan Krishnan

    Unresolving.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Thu, 05 Feb 2026 03:44:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aryan Krishnan <aryankr...@gmail.com>
    satisfied_requirement
    open
    diffy

    Lei Zhang (Gerrit)

    unread,
    Feb 4, 2026, 11:38:37 PMFeb 4
    to Pdfium LUCI CQ, Aryan Krishnan, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com
    Attention needed from Aryan Krishnan

    Lei Zhang added 1 comment

    Patchset-level comments
    Aryan Krishnan . unresolved

    @the...@chromium.org This crashed the auto-roller it is either 1 of 2 things in my opinion.

    1. Test expectations for chromium/pdf need to still be updated
    2. There is something wrong with this patch.

    I am going to prepare for both approaches by updating the patch to use new testing expectations and also prepare a revert of this if something truly is broken.

    Am making a CL for revert, let's merge it if it is case 2.

    Aryan Krishnan

    Unresolving.

    Lei Zhang

    Have you looked at the failing test in Chromium to see if it's a regression or an improvement?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aryan Krishnan
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Attention: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Comment-Date: Thu, 05 Feb 2026 04:38:34 +0000
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 5, 2026, 12:48:07 AMFeb 5
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan added 1 comment

    Patchset-level comments
    Aryan Krishnan . unresolved

    @the...@chromium.org This crashed the auto-roller it is either 1 of 2 things in my opinion.

    1. Test expectations for chromium/pdf need to still be updated
    2. There is something wrong with this patch.

    I am going to prepare for both approaches by updating the patch to use new testing expectations and also prepare a revert of this if something truly is broken.

    Am making a CL for revert, let's merge it if it is case 2.

    Aryan Krishnan

    Unresolving.

    Lei Zhang

    Have you looked at the failing test in Chromium to see if it's a regression or an improvement?

    Aryan Krishnan

    It should be an improvement, preparing the other in case I am wrong.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Thu, 05 Feb 2026 05:48:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Lei Zhang <the...@chromium.org>
    Comment-In-Reply-To: Aryan Krishnan <aryankr...@gmail.com>
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 5, 2026, 10:42:12 PMFeb 5
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan added 1 comment

    Patchset-level comments
    Aryan Krishnan . resolved

    @the...@chromium.org This crashed the auto-roller it is either 1 of 2 things in my opinion.

    1. Test expectations for chromium/pdf need to still be updated
    2. There is something wrong with this patch.

    I am going to prepare for both approaches by updating the patch to use new testing expectations and also prepare a revert of this if something truly is broken.

    Am making a CL for revert, let's merge it if it is case 2.

    Aryan Krishnan

    Unresolving.

    Lei Zhang

    Have you looked at the failing test in Chromium to see if it's a regression or an improvement?

    Aryan Krishnan

    It should be an improvement, preparing the other in case I am wrong.

    Aryan Krishnan

    Resolving: It is clear that it is an improvement.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 03:42:07 +0000
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 19, 2026, 9:58:11 PM (3 days ago) Feb 19
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan has created a revert of this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: revert
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 19, 2026, 9:58:42 PM (3 days ago) Feb 19
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan added 1 comment

    File core/fpdftext/cpdf_textpage.cpp
    Line 843, Patchset 6 (Latest): if (str.GetLength() > 1) {
    Aryan Krishnan . unresolved

    For the regression, perhaps this is the culprit.
    This should run despite the length of the string passed in.
    If a line with just " " is passed in, in the context of this regression it should return nothing.

    However, that breaks whitespace.pdf. We currently have 2, sort of conflicting cases.

    Something like "if there is a next line after this in the stream", then run for str.GetLength() > 1 as well.

    So we could do option a. which is pushing this fix.
    or option b. push a revert to fix this ASAP and then fix this later on.

    I'd say option b, where we push a revert and then look into this later.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Feb 2026 02:58:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy

    Lei Zhang (Gerrit)

    unread,
    Feb 19, 2026, 10:09:39 PM (3 days ago) Feb 19
    to Pdfium LUCI CQ, Aryan Krishnan, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Lei Zhang added 1 comment

    File core/fpdftext/cpdf_textpage.cpp
    Line 843, Patchset 6 (Latest): if (str.GetLength() > 1) {
    Aryan Krishnan . resolved

    For the regression, perhaps this is the culprit.
    This should run despite the length of the string passed in.
    If a line with just " " is passed in, in the context of this regression it should return nothing.

    However, that breaks whitespace.pdf. We currently have 2, sort of conflicting cases.

    Something like "if there is a next line after this in the stream", then run for str.GetLength() > 1 as well.

    So we could do option a. which is pushing this fix.
    or option b. push a revert to fix this ASAP and then fix this later on.

    I'd say option b, where we push a revert and then look into this later.

    Lei Zhang

    I'm fine with reverting.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Feb 2026 03:09:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aryan Krishnan <aryankr...@gmail.com>
    satisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Feb 20, 2026, 8:17:16 AM (2 days ago) Feb 20
    to Pdfium LUCI CQ, Tom Sepez, Lei Zhang, pdfium-...@googlegroups.com

    Aryan Krishnan added 1 comment

    File core/fpdftext/cpdf_textpage.cpp
    Line 843, Patchset 6 (Latest): if (str.GetLength() > 1) {
    Aryan Krishnan . resolved

    For the regression, perhaps this is the culprit.
    This should run despite the length of the string passed in.
    If a line with just " " is passed in, in the context of this regression it should return nothing.

    However, that breaks whitespace.pdf. We currently have 2, sort of conflicting cases.

    Something like "if there is a next line after this in the stream", then run for str.GetLength() > 1 as well.

    So we could do option a. which is pushing this fix.
    or option b. push a revert to fix this ASAP and then fix this later on.

    I'd say option b, where we push a revert and then look into this later.

    Lei Zhang

    I'm fine with reverting.

    Aryan Krishnan

    Update, got a fix-ish thing working. It is not exactly ideal, but keeps most of the test cases working: notable exception being whitespace.pdf. I'd say we still explore it post-revert but still will upload it for reference.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Icd397fab257a4f2b607ee4722ced15ef0c5c5519
    Gerrit-Change-Number: 142110
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Feb 2026 13:17:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages