Closed Bug 1528883 Opened 1 year ago Closed 1 year ago

Rename CSSPseudoElement.parentElement to CSSPseudoElement.element

Categories

(Core :: DOM: Animation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: birtles, Assigned: birtles)

Details

Attachments

(2 files)

We added CSSPseudoElement.parentElement but after discussion the CSSWG decided to call it CSSPseudoElement.element. We should update our implementation we can also align WPT for this.

Spec issue: https://github.com/w3c/csswg-drafts/issues/2816
Spec change: https://github.com/w3c/csswg-drafts/commit/2dbf1e44a6f952ac7c626c8baba5f66900d32c89

It's possible that CSSPseudoElement will grow a 'ownerDocument' member in future
so instead we should test for '.element'. We could also test for '.type' but it
seems more likely that Element will grow a 'type' member than an 'element'
member.

Ideally we should really test if the target is an instanceof CSSPseudoElement
but unfortunately the window() getter it itself defined in terms of the node()
getter (which calls isPseudoElement) so we'd end up with unbounded recursion
unless we restructure these getters.

Depends on D20427

Pushed by bbirtles@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f35e52301a45
Rename CSSPseudoElement.parentElement to CSSPseudoElement.element; r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/417bde7df0b6
Make isPseudoElement test for .element instead of .ownerDocument; r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/15544 for changes under testing/web-platform/tests
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.