From a0165aefca5bc10dc2b76b3a879022fc8e8bc3c9 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 17 Jul 2022 15:27:16 -0700 Subject: [PATCH] ASSERTION FAILED: !m_invoking in CustomElementQueue::add() on tv.youtube.com https://bugs.webkit.org/show_bug.cgi?id=237977 Reviewed by Wenson Hsieh. The assertion failure was caused by ARIA reflection attributes not having CEReactions. Fixed the bug and filed a spec bug: https://github.com/w3c/aria/issues/1767 * LayoutTests/fast/custom-elements/reactions-for-aria-attributes-expected.txt: Added. * LayoutTests/fast/custom-elements/reactions-for-aria-attributes.html: Added. * LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes-expected.txt: Added. * LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes.html: Added. * Source/WebCore/accessibility/AriaAttributes.idl: Canonical link: https://commits.webkit.org/252552@main --- ...reactions-for-aria-attributes-expected.txt | 78 +++++++++++++++ .../reactions-for-aria-attributes.html | 66 +++++++++++++ ...s-for-aria-element-attributes-expected.txt | 18 ++++ ...reactions-for-aria-element-attributes.html | 65 +++++++++++++ .../WebCore/accessibility/AriaAttributes.idl | 94 +++++++++---------- 5 files changed, 274 insertions(+), 47 deletions(-) create mode 100644 LayoutTests/fast/custom-elements/reactions-for-aria-attributes-expected.txt create mode 100644 LayoutTests/fast/custom-elements/reactions-for-aria-attributes.html create mode 100644 LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes-expected.txt create mode 100644 LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes.html diff --git a/LayoutTests/fast/custom-elements/reactions-for-aria-attributes-expected.txt b/LayoutTests/fast/custom-elements/reactions-for-aria-attributes-expected.txt new file mode 100644 index 000000000000..466d1640c026 --- /dev/null +++ b/LayoutTests/fast/custom-elements/reactions-for-aria-attributes-expected.txt @@ -0,0 +1,78 @@ + +PASS ariaAtomic on Element must enqueue an attributeChanged reaction when adding aria-atomic content attribute +PASS ariaAtomic on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaAutoComplete on Element must enqueue an attributeChanged reaction when adding aria-autocomplete content attribute +PASS ariaAutoComplete on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaBusy on Element must enqueue an attributeChanged reaction when adding aria-busy content attribute +PASS ariaBusy on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaChecked on Element must enqueue an attributeChanged reaction when adding aria-checked content attribute +PASS ariaChecked on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaColCount on Element must enqueue an attributeChanged reaction when adding aria-colcount content attribute +PASS ariaColCount on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaColIndex on Element must enqueue an attributeChanged reaction when adding aria-colindex content attribute +PASS ariaColIndex on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaColSpan on Element must enqueue an attributeChanged reaction when adding aria-colspan content attribute +PASS ariaColSpan on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaCurrent on Element must enqueue an attributeChanged reaction when adding aria-current content attribute +PASS ariaCurrent on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaDisabled on Element must enqueue an attributeChanged reaction when adding aria-disabled content attribute +PASS ariaDisabled on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaExpanded on Element must enqueue an attributeChanged reaction when adding aria-expanded content attribute +PASS ariaExpanded on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaHasPopup on Element must enqueue an attributeChanged reaction when adding aria-haspopup content attribute +PASS ariaHasPopup on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaHidden on Element must enqueue an attributeChanged reaction when adding aria-hidden content attribute +PASS ariaHidden on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaInvalid on Element must enqueue an attributeChanged reaction when adding aria-invalid content attribute +PASS ariaInvalid on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaKeyShortcuts on Element must enqueue an attributeChanged reaction when adding aria-keyshortcuts content attribute +PASS ariaKeyShortcuts on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaLabel on Element must enqueue an attributeChanged reaction when adding aria-label content attribute +PASS ariaLabel on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaLevel on Element must enqueue an attributeChanged reaction when adding aria-level content attribute +PASS ariaLevel on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaLive on Element must enqueue an attributeChanged reaction when adding aria-live content attribute +PASS ariaLive on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaModal on Element must enqueue an attributeChanged reaction when adding aria-modal content attribute +PASS ariaModal on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaMultiLine on Element must enqueue an attributeChanged reaction when adding aria-multiline content attribute +PASS ariaMultiLine on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaMultiSelectable on Element must enqueue an attributeChanged reaction when adding aria-multiselectable content attribute +PASS ariaMultiSelectable on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaOrientation on Element must enqueue an attributeChanged reaction when adding aria-orientation content attribute +PASS ariaOrientation on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaPlaceholder on Element must enqueue an attributeChanged reaction when adding aria-placeholder content attribute +PASS ariaPlaceholder on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaPosInSet on Element must enqueue an attributeChanged reaction when adding aria-posinset content attribute +PASS ariaPosInSet on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaPressed on Element must enqueue an attributeChanged reaction when adding aria-pressed content attribute +PASS ariaPressed on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaReadOnly on Element must enqueue an attributeChanged reaction when adding aria-readonly content attribute +PASS ariaReadOnly on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaRelevant on Element must enqueue an attributeChanged reaction when adding aria-relevant content attribute +PASS ariaRelevant on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaRequired on Element must enqueue an attributeChanged reaction when adding aria-required content attribute +PASS ariaRequired on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaRoleDescription on Element must enqueue an attributeChanged reaction when adding aria-roledescription content attribute +PASS ariaRoleDescription on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaRowCount on Element must enqueue an attributeChanged reaction when adding aria-rowcount content attribute +PASS ariaRowCount on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaRowIndex on Element must enqueue an attributeChanged reaction when adding aria-rowindex content attribute +PASS ariaRowIndex on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaRowSpan on Element must enqueue an attributeChanged reaction when adding aria-rowspan content attribute +PASS ariaRowSpan on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaSelected on Element must enqueue an attributeChanged reaction when adding aria-selected content attribute +PASS ariaSelected on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaSetSize on Element must enqueue an attributeChanged reaction when adding aria-setsize content attribute +PASS ariaSetSize on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaSort on Element must enqueue an attributeChanged reaction when adding aria-sort content attribute +PASS ariaSort on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaValueMax on Element must enqueue an attributeChanged reaction when adding aria-valuemax content attribute +PASS ariaValueMax on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaValueMin on Element must enqueue an attributeChanged reaction when adding aria-valuemin content attribute +PASS ariaValueMin on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaValueNow on Element must enqueue an attributeChanged reaction when adding aria-valuenow content attribute +PASS ariaValueNow on Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaValueText on Element must enqueue an attributeChanged reaction when adding aria-valuetext content attribute +PASS ariaValueText on Element must enqueue an attributeChanged reaction when replacing an existing attribute + diff --git a/LayoutTests/fast/custom-elements/reactions-for-aria-attributes.html b/LayoutTests/fast/custom-elements/reactions-for-aria-attributes.html new file mode 100644 index 000000000000..b4fffd90e001 --- /dev/null +++ b/LayoutTests/fast/custom-elements/reactions-for-aria-attributes.html @@ -0,0 +1,66 @@ + + + +Custom Elements: CEReactions on Element interface + + + + + + + + + + +
+
+ + + diff --git a/LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes-expected.txt b/LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes-expected.txt new file mode 100644 index 000000000000..bb32cc8331b8 --- /dev/null +++ b/LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes-expected.txt @@ -0,0 +1,18 @@ + +PASS ariaActiveDescendantElement in Element must enqueue an attributeChanged reaction when adding aria-activedescendant content attribute +PASS ariaActiveDescendantElement in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaControlsElements in Element must enqueue an attributeChanged reaction when adding aria-controls content attribute +PASS ariaControlsElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaDescribedByElements in Element must enqueue an attributeChanged reaction when adding aria-describedby content attribute +PASS ariaDescribedByElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaDetailsElements in Element must enqueue an attributeChanged reaction when adding aria-details content attribute +PASS ariaDetailsElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaErrorMessageElement in Element must enqueue an attributeChanged reaction when adding aria-errormessage content attribute +PASS ariaErrorMessageElement in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaFlowToElements in Element must enqueue an attributeChanged reaction when adding aria-flowto content attribute +PASS ariaFlowToElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaLabelledByElements in Element must enqueue an attributeChanged reaction when adding aria-labelledby content attribute +PASS ariaLabelledByElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute +PASS ariaOwnsElements in Element must enqueue an attributeChanged reaction when adding aria-owns content attribute +PASS ariaOwnsElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute + diff --git a/LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes.html b/LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes.html new file mode 100644 index 000000000000..deb59d7c5616 --- /dev/null +++ b/LayoutTests/fast/custom-elements/reactions-for-aria-element-attributes.html @@ -0,0 +1,65 @@ + + + +Custom Elements: CEReactions on Element interface + + + + + + + + + + +
+
+ + + diff --git a/Source/WebCore/accessibility/AriaAttributes.idl b/Source/WebCore/accessibility/AriaAttributes.idl index 406a33ce4930..7988ce8c49f3 100644 --- a/Source/WebCore/accessibility/AriaAttributes.idl +++ b/Source/WebCore/accessibility/AriaAttributes.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Apple Inc. All rights reserved. + * Copyright (C) 2018-2022 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,50 +25,50 @@ // https://wicg.github.io/aom/spec/aria-reflection.html#AriaAttributes interface mixin AriaAttributes { - [Reflect=aria_activedescendant, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute Element? ariaActiveDescendantElement; - [Reflect=aria_atomic] attribute DOMString? ariaAtomic; - [Reflect=aria_autocomplete] attribute DOMString? ariaAutoComplete; - [Reflect=aria_busy] attribute DOMString? ariaBusy; - [Reflect=aria_checked] attribute DOMString? ariaChecked; - [Reflect=aria_colcount] attribute DOMString? ariaColCount; - [Reflect=aria_colindex] attribute DOMString? ariaColIndex; - [Reflect=aria_colspan] attribute DOMString? ariaColSpan; - [CustomGetter, Reflect=aria_controls, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaControlsElements; - [Reflect=aria_current] attribute DOMString? ariaCurrent; - [CustomGetter, Reflect=aria_describedby, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaDescribedByElements; - [CustomGetter, Reflect=aria_details, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaDetailsElements; - [Reflect=aria_disabled] attribute DOMString? ariaDisabled; - [Reflect=aria_errormessage, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute Element? ariaErrorMessageElement; - [Reflect=aria_expanded] attribute DOMString? ariaExpanded; - [CustomGetter, Reflect=aria_flowto, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaFlowToElements; - [Reflect=aria_haspopup] attribute DOMString? ariaHasPopup; - [Reflect=aria_hidden] attribute DOMString? ariaHidden; - [Reflect=aria_invalid] attribute DOMString? ariaInvalid; - [Reflect=aria_keyshortcuts] attribute DOMString? ariaKeyShortcuts; - [Reflect=aria_label] attribute DOMString? ariaLabel; - [CustomGetter, Reflect=aria_labelledby, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaLabelledByElements; - [Reflect=aria_level] attribute DOMString? ariaLevel; - [Reflect=aria_live] attribute DOMString? ariaLive; - [Reflect=aria_modal] attribute DOMString? ariaModal; - [Reflect=aria_multiline] attribute DOMString? ariaMultiLine; - [Reflect=aria_multiselectable] attribute DOMString? ariaMultiSelectable; - [Reflect=aria_orientation] attribute DOMString? ariaOrientation; - [CustomGetter, Reflect=aria_owns, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaOwnsElements; - [Reflect=aria_placeholder] attribute DOMString? ariaPlaceholder; - [Reflect=aria_posinset] attribute DOMString? ariaPosInSet; - [Reflect=aria_pressed] attribute DOMString? ariaPressed; - [Reflect=aria_readonly] attribute DOMString? ariaReadOnly; - [Reflect=aria_relevant] attribute DOMString? ariaRelevant; - [Reflect=aria_required] attribute DOMString? ariaRequired; - [Reflect=aria_roledescription] attribute DOMString? ariaRoleDescription; - [Reflect=aria_rowcount] attribute DOMString? ariaRowCount; - [Reflect=aria_rowindex] attribute DOMString? ariaRowIndex; - [Reflect=aria_rowspan] attribute DOMString? ariaRowSpan; - [Reflect=aria_selected] attribute DOMString? ariaSelected; - [Reflect=aria_setsize] attribute DOMString? ariaSetSize; - [Reflect=aria_sort] attribute DOMString? ariaSort; - [Reflect=aria_valuemax] attribute DOMString? ariaValueMax; - [Reflect=aria_valuemin] attribute DOMString? ariaValueMin; - [Reflect=aria_valuenow] attribute DOMString? ariaValueNow; - [Reflect=aria_valuetext] attribute DOMString? ariaValueText; + [CEReactions, Reflect=aria_activedescendant, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute Element? ariaActiveDescendantElement; + [CEReactions, Reflect=aria_atomic] attribute DOMString? ariaAtomic; + [CEReactions, Reflect=aria_autocomplete] attribute DOMString? ariaAutoComplete; + [CEReactions, Reflect=aria_busy] attribute DOMString? ariaBusy; + [CEReactions, Reflect=aria_checked] attribute DOMString? ariaChecked; + [CEReactions, Reflect=aria_colcount] attribute DOMString? ariaColCount; + [CEReactions, Reflect=aria_colindex] attribute DOMString? ariaColIndex; + [CEReactions, Reflect=aria_colspan] attribute DOMString? ariaColSpan; + [CEReactions, CustomGetter, Reflect=aria_controls, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaControlsElements; + [CEReactions, Reflect=aria_current] attribute DOMString? ariaCurrent; + [CEReactions, CustomGetter, Reflect=aria_describedby, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaDescribedByElements; + [CEReactions, CustomGetter, Reflect=aria_details, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaDetailsElements; + [CEReactions, Reflect=aria_disabled] attribute DOMString? ariaDisabled; + [CEReactions, Reflect=aria_errormessage, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute Element? ariaErrorMessageElement; + [CEReactions, Reflect=aria_expanded] attribute DOMString? ariaExpanded; + [CEReactions, CustomGetter, Reflect=aria_flowto, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaFlowToElements; + [CEReactions, Reflect=aria_haspopup] attribute DOMString? ariaHasPopup; + [CEReactions, Reflect=aria_hidden] attribute DOMString? ariaHidden; + [CEReactions, Reflect=aria_invalid] attribute DOMString? ariaInvalid; + [CEReactions, Reflect=aria_keyshortcuts] attribute DOMString? ariaKeyShortcuts; + [CEReactions, Reflect=aria_label] attribute DOMString? ariaLabel; + [CEReactions, CustomGetter, Reflect=aria_labelledby, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaLabelledByElements; + [CEReactions, Reflect=aria_level] attribute DOMString? ariaLevel; + [CEReactions, Reflect=aria_live] attribute DOMString? ariaLive; + [CEReactions, Reflect=aria_modal] attribute DOMString? ariaModal; + [CEReactions, Reflect=aria_multiline] attribute DOMString? ariaMultiLine; + [CEReactions, Reflect=aria_multiselectable] attribute DOMString? ariaMultiSelectable; + [CEReactions, Reflect=aria_orientation] attribute DOMString? ariaOrientation; + [CEReactions, CustomGetter, Reflect=aria_owns, EnabledBySetting=AriaReflectionForElementReferencesEnabled] attribute FrozenArray? ariaOwnsElements; + [CEReactions, Reflect=aria_placeholder] attribute DOMString? ariaPlaceholder; + [CEReactions, Reflect=aria_posinset] attribute DOMString? ariaPosInSet; + [CEReactions, Reflect=aria_pressed] attribute DOMString? ariaPressed; + [CEReactions, Reflect=aria_readonly] attribute DOMString? ariaReadOnly; + [CEReactions, Reflect=aria_relevant] attribute DOMString? ariaRelevant; + [CEReactions, Reflect=aria_required] attribute DOMString? ariaRequired; + [CEReactions, Reflect=aria_roledescription] attribute DOMString? ariaRoleDescription; + [CEReactions, Reflect=aria_rowcount] attribute DOMString? ariaRowCount; + [CEReactions, Reflect=aria_rowindex] attribute DOMString? ariaRowIndex; + [CEReactions, Reflect=aria_rowspan] attribute DOMString? ariaRowSpan; + [CEReactions, Reflect=aria_selected] attribute DOMString? ariaSelected; + [CEReactions, Reflect=aria_setsize] attribute DOMString? ariaSetSize; + [CEReactions, Reflect=aria_sort] attribute DOMString? ariaSort; + [CEReactions, Reflect=aria_valuemax] attribute DOMString? ariaValueMax; + [CEReactions, Reflect=aria_valuemin] attribute DOMString? ariaValueMin; + [CEReactions, Reflect=aria_valuenow] attribute DOMString? ariaValueNow; + [CEReactions, Reflect=aria_valuetext] attribute DOMString? ariaValueText; };