commit | 60632915221e80dfb81991b9714bd12b77a2d068 | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Sat Feb 15 01:07:54 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Sat Feb 15 01:07:54 2025 |
tree | 93f1c2120bbe2a5ee7929626d46f232501c1719a | |
parent | 46ba987cc7ed6706339cc32355fe828f76706546 [diff] |
[PDF Ink Signatures] Clean up page unload preventers Currently, entries in `PDFiumEngine::stroked_pages_unload_preventers_` never get removed. This is because `ink_stroke_objects_map_` entries originally never got discarded, as stated in the pdfium_engine.h comments. With https://crrev.com/1382585, this assumption is no longer true. Fix this discrepancy by: 1) Change `ink_stroke_objects_map_` to store the page index in addition to the page objects in the map's key. As a result, the key is now a new struct InkStrokeData, and `ink_stroke_objects_map_` gets renamed to `ink_stroke_data_`. Update the comments to reflect these changes. 2) Change PDFiumEngine::DiscardStroke() to check if a given page still has strokes after discards. If not, remove the associated page unload preventer. The change in (1) will be needed in the near future to fix https://crbug.com/395766076 as well. Since undo discards and thumbnail redrawing are relatively infrequent operations, there is no need to make `ink_stroke_data_` a map of maps. Bug: 378427083, 395766076 Change-Id: I05dad30b3413eeb7569d90b23aca9bc0218460dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6270681 Reviewed-by: Alan Screen <awscreen@chromium.org> Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1420813}
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.