WebKit contribution notes #
In the process of making several WebKit PRs, I've needed to keep notes on what or how to do various things -- mostly because I'm not working frequently enough in the repo to have this become muscle memory. The notes are pretty raw, but its mostly meant to be a quick scan resource.
Notes #
- Docs
- There's one docs website WebKit Getting Started
- But then there's also another docs website that's a bit better WebKit Documentation
- And the intro is helpful too WebKit Introduction
- Setup git
git-webkit setup- Git Config
- Building:
- make sure you’re on the latest stable xcode. I unknowingly was behind several versions and it was breaking builds
- default:
Tools/Scripts/build-webkit --debug
- to help fix build issues, try
Tools/Scripts/build-webkit --clean
- Running:
- minibrowser seems a bit more common minibrowser documentation
run-minibrowser --debug- Using minibrowser shows the port the browser is running on, and then you can use XCode to attach a debugger to that port.
- Much easier to learn new codebases when you can get a debugger attached and set breakpoints!
- minibrowser seems a bit more common minibrowser documentation
- Import the WPT test updates:
- WPT Tests documentation
Tools/Scripts/import-w3c-tests -t web-platform-tests/css/css-conditional/container-queries/
- Run WPTs
run-webkit-tests --debug imported/w3c/web-platform-tests/css/css-conditional/container-queries/container-for-shadow-dom.html- how to update WPTs after changes:
--reset-resultsto above command
- for WPTs that already exist, it’s nice to just run them by navigating to the live page
- Create an issue at bugs.webkit.org
- Even if it’s just to sync WPT, that seems to be preferred. e.g.
- Submit PRs
- submitting a pull request
git add -A(if necessary)git webkit pr --issue {issue}- this should help create a PR, but it’s broken on my machine unfortunately so I have to do it manually