0
Go to file
Hui Yingst ba50f4eae6 [PDF viewer] Always show "copy" in the context menu for selected text.
Currently, if some texts are selected and the PDF has restriction on
copy action, the context menu won't display "copy" option for users
due to the restriction. This might lead to users thinking PDF viewer
is broken.

To improve user experience, we want to always show copy option in the
the context menu when texts are selected regardless of the copy
restriction. And "copy" will be greyed out if copy restriction exists
for that specific PDF to prevent copy action.

This CL adds a new method HasCopyRestriction() in `WebPlugin` so that
plugins can have copy permissions and selected text as two
independent pieces of information. Then use the copy restriction to
determine whether the "copy" option should be enabled inside the
context menu.

This CL also adds hello_world2_with_copy_restriction.pdf for testing
PDFiumEngine::SelectText(). The test file was created by pdftk with an
owner password "foo" and their copy permissions are exempted.

Bug: 1195543
Change-Id: Ica26e60d53829a1d566661c87e96a5a7d81456b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3710793
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Nigi <nigi@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1018381}
2022-06-27 20:11:51 +00:00
2022-06-21 17:35:53 +00:00
2022-06-25 18:04:49 +00:00
2022-06-22 20:46:25 +00:00

Logo Chromium

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.

Description
Chromium是一个开源浏览器项目,提供了一种安全、快速、稳定的方法来体验Web。该浏览器可以在多个平台上下载,包括Mac、Windows、Linux和ChromiumOS。项目原始地址: https://chromium.googlesource.com/chromium/src.git
https://www.mobibrw.com/gitea-mirrors/chromium/src.git
Readme BSD-3-Clause 89 GiB
Languages
C++ 74.4%
Java 8.2%
Objective-C++ 4.6%
TypeScript 4%
Python 2.5%
Other 6.1%