Don't copy hidden selections
Chrome sometimes hides selections*. CTRL+C should not copy such selections because users expect that CTRL+C has no effect when their browser doesn't display a selection. What about cut and paste? Cut and paste are read/write-operations so they only operate on _focused_ selections. A focused selection is always visible: bool FrameSelection::IsHidden() const { if (SelectionHasFocus()) return false; ... => Cut and paste already follow the principle of visibility so we only need to fix "copy". This CL does that. * See the explainer in crrev.com/525029 for more information. Bug: 813416 Change-Id: Ibb5f3868e7a5fc37c7522bb753a41ae9568d98e2 Reviewed-on: https://chromium-review.googlesource.com/924027 Commit-Queue: Hugo Holgersson <hugoh@vewd.com> Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#537633}
Showing
Please register or sign in to comment