Document named properties: drop object/embed exposedness - #62149
Merged
Conversation
This was referenced Aug 22, 2026
zcorpan
approved these changes
Aug 24, 2026
Member
|
Can you rebase? The META.yml issue seems to have been fixed. |
zcorpan
pushed a commit
to whatwg/html
that referenced
this pull request
Aug 24, 2026
The "exposed" concept filtered object and embed elements out of a Document's supported property names and named property lookup, based on fallback content state, object and embed descendants, and, recursively, object ancestors. No implementation matched it: Gecko ignored it entirely, while Blink and WebKit ignored fallback content state for lookup and ignored exposedness altogether for supported property names, so Object.getOwnPropertyNames(document) could report a name that resolved to undefined. Follow Gecko and drop the filtering. These are legacy features and choosing a corrected version of the nesting-based approximation is not worth the complexity. This removes the only use of "exposed". Tests: web-platform-tests/wpt#62149 Fixes #12787.
No browser implements the "exposed" filtering for document named properties consistently, and the nested-object assertions in nameditem-names.html fail everywhere. Follow the proposal in whatwg/html#12787 and stop distinguishing exposed from unexposed object and embed elements. Also add coverage for the named property value algorithm with nested object and embed elements, which had none: nameditem-names.html only exercises the supported property names algorithm, so the fact that implementations disagree between the two went untested. For whatwg/html#12787.
webkit-commit-queue
pushed a commit
to annevk/WebKit
that referenced
this pull request
Aug 24, 2026
… by exposedness https://bugs.webkit.org/show_bug.cgi?id=322330 Reviewed by Chris Dumez. The HTML specification's "exposed" concept, which no engine implemented consistently, is being removed: whatwg/html#12787 WebKit applied isExposed() when resolving a name but not when enumerating supported property names, so Object.getOwnPropertyNames(document) could report a name that resolved to undefined. Stop consulting it, matching Gecko. Two behavior changes: an object or embed element nested in an object element with the same name or id now matches alongside its ancestor, so lookup returns an HTMLCollection rather than the innermost element; and an object element with object or embed descendants is now reachable by its name and id. Tests imported from web-platform-tests/wpt#62149 Tests: imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-empty-name-dynamic-crash.html imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-img-name-added-cached-list.html imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-img-name-added.html imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-img-name-dynamic.html imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-img-name-removed.html imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-no-shadowing.tentative.html imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-tree-order.html Canonical link: https://commits.webkit.org/319699@main
annevk
force-pushed
the
document-named-properties-exposedness
branch
from
August 24, 2026 14:54
11185ac to
594a0da
Compare
annevk
enabled auto-merge (rebase)
August 24, 2026 14:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per the proposal in whatwg/html#12787, stop filtering
<object>/<embed>elements by exposedness for document named properties, matching Gecko.