Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 31f32eac0f4dcc2f277f6b24b3dd089b993e5665
      
https://github.com/WebKit/WebKit/commit/31f32eac0f4dcc2f277f6b24b3dd089b993e5665
  Author: Pascoe <[email protected]>
  Date:   2026-01-27 (Tue, 27 Jan 2026)

  Changed paths:
    M 
LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt
    M 
LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https.html
    M Source/WebCore/Modules/webauthn/AuthenticatorSelectionCriteria.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability.h
    M Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp
    M 
Source/WebCore/bindings/scripts/test/TestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability.idl
    M Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl

  Log Message:
  -----------
  REGRESSION(304651@main): wpt /webauthn/createcredential-passing.https.html, 
/webauthn/getcredential-passing.https.html
rdar://168533890
https://bugs.webkit.org/show_bug.cgi?id=305872

Reviewed by Chris Dumez.

These tests regressed because [PermissiveInvalidValue] was not fully implemented
for enum dictionary members with default values. The attribute worked correctly
for enums without defaults, but enums with defaults (like userVerification = 
"preferred"
and attestation = "none") still used the throwing conversion path.

This change:
- Adds GetPermissiveEnumDefault helper to centralize enum class name and 
default value extraction
- Implements PermissiveInvalidValue handling in 
GenerateDictionaryImplementationMemberConversion
  (aggregate initialization path) for enums with defaults
- Implements PermissiveInvalidValue handling in 
GenerateConvertDictionaryForLegacyNativeDictionaryRequiredInterfaceNullability
  (in-place assignment path) for enums with defaults - this was the missing 
case affecting WebAuthn

For invalid enum values, the generated code now uses parseEnumeration<>() which 
returns
std::optional, then falls back to the default via value_or() instead of 
throwing TypeError.

* 
LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt:
* 
LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
* Source/WebCore/Modules/webauthn/AuthenticatorSelectionCriteria.idl:
* Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.idl:
* Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GetPermissiveEnumDefault):
(GenerateDictionaryImplementationMemberConversion):
(GenerateConvertDictionaryForLegacyNativeDictionaryRequiredInterfaceNullability):
* 
Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability.cpp:
(WebCore::convertDictionary<TestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability>):
(WebCore::convertDictionaryToJS):
(WebCore::convertEnumerationToString):
(WebCore::convertEnumerationToJS):
(WebCore::parseEnumerationFromString<TestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability::LegacyEnum>):
(WebCore::parseEnumeration<TestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability::LegacyEnum>):
(WebCore::expectedEnumerationValues<TestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability::LegacyEnum>):
* 
Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
(WebCore::convertDictionary<DictionaryImplName>):
(WebCore::convertDictionaryToJS):
* 
Source/WebCore/bindings/scripts/test/TestDictionaryLegacyNativeDictionaryRequiredInterfaceNullability.idl:
* Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl:

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



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

Reply via email to