Intent to Implement and Ship: Update of "xml" prefix handling in lookupNamespaceURI() and createNSResolver()

70 views
Skip to first unread message

TAMURA, Kent

unread,
Apr 25, 2023, 6:50:19 PM4/25/23
to blink-dev

Contact emails

tk...@chromium.org

Explainer

None

Specification

https://dom.spec.whatwg.org/#locate-a-namespace

Summary

Node.lookupNamespceURI() supports "xml" and "xmlns" prefixes by default. The function returns fixed namespace strings for them. Document.createNSResolver() and XPathEvaluator.createNSResolver() stops to wrap the specified node to add "xml" prefix handling. They return the specified node as is. Web developers can use an element as an XPathNSResolver without wrapping it with createNSResolver().



Blink component

Blink>DOM

TAG review

None.  Two other browsers already shipped this.

TAG review status

Not applicable

Risks



Interoperability and Compatibility

The risk is low. Firefox has had this behavior for a long time, and Safari has adopted the behavior. This feature has an incompatible change on createNSResolver(). If a disconnected non-element node is specified to createNSResolver(), the resultant object has no "xml" prefix support any longer. We have a UseCounter for such a case, and the counter value is 0.0. https://chromestatus.com/metrics/feature/timeline/popularity/4475



Gecko: Shipped/Shipping

WebKit: Shipped/Shipping (https://commits.webkit.org/260848@main)

Web developers: No signals

Other signals:

WebView application risks

None



Debuggability



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes
https://wpt.fyi/results/domxpath/xpathevaluatorbase-creatensresolver.html
https://wpt.fyi/results/dom/nodes/Node-lookupNamespaceURI.html

Flag name



Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1418215

Estimated milestones

Shipping on desktop115
Shipping on Android115
Shipping on WebView115


Anticipated spec changes



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5143218561220608

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.

--
TAMURA Kent
Software Engineer, Google


Mike West

unread,
Apr 26, 2023, 11:28:55 AM4/26/23
to TAMURA, Kent, blink-dev
LGTM1.

Testing looks good, and skipping the TAG review for features specified and shipped in other browsers is pretty reasonable. The flat UseCounter also gives me confidence. :)

-mike


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGH7WqGqrLAR9_dhH0XPiC0T57xBHuRcqTf7934Ap4vbNB5Ngw%40mail.gmail.com.

Mike Taylor

unread,
Apr 26, 2023, 3:11:16 PM4/26/23
to Mike West, TAMURA, Kent, blink-dev

Philip Jägenstedt

unread,
Apr 27, 2023, 6:29:46 AM4/27/23
to Mike Taylor, Mike West, TAMURA, Kent, blink-dev
LGTM3, thanks for measuring with use counter and aligning with Gecko and WebKit on this.

Reply all
Reply to author
Forward
0 new messages