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

Unified Diff: chrome/browser/ui/task_manager/task_manager_table_model.cc

Issue 1535803005: Fix task manager table scrollbar issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: chrome/browser/ui/task_manager/task_manager_table_model.cc
diff --git a/chrome/browser/ui/task_manager/task_manager_table_model.cc b/chrome/browser/ui/task_manager/task_manager_table_model.cc
index 3ee0752505b55baa52550a3c4b43303d0f4a87d9..c030f71ae4dc65380f0c1b8d5712bb2ce5dd2c54 100644
--- a/chrome/browser/ui/task_manager/task_manager_table_model.cc
+++ b/chrome/browser/ui/task_manager/task_manager_table_model.cc
@@ -584,6 +584,13 @@ void TaskManagerTableModel::StartUpdating() {
TaskManagerInterface::GetTaskManager()->AddObserver(this);
tasks_ = observed_task_manager()->GetTaskIdsList();
OnRefresh();
+
+ // In order for the scrollbar of the TableView to work properly on startup of
+ // the task manager, we must invoke TableModelObserver::OnModelChanged() which
+ // in turn will invoke TableView::NumRowsChanged(). This will adjust the
+ // vertical scrollbar correctly. crbug.com/570966.
+ if (table_model_observer_)
+ table_model_observer_->OnModelChanged();
}
void TaskManagerTableModel::StopUpdating() {
« 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