Title: [242566] trunk/Source/WebInspectorUI
- Revision
- 242566
- Author
- joep...@webkit.org
- Date
- 2019-03-06 14:28:27 -0800 (Wed, 06 Mar 2019)
Log Message
Web Inspector: TimelineOverview clicks do not always behave as expected
https://bugs.webkit.org/show_bug.cgi?id=195319
Reviewed by Devin Rousso.
* UserInterface/Views/TimelineRuler.js:
(WI.TimelineRuler.prototype._shouldIgnoreMicroMovement):
(WI.TimelineRuler.prototype._handleMouseDown):
(WI.TimelineRuler.prototype._handleMouseMove):
Ignore moves that haven't gone more than 4px. Once the threshold is
passed allow all moves. This improves the click behavior since
previously click would never re-dispatch if there was any movement.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (242565 => 242566)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-03-06 21:42:18 UTC (rev 242565)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-03-06 22:28:27 UTC (rev 242566)
@@ -1,5 +1,20 @@
2019-03-06 Joseph Pecoraro <pecor...@apple.com>
+ Web Inspector: TimelineOverview clicks do not always behave as expected
+ https://bugs.webkit.org/show_bug.cgi?id=195319
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Views/TimelineRuler.js:
+ (WI.TimelineRuler.prototype._shouldIgnoreMicroMovement):
+ (WI.TimelineRuler.prototype._handleMouseDown):
+ (WI.TimelineRuler.prototype._handleMouseMove):
+ Ignore moves that haven't gone more than 4px. Once the threshold is
+ passed allow all moves. This improves the click behavior since
+ previously click would never re-dispatch if there was any movement.
+
+2019-03-06 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: CPU Usage Timeline - Statistics and Sources sections
https://bugs.webkit.org/show_bug.cgi?id=195202
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js (242565 => 242566)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js 2019-03-06 21:42:18 UTC (rev 242565)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js 2019-03-06 22:28:27 UTC (rev 242566)
@@ -746,6 +746,19 @@
this._needsMarkerLayout();
}
+ _shouldIgnoreMicroMovement(event)
+ {
+ if (this._mousePassedMicroMovementTest)
+ return false;
+
+ let pixels = Math.abs(event.pageX - this._mouseStartX);
+ if (pixels <= 4)
+ return true;
+
+ this._mousePassedMicroMovementTest = true;
+ return false;
+ }
+
_handleClick(event)
{
if (!this._enabled)
@@ -797,6 +810,9 @@
this._mouseMoved = false;
+ this._mousePassedMicroMovementTest = false;
+ this._mouseStartX = event.pageX;
+
this._mouseMoveEventListener = this._handleMouseMove.bind(this);
this._mouseUpEventListener = this._handleMouseUp.bind(this);
@@ -812,6 +828,9 @@
{
console.assert(event.button === 0);
+ if (this._shouldIgnoreMicroMovement(event))
+ return;
+
this._mouseMoved = true;
let isRTL = WI.resolvedLayoutDirection() === WI.LayoutDirection.RTL;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes