Replace macro-based modifiers with WSTRModifiers enum [pdfium : main]

0 views
Skip to first unread message

Aryan Krishnan (Gerrit)

unread,
Mar 25, 2026, 2:29:57 PMMar 25
to Pdfium LUCI CQ, Lei Zhang, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
Attention needed from Andy Phan, Lei Zhang and Tom Sepez

Aryan Krishnan added 1 comment

Commit Message
Line 7, Patchset 8:Replace macro-based modifiers with WSTRModifiers struct
Lei Zhang . resolved

As always, reminder to rewrite the CL description to match the actual code.

Aryan Krishnan

Yep forgot to replace here, mb. Done.

Open in Gerrit

Related details

Attention is currently required from:
  • Andy Phan
  • Lei Zhang
  • Tom Sepez
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
Gerrit-Change-Number: 145311
Gerrit-PatchSet: 9
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
Gerrit-Comment-Date: Wed, 25 Mar 2026 18:29:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Lei Zhang <the...@chromium.org>
unsatisfied_requirement
open
diffy

Aryan Krishnan (Gerrit)

unread,
Mar 25, 2026, 2:32:53 PMMar 25
to Pdfium LUCI CQ, Lei Zhang, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
Attention needed from Andy Phan, Lei Zhang and Tom Sepez

Aryan Krishnan added 1 comment

File core/fxcrt/widestring.cpp
Line 145, Patchset 8: bool wide = (view.Front() == 's');
Lei Zhang . resolved

Can skip this computation:

```
bool wide;
if (nModifier == WSTRModifier::kForceUnicode) {
wide = true;
} else if (nModifier == WSTRModifier::kForceAnsi) {
wide = false;
} else {
wide = (view.Front() == 's');
}
```
Aryan Krishnan

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Andy Phan
  • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
    Gerrit-Change-Number: 145311
    Gerrit-PatchSet: 10
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Wed, 25 Mar 2026 18:32:50 +0000
    unsatisfied_requirement
    open
    diffy

    Lei Zhang (Gerrit)

    unread,
    Mar 25, 2026, 4:03:52 PMMar 25
    to Aryan Krishnan, Lei Zhang, Pdfium LUCI CQ, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
    Attention needed from Andy Phan, Aryan Krishnan and Tom Sepez

    Lei Zhang voted and added 1 comment

    Votes added by Lei Zhang

    Code-Review+1

    1 comment

    File core/fxcrt/widestring.cpp
    Line 35, Patchset 10 (Latest):enum class WSTRModifier {
    Lei Zhang . unresolved

    Move this closer to where used.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Phan
    • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
    Gerrit-Change-Number: 145311
    Gerrit-PatchSet: 10
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Wed, 25 Mar 2026 20:03:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Mar 25, 2026, 4:13:11 PMMar 25
    to Lei Zhang, Pdfium LUCI CQ, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
    Attention needed from Andy Phan, Lei Zhang and Tom Sepez

    Aryan Krishnan voted and added 1 comment

    Votes added by Aryan Krishnan

    Commit-Queue+1

    1 comment

    File core/fxcrt/widestring.cpp
    Line 35, Patchset 10:enum class WSTRModifier {
    Lei Zhang . resolved

    Move this closer to where used.

    Aryan Krishnan

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Phan
    • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
    Gerrit-Change-Number: 145311
    Gerrit-PatchSet: 11
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Wed, 25 Mar 2026 20:13:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Lei Zhang <the...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Lei Zhang (Gerrit)

    unread,
    Mar 25, 2026, 4:14:29 PMMar 25
    to Aryan Krishnan, Lei Zhang, Pdfium LUCI CQ, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
    Attention needed from Andy Phan, Aryan Krishnan and Tom Sepez

    Lei Zhang voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Phan
    • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
    Gerrit-Change-Number: 145311
    Gerrit-PatchSet: 11
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Wed, 25 Mar 2026 20:14:26 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Mar 27, 2026, 4:40:48 AMMar 27
    to Lei Zhang, Pdfium LUCI CQ, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
    Attention needed from Andy Phan and Tom Sepez

    Aryan Krishnan added 1 comment

    Patchset-level comments
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Phan
    • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
    Gerrit-Change-Number: 145311
    Gerrit-PatchSet: 11
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: 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: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Fri, 27 Mar 2026 08:40:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    Mar 27, 2026, 3:05:01 PMMar 27
    to Aryan Krishnan, Lei Zhang, Pdfium LUCI CQ, Tom Sepez, pdfium-...@googlegroups.com
    Attention needed from Aryan Krishnan and Tom Sepez

    Andy Phan voted and added 2 comments

    Votes added by Andy Phan

    Code-Review+1

    2 comments

    File core/fxcrt/widestring.cpp
    Line 57, Patchset 11 (Latest): kForceNone,
    Andy Phan . unresolved

    Consider omitting "Force" here, so it's just `kNone`.

    Line 58, Patchset 11 (Latest): kForceAnsi,
    Andy Phan . unresolved

    Thoughts on also omitting "Force" for the other entries?

    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 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
      Gerrit-Change-Number: 145311
      Gerrit-PatchSet: 11
      Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
      Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: 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: Fri, 27 Mar 2026 19:04:58 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Aryan Krishnan (Gerrit)

      unread,
      Mar 27, 2026, 9:45:04 PMMar 27
      to Andy Phan, Lei Zhang, Pdfium LUCI CQ, Tom Sepez, pdfium-...@googlegroups.com
      Attention needed from Andy Phan, Lei Zhang and Tom Sepez

      Aryan Krishnan added 2 comments

      File core/fxcrt/widestring.cpp
      Line 57, Patchset 11: kForceNone,
      Andy Phan . resolved

      Consider omitting "Force" here, so it's just `kNone`.

      Aryan Krishnan

      Done.

      Andy Phan . unresolved

      Thoughts on also omitting "Force" for the other entries?

      Aryan Krishnan

      I'd say for these lets keep it, the old #defines were named as `FORCE_SOMETHING`, so I think we should include the force to try keep the name consistent @the...@chromium.org?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andy Phan
      • Lei Zhang
      • Tom Sepez
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
      Gerrit-Change-Number: 145311
      Gerrit-PatchSet: 12
      Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
      Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
      Gerrit-Comment-Date: Sat, 28 Mar 2026 01:44:58 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Lei Zhang (Gerrit)

      unread,
      Apr 9, 2026, 4:22:07 PM (2 days ago) Apr 9
      to Aryan Krishnan, Andy Phan, Lei Zhang, Pdfium LUCI CQ, Tom Sepez, pdfium-...@googlegroups.com
      Attention needed from Andy Phan, Aryan Krishnan and Tom Sepez

      Lei Zhang added 2 comments

      File core/fxcrt/widestring.cpp
      Andy Phan . resolved

      Thoughts on also omitting "Force" for the other entries?

      Aryan Krishnan

      I'd say for these lets keep it, the old #defines were named as `FORCE_SOMETHING`, so I think we should include the force to try keep the name consistent @the...@chromium.org?

      Lei Zhang

      I'm fine with keeping it as-is.

      Line 115, Patchset 12 (Latest): WSTRModifier nModifier = WSTRModifier::kForceNone;
      Lei Zhang . unresolved

      Need to update this so the latest patchset compiles.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andy Phan
      • Aryan Krishnan
      • Tom Sepez
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
      Gerrit-Change-Number: 145311
      Gerrit-PatchSet: 12
      Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
      Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
      Gerrit-Comment-Date: Thu, 09 Apr 2026 20:22:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Aryan Krishnan <aryankr...@gmail.com>
      Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Aryan Krishnan (Gerrit)

      unread,
      Apr 9, 2026, 10:11:25 PM (2 days ago) Apr 9
      to Andy Phan, Lei Zhang, Pdfium LUCI CQ, Tom Sepez, pdfium-...@googlegroups.com
      Attention needed from Andy Phan, Lei Zhang and Tom Sepez

      Aryan Krishnan voted and added 1 comment

      Votes added by Aryan Krishnan

      Commit-Queue+1

      1 comment

      File core/fxcrt/widestring.cpp
      Line 115, Patchset 12: WSTRModifier nModifier = WSTRModifier::kForceNone;
      Lei Zhang . resolved

      Need to update this so the latest patchset compiles.

      Aryan Krishnan

      Oops, done.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andy Phan
      • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
        Gerrit-Change-Number: 145311
        Gerrit-PatchSet: 13
        Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
        Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
        Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
        Gerrit-Comment-Date: Fri, 10 Apr 2026 02:11:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Lei Zhang <the...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Lei Zhang (Gerrit)

        unread,
        Apr 9, 2026, 10:55:44 PM (2 days ago) Apr 9
        to Aryan Krishnan, Lei Zhang, Andy Phan, Pdfium LUCI CQ, Tom Sepez, pdfium-...@googlegroups.com
        Attention needed from Andy Phan, Aryan Krishnan and Tom Sepez

        Lei Zhang voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Andy Phan
        • 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: I7e11eeea797590fca3c59260bf5c98f10567ff8d
        Gerrit-Change-Number: 145311
        Gerrit-PatchSet: 13
        Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
        Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
        Gerrit-Reviewer: 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-Attention: Andy Phan <andy...@chromium.org>
        Gerrit-Comment-Date: Fri, 10 Apr 2026 02:55:41 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages