Closed Bug 1577660 Opened 5 years ago Closed 5 years ago

Rename `HTMLOrSVGOrXULElementMixin` to `HTMLOrForeignElement`

Categories

(Core :: DOM: Core & HTML, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: e7358d9c, Assigned: fredw)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

This change isn’t detectable by JavaScript code running on the web and both Chromium and WebKit have already done so.

Note that it's currently named HTMLOrSVGOrXULElementMixin, and it's actually not a mixin and it actually does not contain the whole IDL attributes (most are duplicated in each interface):

https://searchfox.org/mozilla-central/source/dom/webidl/Element.webidl#165

So there is a bit more work to do...

and it's actually not a mixin

That can just get fixed. We support the mixin syntax now, but we just haven't converted things over to it yet.

But yes, it's not just a rename to align with the spec here. That said, the changes should be non-web-observable until we start including that mixin in MathMLElement.

Assignee: nobody → fred.wang
Status: NEW → ASSIGNED
Summary: Rename `HTMLOrSVGElement` mixin to `HTMLOrForeignElement` → Rename `HTMLOrSVGOrXULElementMixin` to `HTMLOrForeignElement`

@Boris: Can you please take a quick look at https://phabricator.services.mozilla.com/D44879 before I try to do more on this?

I think extended attributes are a bit inconsistent between SVG/HTML/XUL and the XUL class lacks the dataset attribute. So these are likely behavior changes. Not sure how important it is and whether that should be tested...

Flags: needinfo?(bzbarsky)

Adding dataset to XULElement should be fine. Yes, it's a behavior change. I wouldn't worry about it.

The [Constant] vs [SameObject] on dataset on HTMLElement and SVGElement doesn't matter: those are aliases for practical purposes if the type is a type SameObject can apply to. [Constant] predates the existence of [SameObject] in specs.

The lack of [CEReactions] on tabIndex on SVG/XUL is likely a bug we have right now, and yes, we may want to add some tests for that. The lack of [Pure] on the XUL version is not web-observable.

Flags: needinfo?(bzbarsky)

(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #5)

The lack of [CEReactions] on tabIndex on SVG/XUL is likely a bug we have right now, and yes, we may want to add some tests for that.

Thanks. Regarding this one, is it actually testable? AFAIK one cannot create custom SVG/XUL elements? I took a quick look at testing/web-platform/tests/custom-elements/reactions/ and IIUC all the tests end up creating custom HTML elements in testReflectAttributeWithContentValues().

Flags: needinfo?(bzbarsky)

You can definitely create custom XUL elements; that's what we're using to replace XBL.

I think you're correct that right now you can't create custom SVG elements. So maybe this is not worth worrying about.

Flags: needinfo?(bzbarsky)

(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #7)

You can definitely create custom XUL elements; that's what we're using to replace XBL.

OK I've learned something today :-)

I think you're correct that right now you can't create custom SVG elements. So maybe this is not worth worrying about.

Thanks. Then I think I only need XUL tests for tabIndex reaction & dataset.

I wouldn't worry about those too much, since XUL is not web-exposed and we are working on getting rid of it anyway.

Attachment #9090798 - Attachment description: Bug 1577660 - Rename `HTMLOrSVGOrXULElementMixin` to `HTMLOrForeignElement` → Bug 1577660 - Rename `HTMLOrSVGOrXULElementMixin` to `HTMLOrForeignElement`. r=bzbarsky
Keywords: checkin-needed

Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/85efdc31cf55
Rename HTMLOrSVGOrXULElementMixin to HTMLOrForeignElement. r=bzbarsky

Keywords: checkin-needed
Depends on: 1414372
See Also: → 1579457
Blocks: 1574195
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: