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

Unified Diff: ui/views/controls/tree/tree_view.cc

Issue 2813103002: Fix an issue with the bookmarks bar in Harmony where in the focus ring would paint outside the scro… (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/tree/tree_view.cc
diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
index 2bfbd21089c14a2869b6131ccf4cbc1ff121e31a..eca39a8efa299af7fab1e092b78a77da06e23eeb 100644
--- a/ui/views/controls/tree/tree_view.cc
+++ b/ui/views/controls/tree/tree_view.cc
@@ -729,6 +729,10 @@ void TreeView::LayoutEditor() {
-(empty_editor_size_.height() - font_list_.GetHeight()) / 2);
// Give a little extra space for editing.
row_bounds.set_width(row_bounds.width() + 50);
+ // The text field could be bigger than the content area of the parent. Scroll
+ // the parent by the bounds to make sure that we don't paint outside the
+ // content area.
Peter Kasting 2017/04/12 02:17:05 Nit: "Bigger than the content area" is a little mi
ananta 2017/04/12 02:46:49 Done.
+ ScrollRectToVisible(row_bounds);
editor_->SetBoundsRect(row_bounds);
editor_->Layout();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698