Closed
Bug 1355106
Opened 8 years ago
Closed 4 years ago
stylo: Consider adding support for UTF-8-encoded string parameters in WebIDL, for CSSOM
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: SimonSapin, Unassigned)
References
(Blocks 1 open bug)
Details
Continuing from https://bugzilla.mozilla.org/show_bug.cgi?id=1354566#c3
SpiderMonkey strings can be stored as Latin-1, and currently the WebIDL bindings layer converts them to UTF-16. Then Stylo’s CSSOM implementation converts UTF-16 to UTF-8.
If we add support in WebIDL for UTF-8 strings, Latin-1 strings could be converted directly to UTF-8 by the WebIDL bindings, thus avoiding the time spent doing two conversions.
This is tricky as long as we support two style systems, unless we’re willing to pay the cost for an opposite conversion for non-Stylo.
Reporter | ||
Updated•8 years ago
|
Blocks: stylo-perf
I think we should do this.
(Aside: Then TextEncoder should do its conversion step entirely on the binding layer.)
Comment 2•8 years ago
|
||
Performance optimization - defaulting to P4, but feel free to promote it if we're actively pursuing it to solve any of the P1 performance targets.
Priority: -- → P4
Reporter | ||
Comment 3•8 years ago
|
||
In terms of WebIDL syntax, this could be a non-standard extended attribute:
interface Foo {
void bar([MozUTF8] USVString baz);
};
(Well-formed UTF-8 excludes surrogates, which matches the USVString type. Something similar for DOMString that would preserve all possible value would need to use WTF-8. Whether we want to use WTF-8 at all is bug 1355101.)
Reporter | ||
Comment 4•8 years ago
|
||
This should be the default for the newly-added CSSOMString type: https://github.com/w3c/csswg-drafts/pull/1266
Depends on: 1355101
As part of bug 1402247, I'm developing some functions that could help with this.
Comment 6•7 years ago
|
||
status-firefox57=wontfix unless someone thinks this bug should block 57
status-firefox57:
--- → wontfix
Comment 7•7 years ago
|
||
Now that the old style system has gone, we should try to fix this.
Do we want to make bug 1449861 duplicate of this one and move this to the binding component or make this one about making Stylo use the new binding feature (i.e. dependent on bug 1449861)?
Comment 9•7 years ago
|
||
I think either way works, as far as CSSOM is the only usecase at the moment.
Comment 10•4 years ago
|
||
We have this now.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•