Web Inspector: Improve performance of selection range changes viewing Scripts timeline
https://bugs.webkit.org/show_bug.cgi?id=136015

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-16
Reviewed by Timothy Hatcher.

* UserInterface/Base/Utilities.js:
(clamp):
Helper function to clamp a value between a min and max.

* UserInterface/Models/ProfileNode.js:
(WebInspector.ProfileNode.prototype.get startTime):
(WebInspector.ProfileNode.prototype.get endTime):
These can be quickly calculated, so avoid full calculation to grab the values.

* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype.updateLayout):
Update ranges with a smart helper, instead of blindly doing it and needing refresh.

* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode.prototype.get rangeEndTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
(WebInspector.ProfileNodeDataGridNode.prototype.updateRangeTimes):
(WebInspector.ProfileNodeDataGridNode.prototype.set rangeStartTime): Deleted.
(WebInspector.ProfileNodeDataGridNode.prototype.set rangeEndTime): Deleted.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.updateRangeTimes):
(WebInspector.ScriptTimelineDataGridNode.prototype.set rangeStartTime): Deleted.
(WebInspector.ScriptTimelineDataGridNode.prototype.set rangeEndTime): Deleted.
When updating the range selection, compare to the last range selection
on this DataGridNode. If the visible portion of this node's time range
changes, we need a refresh. Otherwise, we don't need a refresh.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172689 268f45cc-cd09-0410-ab3c-d52691b4dbfc