Introduce helper functions to verify rectangle coordinates [pdfium : main]

0 views
Skip to first unread message

Aryan Krishnan (Gerrit)

unread,
Apr 10, 2026, 1:00:06 AM (yesterday) Apr 10
to Pdfium LUCI CQ, pdfium-...@googlegroups.com

Aryan Krishnan voted and added 2 comments

Votes added by Aryan Krishnan

Commit-Queue+1

2 comments

File fpdfsdk/fpdf_text_embeddertest.cpp
Line 327, Patchset 4 (Latest): FPDFText_GetCharBox(textpage.get(), 2, &left, &right, &top, &bottom));
Aryan Krishnan . unresolved

Order is messed up here...

Line 2145, Patchset 4 (Latest): VerifySidesExact(
{63.439998626708984, 65.360000610351562, 50, 61.520000457763672},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 1, &left, &right, &top, &bottom));
VerifySidesExact({62.007999420166016, 62.007999420166016, 50.0, 50.0},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 2, &left, &right, &top, &bottom));
VerifySidesExact({86.0, 88.400001525878906, 50.240001678466797, 50.0},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 3, &left, &right, &top, &bottom));
VerifySidesExact({86.010002136230469, 86.010002136230469, 50.0, 50.0},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 4, &left, &right, &top, &bottom));
VerifySidesExact(
{99.44000244140625, 101.36000061035156, 61.520000457763672, 50.0},
{left, right, bottom, top});
Aryan Krishnan . unresolved

And all of these

Open in Gerrit

Related details

Attention set is empty
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: I552c0667efdd1175fcc8ae2dbbb4fc3ed9ed316a
Gerrit-Change-Number: 145950
Gerrit-PatchSet: 4
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Comment-Date: Fri, 10 Apr 2026 05:00:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Aryan Krishnan (Gerrit)

unread,
Apr 10, 2026, 1:17:22 AM (yesterday) Apr 10
to Lei Zhang, Tom Sepez, Pdfium LUCI CQ, pdfium-...@googlegroups.com
Attention needed from Lei Zhang and Tom Sepez

Aryan Krishnan added 3 comments

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

Hey guys - more helper functions here as well, I think since this method is already common across 2 (presumably more) files might be worth adding rect and side comparison helpers to testing/embedder_test.cpp perhaps.

File fpdfsdk/fpdf_text_embeddertest.cpp
Line 327, Patchset 4: FPDFText_GetCharBox(textpage.get(), 2, &left, &right, &top, &bottom));
Aryan Krishnan . resolved

Order is messed up here...

Aryan Krishnan

Done

Line 2145, Patchset 4: VerifySidesExact(

{63.439998626708984, 65.360000610351562, 50, 61.520000457763672},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 1, &left, &right, &top, &bottom));
VerifySidesExact({62.007999420166016, 62.007999420166016, 50.0, 50.0},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 2, &left, &right, &top, &bottom));
VerifySidesExact({86.0, 88.400001525878906, 50.240001678466797, 50.0},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 3, &left, &right, &top, &bottom));
VerifySidesExact({86.010002136230469, 86.010002136230469, 50.0, 50.0},
{left, right, bottom, top});
ASSERT_TRUE(
FPDFText_GetCharBox(text_page.get(), 4, &left, &right, &top, &bottom));
VerifySidesExact(
{99.44000244140625, 101.36000061035156, 61.520000457763672, 50.0},
{left, right, bottom, top});
Aryan Krishnan . resolved

And all of these

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: I552c0667efdd1175fcc8ae2dbbb4fc3ed9ed316a
    Gerrit-Change-Number: 145950
    Gerrit-PatchSet: 6
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    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-Comment-Date: Fri, 10 Apr 2026 05:17:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aryan Krishnan <aryankr...@gmail.com>
    unsatisfied_requirement
    open
    diffy

    Aryan Krishnan (Gerrit)

    unread,
    Apr 10, 2026, 1:18:15 AM (yesterday) Apr 10
    to Lei Zhang, Tom Sepez, Pdfium LUCI CQ, pdfium-...@googlegroups.com
    Attention needed from Lei Zhang and Tom Sepez

    Aryan Krishnan added 1 comment

    File fpdfsdk/fpdf_text_embeddertest.cpp
    Line 79, Patchset 6 (Latest):struct Sides {
    Aryan Krishnan . unresolved

    Had writers block while naming this - any suggestions?

    Also thoughts on template initialisation with the next struct?

    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 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: I552c0667efdd1175fcc8ae2dbbb4fc3ed9ed316a
      Gerrit-Change-Number: 145950
      Gerrit-PatchSet: 6
      Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
      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-Comment-Date: Fri, 10 Apr 2026 05:18:11 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages