WebHID: Windows preparsed-data fields decoded from the wrong layout

Issue 510376882CL 8352866Accepted / P3 / S3services/device/hid

Summary

samplerWebHID

The issue descriptor has two top-level Application collections: Consumer Control and Phone. Linux reported type: 1 with logical ranges 0..652 and 0..191. Windows reported type: 0 and reversed-looking logical limits because Chromium interpreted Windows HID preparsed data with an incomplete channel descriptor layout.

CL 8352866 handles Windows button items using their distinct union layout and reads the collection type from the link collection node.

Download

Prebuilt Windows installer containing the fix from CL 8352866:

Descriptor

05 0c 09 01 a1 01 85 03 15 00 26 8c 02 19 00 2a 8c 02 75 10 95 02 81 00 c0
05 0b 09 01 a1 01 85 05 15 00 26 bf 00 19 00 2a bf 00 75 10 95 02 81 00 c0

Before / after

FieldOld Windows resultExpected / fixed
collection.type0 (Physical)1 (Application)
Consumer logical range652..00..652
Telephony logical range191..00..191
usage rangesalready correctunchanged

Why the patch works

Windows exposes parsed HID metadata as internal preparsed data. In HIDP_CHANNEL_DESC, logical min/max fields are at different offsets for button items than for data items. The old Chromium structure read button items as data items. The CL adds the button layout and keeps the parsed top-level collection type instead of defaulting to zero.

Interactive checks

Expected WebHID shape

Not run.

Live WebHID inspection

Connect a HID device to inspect device.collections in this browser.

Requires Chrome WebHID and a user gesture.