Stylo
This repo contains Servo’s downstream fork of Stylo, the CSS engine used by Servo and Firefox (Gecko). Stylo is a full CSS engine that implements both parsing and style resolution.
The branches are as follows:
upstreamhas upstream mozilla-central filtered to the paths we care about (style.paths), but is otherwise unmodifiedmainhas our downstream patches, plus the scripts and workflows for syncing with mozilla-central, to be rebased ontoupstream
Building Servo against your local Stylo
Assuming your local servo and stylo directories are siblings, you can build servo against stylo by adding the following to servo/Cargo.toml:
[]
= { = "../stylo/derive_common" }
= { = "../stylo/malloc_size_of" }
= { = "../stylo/selectors" }
= { = "../stylo/servo_arc" }
= { = "../stylo/atoms" }
= { = "../stylo/size_of_test" }
= { = "../stylo/style_static_prefs" }
= { = "../stylo/style_config" }
= { = "../stylo/style_derive" }
= { = "../stylo/style" }
= { = "../stylo/style_traits" }
Syncing upstream with mozilla-central
Start by generating a filtered copy of mozilla-central. This will cache the raw mozilla-central in _cache/upstream, storing the result in _filtered:
If _filtered already exists, you will need to delete it and try again:
Now overwrite our upstream with those commits and push:
Rebasing main onto upstream
Start by fetching upstream into your local repo:
In general, the filtering process is deterministic, yielding the same commit hashes each time, so we can rebase normally:
But if the filtering config changes or Mozilla moves to GitHub, the commit hashes on upstream may change. In this case, we need to tell git where the old upstream ends and our own commits start (notice the ~):
start-rebase.sh takes care of this automatically, but you should still use git rebase for subsequent steps like --continue and --abort:
Or if we aren’t ready to rebase onto the tip of upstream: