mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Page:
Whistler Houdini1
Pages
Adding a new WebIDL binding
Alternative Logo Proposals and Related Swag
Asynchronous WebAssembly compilation project
Austin Oxidation
Autogeneration of style structs
Basic SVG support project
Beginner's guide to rebasing and squashing
Benchmarking
Benchmarks
Bots
Browser Engine Research
Build Errors FAQ
Buildbot administration
Building for Android
Building for Magic Leap
Building for UWP
Building on ARM desktop Linux
Building
CI Services we use
CSS parse error reporting
CSSOM student project
Canvas rendering project
Cargo upgrade service project
Code rust concurrency
Code Review
Code of Conduct
Coding standards
Compiler upgrade recipes
Compositor Layer Design
Contributing
Control Servo using WebDriver
Creating and viewing WARC web archives in Servo
Creating new OpenSSL Windows binary distributions
Cross compiling from linux to mac
Crowbot
Css selector matching meeting 2013 07 19
DOM Design
DOM documentation
DOM missing pieces
Debugging JS web compat issues
Debugging and editing tools
Debugging
Design
Developer tools student project
Devtools CSS errors
Devtools plans
Devtools
Diagnosing SpiderMonkey JIT issues
Eric Atkinson visit 2013 09 10
Events and sundry
Expand HTTP request response monitoring
Fetch improvement project
Firefox Reality release notes
FirefoxReality build
Firewall setup for servo master1
Focus student project
Form validation student project
GSoC project brainstorming
Garbage collected DOM
Getting started with layout
GitHub Labels
Github & Critic PR handling 101
Github workflow
Glossary
Governance
Graphics toolkit integration
HTML parser improvement project
HTMLElement binding conversion
HTTP archive support project
HTTP library requirements
Hawaii Rooting
High priority content for layout
Highfive
HoloLens 2 test plan
Home
How to generate GStreamer binaries for CI
Image load conformance student project
Image maps project
Implement HTML charset parsing project
Implement ImageBitmap project
Implement missing WebAudio automation student project
Implement support for missing XMLHttpRequest APIs
Implement worker modules
Implementing a web standard (RGSoC)
Improve specification conformance of unicode bidi library
Incremental flow tree construction
Infrastructure
Integrate xml5ever
Intern project brainstorming
Intern projects
JS objects, wrappers, and cross origin concerns 2013 08 07
Layout 2020
Layout Overview
Layout resources
Layout revamp ideas
Leo meyerovich visit 2013 07 22
Linux sandboxing
London Oxidation
London Security
Meeting 2014 10 27
Meeting 2014 12 08
Meeting 2012 02 08
Meeting 2012 02 16
Meeting 2012 07 20
Meeting 2013 04 01
Meeting 2013 04 15
Meeting 2013 04 22
Meeting 2013 04 29
Meeting 2013 05 06
Meeting 2013 05 13
Meeting 2013 05 20
Meeting 2013 06 03
Meeting 2013 06 10
Meeting 2013 06 14
Meeting 2013 06 17
Meeting 2013 06 24
Meeting 2013 07 01
Meeting 2013 07 15
Meeting 2013 07 22
Meeting 2013 07 29
Meeting 2013 08 05
Meeting 2013 08 12
Meeting 2013 08 19
Meeting 2013 09 09
Meeting 2013 09 16
Meeting 2013 09 23
Meeting 2013 09 30
Meeting 2013 10 14
Meeting 2013 10 21
Meeting 2013 10 28
Meeting 2013 11 04
Meeting 2013 11 18
Meeting 2013 11 25
Meeting 2013 12 02
Meeting 2013 12 09
Meeting 2013 12 16
Meeting 2014 01 06
Meeting 2014 01 13
Meeting 2014 01 21
Meeting 2014 01 27
Meeting 2014 02 03
Meeting 2014 02 10
Meeting 2014 02 24
Meeting 2014 03 10
Meeting 2014 03 17
Meeting 2014 03 24
Meeting 2014 03 31
Meeting 2014 04 07
Meeting 2014 04 14
Meeting 2014 04 21
Meeting 2014 04 28
Meeting 2014 05 05
Meeting 2014 05 13
Meeting 2014 05 19
Meeting 2014 06 09
Meeting 2014 06 17
Meeting 2014 06 23
Meeting 2014 06 30
Meeting 2014 07 07
Meeting 2014 07 14
Meeting 2014 07 21
Meeting 2014 07 29
Meeting 2014 08 04
Meeting 2014 08 11
Meeting 2014 08 12
Meeting 2014 08 18
Meeting 2014 08 25
Meeting 2014 09 08
Meeting 2014 09 15
Meeting 2014 09 22
Meeting 2014 09 29
Meeting 2014 10 06
Meeting 2014 10 13
Meeting 2014 10 20
Meeting 2014 11 10
Meeting 2014 11 17
Meeting 2014 11 24
Meeting 2014 12 15
Meeting 2015 01 05
Meeting 2015 01 12
Meeting 2015 01 26
Meeting 2015 02 09
Meeting 2015 02 23
Meeting 2015 03 02
Meeting 2015 03 16
Meeting 2015 03 30
Meeting 2015 04 06
Meeting 2015 04 13
Meeting 2015 04 27
Meeting 2015 05 04
Meeting 2015 05 11
Meeting 2015 05 18
Meeting 2015 06 01
Meeting 2015 06 08
Meeting 2015 06 15
Meeting 2015 07 06
Meeting 2015 07 13
Meeting 2015 07 27
Meeting 2015 08 10
Meeting 2015 08 17
Meeting 2015 08 24
Meeting 2015 08 31
Meeting 2015 09 14
Meeting 2015 09 21
Meeting 2015 09 28
Meeting 2015 10 05
Meeting 2015 10 12
Meeting 2015 10 19
Meeting 2015 10 26
Meeting 2015 11 02
Meeting 2015 11 09
Meeting 2015 11 16
Meeting 2015 11 30
Meeting 2016 01 04
Meeting 2016 01 11
Meeting 2016 01 25
Meeting 2016 02 01
Meeting 2016 02 08
Meeting 2016 02 22
Meeting 2016 03 07
Meeting 2016 03 21
Meeting Devtools Servo 2
Meetings
Microdata project
Minutes Hackathon 2012 03 27
Missing DOM features project
More ServiceWorker support project
More developer tools student project
Mozlandia Automation
Mozlandia B2S
Mozlandia JS
Mozlandia Rust In Gecko
Mozlandia WPT
Mozlandia gfx
Mozlando Devtools Servo
Mozlando Oxidation
Mozlando SM Servo
Mozlando Servo Bluetooth
Mozlando Servo MagicDOM
Mozlando Servo SMStrings
Mutation observer project
Mutation testing project
NCSU student projects
Network security project
Off main thread HTML parsing project
Offscreen canvas improvements project
Offscreen canvas project
Orlando Oxidation 2018
Oxidation 2015 11 05
Persistent sessions student project
Preparing ARM libraries for CI
Priority of CSS properties
Priority of DOM implementation
Priority of dom bindings
Private browsing student project
Profiling
Project proposal deadlines
Prototype JS form controls student project
Prototype ways of splitting the script crate
Publishing a new ANGLE NuGet version
Publishing a new app store release
Push vs Pull for caching
Random web content project
Refactor GLES2 student project
Refactor bluetooth support student project
Remaining work
Removing push notifications from IRC hooks
Replace C libraries student project
Report new contributors project
Representation of computed style
Research
Reviewer
Roadmap
Running Web Platform Tests on Servo
Rust HTML parser
Rust SpiderMonkey debugger API
Rust cssparser code walk 2013 08 02
SaltStack Administration
San Francisco Oxidation
Servo Benchmarking Report (December 2024)
Servo Benchmarking Report (November 2024)
Servo Benchmarking Report (October 2024)
Servo Layout Engines Report
Servo and SpiderMonkey Report
Servo for Gecko Developers
Specification Links
SpiderMonkey related tasks
SpiderMonkey infodump
SpiderMonkey upgrade details
Storage student project
Streaming webassembly student project
Strings
Student project brainstorm
Student projects
Styling overview
Stylo hacking guide
Summer of Code 2014: Implement XMLHttpRequest
Summer of Code 2016: Fetch API
Summer of Code 2016: File support
Summer of Code 2016: ServiceWorker infrastructure
Summer of Code projects
Summit meeting 2013 09 09
Support WebDriver based tests project
Syncing web platform tests (WPT)
TaskCluster
Testing
Tools
Tracking intermittent failures over time project
Transcription Notes from Servo Architecture talk in Suwon
Transcription notes from rust patterns talk in suwon
Transcription parallelism
Transcription rust concurrency
Transcription rust runtime
Transription layout and acid2
Trinity College Dublin student projects
UPenn student projects
Updating the Rust compiler used by Servo
Upgrading non taskcluster linux CI machines
Upgrading the UWP gstreamer binaries
Upgrading the windows LLVM binaries
Upgrading wptrunner
Using DOM types
Using Rust Spidermonkey Prototype
Using WebWorker Prototype
Version 0.1
Videos and presentations
WebAudio JS interfaces student project
WebAudio nodes student project
WebCompatBug
WebSocket student project
Webdriver student project
Webdriver tests student project
Webrender Overview
Whistler 2019 notes
Whistler Bugzilla
Whistler FFOS
Whistler GFX
Whistler Houdini1
Whistler Houdini2
Whistler Necko
Whistler Oxidation 2019
Work items for new contributors
Workweek COW DOM
Workweek alt js
Workweek android arm
Workweek boot 2 servo
Workweek compiler lints
Workweek displaylist
Workweek dogfooding
Workweek encoding
Workweek generated content
Workweek governance
Workweek graphics stack
Workweek graphics toolkit
Workweek incremental layout
Workweek js bindings status
Workweek layers
Workweek layers2
Workweek pixels
Workweek rasterization
Workweek reftests
Workweek roadmap
Workweek script crate
Workweek security
Workweek string interning
Workweek tables
Workweek writing modes
XML parser student project
infra triage notes
jQuery status
webxr.today support
Clone
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Agenda
- Specifically, we’re very interested in being able to implement some less-critical layout features in JavaScript in Servo and would like to chat with you about good candidate features and the practical subset of proposed Houdini features that we might want to prototype along the way. Two features ideas that we were thinking of are grid and SVG. We assume that we would at least have to implement some of the proposed CSS parser extensions and possibly some of the extensions allowing us to run JS during layout, but we’d like to have a deeper conversation before we invest any time in it.
What should we implement?
- larsberg: Idea is to find some subset of the houdini specs we can implement that would let us JS-implement some longer-tail features. e.g., Grid
- Simon: drafts: http://dev.w3.org/houdini/ [http://dev.w3.org/houdini/css-properties-values-api/ is the only spec with anything in it]
- wiki: https://wiki.css-houdini.org/
- Simon: At least CSS Properties and values and CSS Layout (which is the core of grid). Not sure the Box Tree API is relevant to Grid.
- jack: Is box tree the one that's basically a formalization of one browser's implementation.
- simon: No, it's read-only.
- jack: What can you get?
- larsberg: Actual margins, etc.
- simon: Anonymous boxes, sizing, etc. Less limited than getBoundingClientRects.
- jack: Requirements draft or set of references being used to develop these specs?
- simon: Lots of informal discussions, but no requirements document yet.
- mbrubeck: Brian Kardell gave some high-level motivations at https://dev.opera.com/articles/houdini/
- jack: What caused each of these specs to happen?
- larsberg: Simon's notes have the meeting minutes - http://www.mail-archive.com/dev-servo@lists.mozilla.org/msg01131.html
- simon: In Sydney, we had conversations about each of these specs. Regardless, for Grid layout we probably don't need Box Tree. Just Custom Layout and CSS Properties and values.
- larsberg: Not CSS Parser?
- simon: Entirely in JS requires Properties and values. But since we're doing this internally, we can do some parts in Rust and some in JS instead. In particular, properties parsing in the rust code is not hard, so maybe don't need that API for now.
- jack: So just implement the properties directly for Grid?
- SimonSapin: Why would we want to implement something like Grid in JS instead of Rust?
- larsberg: 1) To let people work on them who wouldn't otherwise, and 2) To manage complexity by modularizing features into JavaScript code, and try to limit the layout engine complexity to what we have today even as specs proliferate. The first point argues more for standardization. The second one could be beneficial for Servo even if it never becomes a web standard.
- jack: Blink implements some CSS properties in JS already, for example.
- SimonSapin: If you want to be able to do this completely outside the layout engine (no lines of Rust code), we need the CSS properties and values.
Does this mean script on layout?
- gw: Would we need a JS engine running on the layout thread?
- jack: We need to figure that out. It's not clear what they're envisioning.
- SimonSapin: Most of the JS APIs are planning to use some kind of worker.
- jack: But when does the layout worker start working? How does it coordinate efforts with the Rust layout code?
- SimonSapin: There's no concrete proposal for any of that yet.
- jack: The dream API for Servo would be that you write a traversal, and Servo schedules and calls your traversal functions. bubble_widths, assign_widths, etc.
- gw: Or not necessarily those; could allow arbitrary traversals and you just specify preorder, postorder, etc.
- jack: But we don't want to encourage people to use ones that don't parallelize.
- nrc: If LayoutWorker doesn't have access to the DOM, what does it lay out?
- pcwalton: API that allows you to lay out the flow.
- simon: Access to the read-only DOM, perhaps, as input.
GPU painting
- pcwalton: I had an interesting idea about painting... you could have a geometry shader that paints CSS borders.
- gw: And outputs triangles?
- pcwalton: Yeah.
- gw: Geometry shaders are still slow on mobile, though.
Next steps?
- larsberg: I don't see any show-stoppers here.
- jack: First thing: expose some version of our three functions to JS for callbacks and see how that goes. Then, we can integrate it into our current scheduler. Probably have to do some magic DOM stuff.
- simon: Definitely not a single callback from the Microsoft people. Definitely a few (compute intrinisic width; etc.).
- jack: Could have as many passes as we need.
- pcwalton: Each pass has overhead, though, to discover all your childern or otherwise just walk the whole tree (blowing the whole cache).
- jack: Sure, just pointing out that our infra handles it.
- larsberg: So, these callbacks are NOT called sequentially/blocking from our layout, right?
- jack: Yes. The callbacks are implemented in LayoutWorker threads, and are async.
- simon: Hard to be general enough with this API to allow any kind of element but parallelizable.
- jack: Still have to compute your height and width of the box.
- pcwalton: Impression I got is that you can have an API called top-down and bottom-up but as long as you can access your descendents by simply ignoring all of your descendents but the root. Hard case here is the Cassowary constraint-solver - it's a big dynamic programming algorithm to do layout.
- jack: Imagine there's lots of work you need to do. The inside of your box is layout code in Rust. So, bubble widths may just use the default pass.
- gw: Cassowary's incremental, though, right?
- mbrubeck: In the case where it is parallelizable, do we spin up one LayoutWorker per core?
- jack: Same thread pool we schedule work on now. Instead of calling Rust, call JS.
- mbrubeck: So, can you parallelize those? In JS, you can't have two threads accessing the same data structure, though.
- jack: The methods have to be similar to what we do in Rust; can't ask for children in top-down.
- pcwalton: If we have one JSContext per layout worker thread. Then, suppose you have a flow and the JS layout sets an expando property on it for internal state. Now, the kids, if they are on different threads, can't all access those same JS objects on different JSContexts.
- jack: But the flow tree is thread-safe!
- pcwalton: Flow tree is Rust and has specific threads. You can't transplant JS objects to other threads except via "brain transplant." If you store random properties on flows...
- jack: The question isn't if you can set the property; it's that you can't access them from other threads. Nobody else should be able to see the properties ...
- larsberg: The nodes you've completed are visible - in top-down you have problems.
- pcwalton: Children need to be able to read the info from parents and may get scheduled on other threads. Then you can't touch them from multiple threads. Maybe brain transplant will help? But I can't imagine we want to do that. And we would be breaking the GC and JIT constraints.
- simonsapin: Maybe SharedArray, but that’s only chunks of bytes, not objects...
- pcwalton: I think we need a simpler API.
- jack: Maybe TypedObject and have everything defined in advance.
- mbrubeck: How do you package up data to pass up the tree in the JS case?
- jack: It happens behind the scenes, because as you traverse the flow tree you can access the children.
- mbrubeck: But, if you are doing work, each time you process a child, you compute a width, getting a number, and at the root you want that info.
- jack: Each node of the flow tree will have a pointer to it.
- pcwalton: You probably also need a treewalking API to traverse your kids and access their data.
- jack: Your own void* (but safe!) data. With restrictions on how you can access parents or children.
- mbrubeck: So, you can't do JS-y stuff like appending to a shared array that gets passed around?
- jack: Right, you're passing stuff into the flow tree.
Overhead
- gw: Minimum overhead on a JSRuntime?
- jack: Too high because they don't do this in Gecko
- gw: Don't they have workers?
- jack: In Portland, the SM team said they plan to work on the memory usage
Restrictions
- jack: So, how do we restrict what code is allowed to write?
- mbrubeck: WebWorkers can only do postMessage with POD
- larsberg: How about just require the JS code serialize the results back into the Rust instance?
- mbrubeck: Exactly what I'm suggesting. They do JSON.serialize.
- jack: So TypedObjects similarly have requirements that you can't store arbitrary JS objects in?
- pcwalton: At worst, a string, but I think there are some other things we can do. Could do something like adoptNode, though I'd prefer not to go that route.
Something simpler than grid to do first
- larsberg: What's a smaller thing we could do to try out this infrastructure work? Marquee?
- jack: Images... hrm, no layout.
- mbrubeck: Want something with a tree. Maybe select or other form controls?
- simon: Are we also doing shadow dom?
- pcwalton: No. This and web components are probably not where we want to go right now.
- jack: Similar targets (create new tags), but not clear where shadow dom or web components are really going right now.
- pcwalton: Let’s do simple first-steps on Grid. Worried about doing something else.
- simon: Worried that we won’t test the whole API.
- larsberg: Just want something to check the architecture first. Can expand, but I’d like to have something that we can do in a quarter to check whether the architectural ideas even work.
Others to talk with?
- larsberg: Whom else do we need?
- pcwalton: bobby holley for some of this SM stuff.
- jack: Can we get support for these changes from other engines?
- larsberg: It sounds like it from the editors. Edge is interested in working on this; the others are not as active yet. We should include some of the editors in reviewing or implementing this work.
Any other next steps
- pcwalton: Probably factoring the script stuff so that layout can also spin up an engine. Just getting hello world appearing in layout will be a lot of technical work. After that, running layout algorithms is just mashing bits.