commit | 8472c15f0822736b5190b84ce57f75e3acae295a | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Fri Feb 07 20:03:53 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 07 20:03:53 2025 |
tree | 74714c90e4a38a8a2e166b77a990a465f476d311 | |
parent | d9c9bbc4fecf90f3e45bf5bb016bad43dff67aad [diff] |
[PDF] Use AccessibilityTextRunInfo to calculate selection rectangles PDFiumPage::GetTextRunInfo() already has good heuristics to calculate the set of characters that form a text run. Use it in PDFiumRange::GetScreenRects() to create a rectangle for every text run. Then add more heuristics to merge the rectangles when they have sufficient overlap in the horizontal direction. As a result, the text selection, which is based on GetScreenRects() calculations, will appear more continuous and less jagged. Update test expectations to match the new code's behavior. Keep the original FPDFText_CountRects()-based implementation around, behind an emergency kill switch, in case the new code has serious problems. Bug: 40448046 Change-Id: I17b9dd744671c6721faaf9060622cff788371f1f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6237116 Reviewed-by: Andy Phan <andyphan@chromium.org> Reviewed-by: Alan Screen <awscreen@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1417508}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.