The :defined selector matches for undefined customized built-in elements |
|||||||||
Issue descriptionChrome Version : ToT r482199 w/ --enable-blink-features=CustomElementsBuiltin URLs (if applicable) : http://jsbin.com/vanunonoce/edit?html,output What is the expected result? The <div is="my-div"> should match the :not(:defined) selector and have a green dashed border. What happens instead of that? It doesn't match the selector. Here's the spec: https://html.spec.whatwg.org/#selector-defined says: "The :defined pseudo-class must match any element that is defined." https://dom.spec.whatwg.org/#concept-create-element says: 5. If definition is non-null, and definition’s name is not equal to its local name ... 5.2 Set .. custom element state set to "undefined"
,
Oct 16 2017
Can this be triaged by CSS people?
,
Oct 17 2017
I don't think this is implemented in Blink yet. It doesn't work in Firefox 56 either.
,
Oct 17 2017
,
Oct 17 2017
,
Dec 6 2017
,
Feb 1 2018
Actually, :defined was already implemented. In blink::HTMLConstructionSite code path, it seems we don't implement step 7.3 of https://dom.spec.whatwg.org/#concept-create-element .
,
Feb 6 2018
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/932a24c73fb4cfd4f80ba94ea729ebfcddcb0dc9 commit 932a24c73fb4cfd4f80ba94ea729ebfcddcb0dc9 Author: Kent Tamura <tkent@chromium.org> Date: Tue Feb 06 04:23:07 2018 custom-elements: Fix a bug that HTML parser didn't set custom element state correctly for unknown "is" attribute value. In HTML parser, if custom element definition is not found and the element local name is invalid for custom element name, custom element state of the element was set to "Uncustomized", which won't be upgraded. It should be "Undefined" if "is" attribute exists. Also, CustomElementRegistry::AddCandidate() didn't pick up a correct name for customized built-in candidates. A Blink layout test for :defined is upstreamed to WPT. Bug: 736967 Change-Id: I583073eabc4ac276c6990161516c7b289905909b Reviewed-on: https://chromium-review.googlesource.com/903423 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#534621} [rename] https://crrev.com/932a24c73fb4cfd4f80ba94ea729ebfcddcb0dc9/third_party/WebKit/LayoutTests/external/wpt/custom-elements/pseudo-class-defined.html [modify] https://crrev.com/932a24c73fb4cfd4f80ba94ea729ebfcddcb0dc9/third_party/WebKit/Source/core/html/custom/CustomElementRegistry.cpp [modify] https://crrev.com/932a24c73fb4cfd4f80ba94ea729ebfcddcb0dc9/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
,
Feb 6 2018
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by dominicc@chromium.org
, Jun 27 2017