[webkit-reviews] review granted: [Bug 219930] GamepadButton.prototype is missing 'touched' attribute : [Attachment 416917] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 5 12:20:32 PST 2021
Dean Jackson <dino at apple.com> has granted frankolivier at apple.com's request for
review:
Bug 219930: GamepadButton.prototype is missing 'touched' attribute
https://bugs.webkit.org/show_bug.cgi?id=219930
Attachment 416917: Patch
https://bugs.webkit.org/attachment.cgi?id=416917&action=review
--- Comment #10 from Dean Jackson <dino at apple.com> ---
Comment on attachment 416917
--> https://bugs.webkit.org/attachment.cgi?id=416917
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=416917&action=review
> Source/WebKit/Shared/Gamepad/GamepadData.cpp:46
> +, m_buttonValues(WTF::map(buttonValues, [](const auto& button) { return
button.value(); }))
> +, m_buttonTouchedValues(WTF::map(buttonValues, [](const auto& button) {
return button.touched(); }))
> +, m_buttonPressedValues(WTF::map(buttonValues, [](const auto& button) {
return button.pressed(); }))
Nit: formatting error here.
> Source/WebKit/Shared/Gamepad/GamepadData.h:72
> Vector<double> m_buttonValues;
> + Vector<bool> m_buttonTouchedValues;
> + Vector<bool> m_buttonPressedValues;
I wonder if we should have a struct with value, touchedValue and PressedValue,
and then just a Vector of those?
> Source/WebKit/WebProcess/Gamepad/WebGamepad.cpp:73
> + m_buttonValues[i] =
SharedGamepadButtonValue(gamepadData.buttonValues()[i],
gamepadData.buttonPressedValues()[i], gamepadData.buttonTouchedValues()[i]);
should we ASSERT that buttonValues + buttonPressedValues + buttonTouchedValues
all have the same size?
More information about the webkit-reviews
mailing list