Changeset 112531 in webkit
- Timestamp:
- Mar 29, 2012 7:43:24 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112530 r112531 1 2012-03-29 Andrey Kosyakov <caseq@chromium.org> 2 3 Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor 4 https://bugs.webkit.org/show_bug.cgi?id=82616 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/front-end/TimelineOverviewPane.js: 9 (WebInspector.TimelineOverviewWindow): Explicitly handle single click on overview by creating a minimal window around cursor. 10 (WebInspector.TimelineOverviewWindow.prototype._resizeWindowMinimum): 11 1 12 2012-03-29 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> 2 13 -
trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js
r112528 r112531 369 369 this._parentElement.addEventListener("mousewheel", this.scrollWindow.bind(this), true); 370 370 this._parentElement.addEventListener("dblclick", this._resizeWindowMaximum.bind(this), true); 371 this._parentElement.addEventListener("click", this._resizeWindowMinimum.bind(this), true); 371 372 372 373 this._overviewWindowElement = document.createElement("div"); … … 510 511 { 511 512 this._setWindowPosition(0, this._parentElement.clientWidth); 513 }, 514 515 _resizeWindowMinimum: function(event) 516 { 517 WebInspector.elementDragEnd(event); 518 var middle = event.pageX - this._parentElement.offsetLeft; 519 var start = Math.max(middle - WebInspector.TimelineOverviewPane.MinSelectableSize / 2, 0); 520 var end = Math.min(middle + WebInspector.TimelineOverviewPane.MinSelectableSize / 2, this._parentElement.clientWidth); 521 this._setWindowPosition(start, end); 512 522 }, 513 523
Note: See TracChangeset
for help on using the changeset viewer.