Changeset 193016 in webkit
- Timestamp:
- Dec 3, 2015, 10:31:33 AM (10 years ago)
- Location:
- branches/safari-601-branch/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601-branch/Source/WebInspectorUI/ChangeLog
r193015 r193016 1 2015-12-01 Timothy Hatcher <timothy@apple.com> 2 3 Merge r187207. rdar://problem/23221163 4 5 2015-07-22 Matt Baker <mattbaker@apple.com> 6 7 Web Inspector: TimelineRuler shouldn't dispatch selection changed event unless it actually changes 8 https://bugs.webkit.org/show_bug.cgi?id=147219 9 10 Reviewed by Timothy Hatcher. 11 12 Moved to a "suppress next" model for suppressing dispatch of TimelineRuler's selection changed event. The 13 ruler's _timeRangeSelectionChanged flag is now reset only when an event is finally dispatched. 14 15 * UserInterface/Views/TimelineRuler.js: 16 (WebInspector.TimelineRuler): 17 (WebInspector.TimelineRuler.prototype._updateSelection): 18 (WebInspector.TimelineRuler.prototype._dispatchTimeRangeSelectionChangedEvent): 19 Check for this._timeRangeSelectionChanged moved into dispatch function. 20 (WebInspector.TimelineRuler.prototype._handleMouseDown): 21 (WebInspector.TimelineRuler.prototype._handleMouseMove): 22 (WebInspector.TimelineRuler.prototype._handleMouseUp): 23 We now suppress the next dispatch only, rather than a toggle. 24 1 25 2015-12-01 Timothy Hatcher <timothy@apple.com> 2 26 -
branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js
r193011 r193016 52 52 this._minimumSelectionDuration = 0.01; 53 53 this._formatLabelCallback = null; 54 this._suppressNextTimeRangeSelectionChangedEvent = false; 55 this._timeRangeSelectionChanged = false; 54 56 55 57 this._markerElementMap = new Map; … … 617 619 } 618 620 619 if (this._timeRangeSelectionChanged) 620 this._dispatchTimeRangeSelectionChangedEvent(); 621 this._dispatchTimeRangeSelectionChangedEvent(); 621 622 }, 622 623 … … 639 640 _dispatchTimeRangeSelectionChangedEvent: function() 640 641 { 641 delete this._timeRangeSelectionChanged; 642 643 if (this._suppressTimeRangeSelectionChangedEvent) 644 return; 642 if (!this._timeRangeSelectionChanged) 643 return; 644 645 if (this._suppressNextTimeRangeSelectionChangedEvent) { 646 this._suppressNextTimeRangeSelectionChangedEvent = false; 647 return; 648 } 649 650 this._timeRangeSelectionChanged = false; 645 651 646 652 this.dispatchEventToListeners(WebInspector.TimelineRuler.Event.TimeRangeSelectionChanged); … … 659 665 660 666 this._selectionIsMove = event.target === this._selectionDragElement; 661 this._suppressTimeRangeSelectionChangedEvent = !this._selectionIsMove;662 667 this._rulerBoundingClientRect = this._element.getBoundingClientRect(); 663 668 … … 684 689 { 685 690 console.assert(event.button === 0); 691 692 this._suppressNextTimeRangeSelectionChangedEvent = !this._selectionIsMove; 686 693 687 694 if (this._selectionIsMove) { … … 736 743 } 737 744 } 738 739 delete this._suppressTimeRangeSelectionChangedEvent;740 745 741 746 this._dispatchTimeRangeSelectionChangedEvent();
Note:
See TracChangeset
for help on using the changeset viewer.