Commit log viewer repaints too frequently after r198499
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Mar 2016 02:58:19 +0000 (02:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Mar 2016 02:58:19 +0000 (02:58 +0000)
commitb05e0daf299b10c83960c3df7499a01c585f1233
tree7432687f945070373370582e4bda48db876d4bca
parentd06a44737fd0bc5b44c4c7128e1c1b6a84a225f9
Commit log viewer repaints too frequently after r198499
https://bugs.webkit.org/show_bug.cgi?id=155732

Reviewed by Joseph Pecoraro.

The bug was caused by InteractiveTimeSeriesChart invoking onchange callback whenever mouse moved even
if the current point didn't change. Fixed the bug by avoiding the work if the indicator hadn't changed
and avoiding work in the commit log viewer when the requested repository and the revision range were
the same as those of the last request.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer):
(CommitLogViewer.prototype.currentRepository): Exit early when repository and the revision range are
identical to the one we already have to avoid repaints and issuing multiple network requests.
* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._mouseMove): Don't invoke _notifyIndicatorChanged if the current
indicator hadn't changed.
* public/v3/pages/chart-pane.js:
(ChartPane.prototype._indicatorDidChange): Fixed the bug that unlocking the indicator wouldn't update
the URL. We need to check whether the lock state had changed. The old condition was also redundant
since _mainChartIndicatorWasLocked is always identically equal to isLocked per the prior assignment.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js
Websites/perf.webkit.org/public/v3/components/interactive-time-series-chart.js
Websites/perf.webkit.org/public/v3/pages/chart-pane.js