From bf004bb63bcc9e2ea5f9417461ecb3042b27a2fa Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 5 Jan 2020 12:13:14 -0500 Subject: Bug 1334051 - Part 2: Invoke attributeChangedCallback only if attribute name is in the observed attribute list. We call attributeChangedCallback in two cases: 1. When any of the attributes in the observed attribute list has changed, appended, removed, or replaced. 2. When upgrading an element, for each attribute in element's attribute list that is in the observed attribute list. Note: w/ Fixup for not implementing an API Enhancement Bug 1363481. Tag UXP Issue #1344 --- .../meta/custom-elements/CustomElementRegistry.html.ini | 12 ------------ .../custom-elements/HTMLElement-constructor.html.ini | 11 +++++++++++ .../custom-elements/attribute-changed-callback.html.ini | 16 ---------------- .../custom-elements/htmlconstructor/newtarget.html.ini | 14 ++++++++++++++ 4 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 testing/web-platform/meta/custom-elements/HTMLElement-constructor.html.ini create mode 100644 testing/web-platform/meta/custom-elements/htmlconstructor/newtarget.html.ini (limited to 'testing/web-platform/meta/custom-elements') diff --git a/testing/web-platform/meta/custom-elements/CustomElementRegistry.html.ini b/testing/web-platform/meta/custom-elements/CustomElementRegistry.html.ini index 29be90bea..3f9f66d17 100644 --- a/testing/web-platform/meta/custom-elements/CustomElementRegistry.html.ini +++ b/testing/web-platform/meta/custom-elements/CustomElementRegistry.html.ini @@ -6,18 +6,6 @@ [customElements.define must get "observedAttributes" property on the constructor prototype when "attributeChangedCallback" is present] expected: FAIL - [customElements.define must rethrow an exception thrown while getting observedAttributes on the constructor prototype] - expected: FAIL - - [customElements.define must rethrow an exception thrown while converting the value of observedAttributes to sequence] - expected: FAIL - - [customElements.define must rethrow an exception thrown while iterating over observedAttributes to sequence] - expected: FAIL - - [customElements.define must rethrow an exception thrown while retrieving Symbol.iterator on observedAttributes] - expected: FAIL - [customElements.define must upgrade elements in the shadow-including tree order] expected: FAIL diff --git a/testing/web-platform/meta/custom-elements/HTMLElement-constructor.html.ini b/testing/web-platform/meta/custom-elements/HTMLElement-constructor.html.ini new file mode 100644 index 000000000..0d2d4374f --- /dev/null +++ b/testing/web-platform/meta/custom-elements/HTMLElement-constructor.html.ini @@ -0,0 +1,11 @@ +[HTMLElement-constructor.html] + type: testharness + [HTMLElement constructor must infer the tag name from the element interface] + expected: FAIL + + [HTMLElement constructor must allow subclassing a custom element] + expected: FAIL + + [HTMLElement constructor must allow subclassing an user-defined subclass of HTMLElement] + expected: FAIL + diff --git a/testing/web-platform/meta/custom-elements/attribute-changed-callback.html.ini b/testing/web-platform/meta/custom-elements/attribute-changed-callback.html.ini index 10eea70b2..1b1bea6c9 100644 --- a/testing/web-platform/meta/custom-elements/attribute-changed-callback.html.ini +++ b/testing/web-platform/meta/custom-elements/attribute-changed-callback.html.ini @@ -12,21 +12,5 @@ [setAttributeNode and removeAttributeNS must enqueue and invoke attributeChangedCallback for an SVG attribute] expected: FAIL - [Mutating attributeChangedCallback after calling customElements.define must not affect the callback being invoked] - expected: FAIL - - [attributedChangedCallback must not be invoked when the observed attributes does not contain the attribute] - expected: FAIL - - [Mutating observedAttributes after calling customElements.define must not affect the set of attributes for which attributedChangedCallback is invoked] - expected: FAIL - - [attributedChangedCallback must be enqueued for attributes specified in a non-Array iterable observedAttributes] - expected: FAIL - [attributedChangedCallback must be enqueued for style attribute change by mutating inline style declaration] expected: FAIL - - [attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed] - expected: FAIL - diff --git a/testing/web-platform/meta/custom-elements/htmlconstructor/newtarget.html.ini b/testing/web-platform/meta/custom-elements/htmlconstructor/newtarget.html.ini new file mode 100644 index 000000000..f77a64e1d --- /dev/null +++ b/testing/web-platform/meta/custom-elements/htmlconstructor/newtarget.html.ini @@ -0,0 +1,14 @@ +[newtarget.html] + type: testharness + [Use NewTarget's prototype, not the one stored at definition time] + expected: FAIL + + [Rethrow any exceptions thrown while getting the prototype] + expected: FAIL + + [If prototype is not object, derives the fallback from NewTarget's realm (autonomous custom elements)] + expected: FAIL + + [If prototype is not object, derives the fallback from NewTarget's realm (customized built-in elements)] + expected: FAIL + -- cgit v1.2.3