Skip to content

Commit

Permalink
Remove failing DCHECK() in PDFiumPage::GetTextRunInfo()
Browse files Browse the repository at this point in the history
This DCHECK() makes an assumption about PDFium behavior that is not 100%
correct, so it occasionally fails. Just remove it as failing the
DCHECK() does not affect the rest of the method.

Bug: 1277301
Change-Id: Ic318af014112fde60166c63dd0708ebbe84f72f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4549669
Reviewed-by: K. Moon <kmoon@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146755}
  • Loading branch information
leizleiz authored and Chromium LUCI CQ committed May 19, 2023
1 parent b916433 commit 9bd7392
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pdf/pdfium/pdfium_page.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,6 @@ absl::optional<AccessibilityTextRunInfo> PDFiumPage::GetTextRunInfo(
? GetFloatCharRectInPixels(page, text_page, start_char_index)
: gfx::RectF();

// Pdfium trims more than 1 consecutive spaces to 1 space.
DCHECK_LE(actual_start_char_index - start_char_index, 1);

int char_index = actual_start_char_index;

// Set text run's style info from the first character of the text run.
Expand Down

0 comments on commit 9bd7392

Please sign in to comment.