Commit Graph
4 Commits
Author SHA1 Message Date
Masayuki Nakano b59559d6cd Bug 1907494 - Make LinearEasingFunctionWidget listen to pointerdown to capture the pointer r=nchevobbe,devtools-reviewers
`MouseEvent.pointerId` is `undefined` so that `setPointerCapture(undefined)`
means `setPointerCapture(0)` and it captures both click of mouse and first
touch of touch input devices.  Therefore, for getting correct `pointerId`,
it needs to listen to `pointerdown`.  Then, we make it listen to `pointerdown`
and `pointerup` events because `mousedown` and `mouseup` are always fired after
`pointerdown` and `pointerup` (`mousemove` and `pointermove` are really
different, therefore, it needs to keep listening to `mousemove`).  Finally,
they are handling a drag during a button press.  Therefore, they are designed
only for mouse devices.  Therefore, this patch makes the `pointerdown` listener
start to handle a drag only when the device type is "mouse".

Note that the pointer capture will be released when all pointers of the device
are inactivated.  Therefore, it does not need explicitly to release the capture.

Depends on D217215

Differential Revision: https://phabricator.services.mozilla.com/D217216
2024-07-22 08:05:35 +00:00
Nicolas Chevobbe 5532aef13b Bug 1892895 - [devtools] Remove JS CSS Lexer. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D208318
2024-04-26 09:18:12 +00:00
Nicolas Chevobbe 3c2ffad25b Bug 1889938 - [devtools] Use InspectorCSSParser in LinearEasingFunctionWidget.js parseTimingFunction. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D206875
2024-04-17 05:57:12 +00:00
Nicolas Chevobbe 727b3600d3 Bug 1773549 - [devtools] Add widget for linear easing function. r=devtools-reviewers,jdescottes.
This adds an authoring tool similar to the one we have for cubic bezier.
A swatch is added next to `linear()` functions and clicking on it will show
the widget.
Modifying the line in the widget will update the value of the `linear()` function
in the rule view.

Differential Revision: https://phabricator.services.mozilla.com/D153333
2023-03-08 17:39:37 +00:00