Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 73e7c9fe81781dd7c92144c46dd8ba26172b3dc8
      
https://github.com/WebKit/WebKit/commit/73e7c9fe81781dd7c92144c46dd8ba26172b3dc8
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-10-03 (Sat, 03 Oct 2026)

  Changed paths:
    M Source/WebCore/bindings/scripts/CodeGenerator.pm
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/IDLAttributes.json
    M Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/TestObj.inspector-native-function-parameters.json
    M Source/WebCore/bindings/scripts/test/TestObj.idl

  Log Message:
  -----------
  Validate the types extended attributes are used on in the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=326192
rdar://189073863

Reviewed by Brady Eidson.

The bindings generator accepted [Clamp], [EnforceRange], 
[LegacyNullToEmptyString],
and [AllowShared] on any type. IDLAttributes.json now records which types each 
can
be used on, through new typesAllowed, supportsNullableTypes, and 
supportsUnionTypes
entries. The generator checks every type against these entries and also rejects
[Clamp] and [EnforceRange] on the same type. This matches Web IDL, which allows
these extended attributes on nullable types, except for 
[LegacyNullToEmptyString]:
https://github.com/whatwg/webidl/pull/1624

[AllowShared] is still allowed on ArrayBuffer and on unions of buffer source 
types,
as it stands in for SharedArrayBuffer until that is a type of its own.

No WebCore IDL uses these extended attributes in a way that is now rejected, so 
the
generated bindings are unchanged. The bindings tests used 
[LegacyNullToEmptyString]
on ByteString, which Web IDL does not allow, so those tests are removed.

Canonical link: https://commits.webkit.org/322626@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to