Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: ui/views/view.cc

Issue 2813353002: Ensure that the focus ring in the bookmarks bar does not paint outside the parent view. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/views/controls/focus_ring.cc ('K') | « ui/views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 83192d8c93df41d122c633fa68f89130182ba0cb..0a9546c96d679e0c5f7fb07f96073fe68e0ed512 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -540,6 +540,13 @@ void View::SetPaintToLayer(ui::LayerType layer_type) {
DestroyLayer();
CreateLayer(layer_type);
paint_to_layer_ = true;
+
+ // Notify the parent chain about the layer change.
+ View* view = this;
+ while (view && view->parent()) {
+ view->parent()->ChildLayerAdded();
+ view = view->parent();
+ }
}
void View::DestroyLayer() {
« ui/views/controls/focus_ring.cc ('K') | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698