Investigate replacing the JS CSS lexer with Stylo's lexer in WebAssembly
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: jryans, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: [designer-tools][stylo-])
Reporter | ||
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 3•7 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Updated•2 years ago
|
Comment 5•1 year ago
|
||
In some early analysis for Bug 1836873 , I came across our JS-written CSS lexer again, which I guess should be modified to account for the new syntax added for CSS Nesting.
I was wondering if that would be a good time to try to revive this specific bug instead of replicating work that was already done on the platform.
Another solution that we could consider is to allow (privileged) JS to directly call the Stylo Lexer, so we won't have to go through the WASM conversion (at the time this bug was created, we wanted to get rid of privileged code in DevTools, but this isn't the case anymore).
Emilio, what do you think about this? Does this sounds like something that would be hard to do/not worth the benefit?
Comment 6•1 year ago
|
||
What kind of API would you need from the platform? cssparser is rather standalone so compiling to wasm shouldn't be hard in theory... But if a WebIDL/XPIDL api is simpler that's fine too. Do you just want a tokenized range of source text? Something else
Comment 7•1 year ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)
What kind of API would you need from the platform? cssparser is rather standalone so compiling to wasm shouldn't be hard in theory... But if a WebIDL/XPIDL api is simpler that's fine too. Do you just want a tokenized range of source text? Something else
Yeah a tokenizer would be great so we can replace https://searchfox.org/mozilla-central/rev/27e4816536c891d85d63695025f2549fd7976392/devtools/shared/css/parsing-utils.js#42-111
Updated•1 year ago
|
Updated•1 year ago
|
Description
•