commit | 5f2f4a5e9df2a2cefba7afb3192a84c9a4757bff | [log] [tgz] |
---|---|---|
author | Darwin Huang <huangdarwin@chromium.org> | Thu Jan 17 23:09:30 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jan 17 23:09:30 2019 |
tree | 8537329f70507c8661cb2f69a70211052d88fdd1 | |
parent | e983a720f904cb9f56844b059295f2261c96e557 [diff] |
System Clipboard: Move checks from system_clipboard over to ui/base clipboard - Validity checks for items being placed onto the clipboard should be made in a consistent location. - Most similar checks, depending only on the SkBitmap properties, already occur in ui/base clipboard. - Therefore, I propose to move these checks from system clipboard over to ui/base clipboard. Text checks are generally already consistent with this, only checking for more high level changes like the type of text, etc in system clipboard. - We can remove the check for SkBitmap::isNull(), because SkBitmap::drawsNothing() { return this->empty() || this->isNull(); }, effectively meaning the case was already covered - This does mean we may pass a empty/invalid SkBitmap through mojo, wasting the overhead of a mojo call whenever we try to SystemClipboard::WriteImage(empty SkBitmap). However, I think this should be okay, given that this should be a fairly lightweight and infrequent call. If not, I'd propose moving these checks up from ui/base to system_clipboard instead. Bug: 896479 Change-Id: I5129db6606bc85385aec9d56f34cf9eab0fac778 Reviewed-on: https://chromium-review.googlesource.com/c/1413970 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Darwin Huang <huangdarwin@chromium.org> Cr-Commit-Position: refs/heads/master@{#623892}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .