Title: [112531] trunk/Source/WebCore
- Revision
- 112531
- Author
- [email protected]
- Date
- 2012-03-29 07:43:24 -0700 (Thu, 29 Mar 2012)
Log Message
Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
https://bugs.webkit.org/show_bug.cgi?id=82616
Reviewed by Pavel Feldman.
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewWindow): Explicitly handle single click on overview by creating a minimal window around cursor.
(WebInspector.TimelineOverviewWindow.prototype._resizeWindowMinimum):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112530 => 112531)
--- trunk/Source/WebCore/ChangeLog 2012-03-29 14:31:54 UTC (rev 112530)
+++ trunk/Source/WebCore/ChangeLog 2012-03-29 14:43:24 UTC (rev 112531)
@@ -1,3 +1,14 @@
+2012-03-29 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
+ https://bugs.webkit.org/show_bug.cgi?id=82616
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/TimelineOverviewPane.js:
+ (WebInspector.TimelineOverviewWindow): Explicitly handle single click on overview by creating a minimal window around cursor.
+ (WebInspector.TimelineOverviewWindow.prototype._resizeWindowMinimum):
+
2012-03-29 Víctor Manuel Jáquez Leal <[email protected]>
Unavailable pre-processor macro in non-Qt environments
Modified: trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js (112530 => 112531)
--- trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js 2012-03-29 14:31:54 UTC (rev 112530)
+++ trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js 2012-03-29 14:43:24 UTC (rev 112531)
@@ -368,6 +368,7 @@
this._parentElement.addEventListener("mousedown", this._dragWindow.bind(this), true);
this._parentElement.addEventListener("mousewheel", this.scrollWindow.bind(this), true);
this._parentElement.addEventListener("dblclick", this._resizeWindowMaximum.bind(this), true);
+ this._parentElement.addEventListener("click", this._resizeWindowMinimum.bind(this), true);
this._overviewWindowElement = document.createElement("div");
this._overviewWindowElement.className = "timeline-overview-window";
@@ -511,6 +512,15 @@
this._setWindowPosition(0, this._parentElement.clientWidth);
},
+ _resizeWindowMinimum: function(event)
+ {
+ WebInspector.elementDragEnd(event);
+ var middle = event.pageX - this._parentElement.offsetLeft;
+ var start = Math.max(middle - WebInspector.TimelineOverviewPane.MinSelectableSize / 2, 0);
+ var end = Math.min(middle + WebInspector.TimelineOverviewPane.MinSelectableSize / 2, this._parentElement.clientWidth);
+ this._setWindowPosition(start, end);
+ },
+
_setWindowPosition: function(start, end)
{
var clientWidth = this._parentElement.clientWidth;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes