Ensure that the focus ring in the bookmarks bar does not paint outside the parent view

Desktop / Chromium - ananta [chromium.org] - 19 April 2017 16:00 EDT

The proposed fix is to notify the parent views when a child enables layering. The parent in this case the ScrollView overrides the newly added notification OnChildLayerChanged() and enables
viewport layering. This ensures that the ring gets clipped.

Longer term it seems like the focus ring should really be a property of the view and should not be instantiated by different controls all over the place.

That for a later patchset.

BUG=665412, 656198 TEST=Covered by test ViewObserverTest.ScrollViewChildAddLayerTest and ViewObserverTest.ChildViewLayerNotificationTest

Review-Url: https://codereview.chromium.org/2813353002 Cr-Commit-Position: refs/heads/master@{#465720}

5c05d71 Ensure that the focus ring in the bookmarks bar does not paint outside the parent view.
ui/views/controls/scroll_view.cc | 52 +++++++++++++++++++++++----
ui/views/controls/scroll_view.h | 17 +++++++++
ui/views/view.cc | 78 +++++++++++++++++++++++++---------------
ui/views/view.h | 29 +++++++++++++--
ui/views/view_unittest.cc | 77 +++++++++++++++++++++++++++++++++++++++
5 files changed, 216 insertions(+), 37 deletions(-)

Upstream: git.chromium.org


  • Share