Closed Bug 1917783 Opened 1 year ago Closed 1 year ago

Implement `TrustedTypePolicyFactory`'s `getAttributeType`

Categories

(Core :: DOM: Security, task)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: mbrodesser, Assigned: fredw)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [domsecurity-backlog], [wptsync upstream])

Attachments

(4 files)

Whiteboard: [domsecurity-backlog]
Assignee: nobody → fwang
Depends on: 1917784

This overlaps a bit with the following tests:
TrustedTypePolicyFactory-getAttributeType-namespace.html
TrustedTypePolicyFactory-getAttributeType-svg.html

Attachment #9431822 - Attachment description: WIP: Bug 1917783 - Add more WPT tests for elementNS/attrNs parameters of `getPropertyType` → Bug 1917783 - Add more WPT tests for elementNS/attrNs parameters of `getPropertyType`. r=mbrodesser-Igalia
Attachment #9431520 - Attachment description: WIP: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType` → Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug
Attachment #9431822 - Attachment description: Bug 1917783 - Add more WPT tests for elementNS/attrNs parameters of `getPropertyType`. r=mbrodesser-Igalia → Bug 1917783 - Add more WPT tests for elementNS/attrNs parameters of `getAttributeType`. r=mbrodesser-Igalia
Attachment #9431822 - Attachment description: Bug 1917783 - Add more WPT tests for elementNS/attrNs parameters of `getAttributeType`. r=mbrodesser-Igalia → Bug 1917783 - Add more WPT tests for elementNS/attrNs parameters of `getAttributeType`. r=smaug
Depends on: 1925952
Attachment #9431520 - Attachment description: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug → WIP: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug
Attachment #9431520 - Attachment description: WIP: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug → Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug

The spec is not really clear, for now add a tentative test with the
cases detected while implementing the method in Firefox. For details,
see https://github.com/w3c/trusted-types/issues/520

Attachment #9431520 - Attachment description: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug → WIP: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug
Attachment #9431520 - Attachment description: WIP: Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug → Bug 1917783 - Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug
Blocks: 1926286
Pushed by fwang@igalia.com: https://hg.mozilla.org/integration/autoland/rev/d9c1c805ef2d Add more WPT tests for elementNS/attrNs parameters of `getAttributeType`. r=smaug https://hg.mozilla.org/integration/autoland/rev/474afb5197ff Add WPT tests for getAttributeType with event handler content attributes. r=smaug https://hg.mozilla.org/integration/autoland/rev/aba2bd9d817f Add WPT test for getAttributeType() with qualified attribute name. r=smaug https://hg.mozilla.org/integration/autoland/rev/51f5ff4856dc Implement `TrustedTypePolicyFactory`'s `getAttributeType`. r=smaug
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Flags: needinfo?(james)
Flags: needinfo?(aborovova)
Whiteboard: [domsecurity-backlog] → [domsecurity-backlog], [wptsync upstream error]
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48767 for changes under testing/web-platform/tests
Whiteboard: [domsecurity-backlog], [wptsync upstream error] → [domsecurity-backlog], [wptsync upstream]
Flags: needinfo?(james)
Flags: needinfo?(aborovova)
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot
Keywords: dev-doc-needed

:fredw do you want to nominate this for a release note? (Process info)

Flags: needinfo?(fwang)

I think this is only a small method from the Trusted Types spec, so probably not worth nominating it.

Flags: needinfo?(fwang)

(In reply to Frédéric Wang (:fredw) from comment #13)

I think this is only a small method from the Trusted Types spec, so probably not worth nominating it.

Also be aware that the method is guarded by a default-disabled pref ([1], [2]).

[1] https://searchfox.org/mozilla-central/rev/783f3fca1dda58353f7d3075744dd48b66e00e5e/dom/webidl/TrustedTypes.webidl#47,55
[2] https://searchfox.org/mozilla-central/rev/783f3fca1dda58353f7d3075744dd48b66e00e5e/modules/libpref/init/StaticPrefList.yaml#3947,3949

Right, but that does not seem to prevent a feature from being nominated:

If your feature is ready for testing on the nightly channel but is behind a feature flag and it isn't planned to ship on Beta/Release soon, please nominate it so that we can expose it to our nightly testers.

(In reply to Frédéric Wang (:fredw) from comment #15)

Right, but that does not seem to prevent a feature from being nominated:

If your feature is ready for testing on the nightly channel but is behind a feature flag and it isn't planned to ship on Beta/Release soon, please nominate it so that we can expose it to our nightly testers.

Right.

Since support of many APIs with Trusted Types still has to be implemented, I suggest notifying Nightly testers later. Possibly when all APIs for non-Worker code are implemented. Or when another reasonably usable set of APIs is implemented.

FF133 MDN docs for this can be tracked in https://github.com/mdn/content/issues/36559. As this is very minimal implementation, mostly that is just a compatibility data update, and an experimental features doc section that just makes it clear that there is a lot more to come (essentially, a placeholder).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: