servo: Merge #10687 - Encourage better documentation patterns (from jdm:docs); r=larsbergstrom
authorJosh Matthews <josh@joshmatthews.net>
Tue, 19 Apr 2016 05:43:30 +0500
changeset 338563 ab8a19ec91968cd0605eb901a6e6526443b8d4b4
parent 338562 272dffbb3ab560069c32085786d1cf405eeb0d3f
child 338564 ea70c1cf2fb98f54650e076adcf67f236611f414
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslarsbergstrom
servo: Merge #10687 - Encourage better documentation patterns (from jdm:docs); r=larsbergstrom https://github.com/servo/servo/wiki/Glossary is really easy to overlook, so I want to move it in-tree. This also allows us to build a self-perpetuating system where people who are confused by something are encouraged to make a pull request that lets us know about this fact. Also, I have suspicions that a `docs/` directory is easier to notice than various markdown files scattered around the repository root. Source-Repo: https://github.com/servo/servo Source-Revision: 6509cdea95343615cfd569ade769efac6d177e41
servo/CONTRIBUTING.md
servo/HACKING_QUICKSTART.md
servo/ORGANIZATION.md
servo/README.md
servo/docs/HACKING_QUICKSTART.md
servo/docs/ORGANIZATION.md
servo/docs/glossary.md
--- a/servo/CONTRIBUTING.md
+++ b/servo/CONTRIBUTING.md
@@ -12,33 +12,33 @@ pull requests. Each pull request will be
 given feedback for changes that would be required. All contributions should
 follow this format, even those from core contributors.
 
 Should you wish to work on an issue, please claim it first by commenting on
 the GitHub issue that you want to work on it. This is to prevent duplicated
 efforts from contributors on the same issue.
 
 Head over to [Servo Starters](http://servo.github.io/servo-starters/) to find
-good tasks to start with.
+good tasks to start with. If you come across words or jargon that do not make
+sense, please check [the glossary](docs/glossary.md) first. If there's no
+matching entry, please make a pull request to add one with the content `TODO`
+so we can correct that!
 
-See [`HACKING_QUICKSTART.md`](HACKING_QUICKSTART.md) for more information
+See [`HACKING_QUICKSTART.md`](docs/HACKING_QUICKSTART.md) for more information
 on how to start working on Servo.
 
 ## Pull Request Checklist
 
 - Branch from the master branch and, if needed, rebase to the current master
   branch before submitting your pull request. If it doesn't merge cleanly with
   master you may be asked to rebase your changes.
 
 - Commits should be as small as possible, while ensuring that each commit is
   correct independently (i.e., each commit should compile and pass tests). 
 
-- Don't put submodule updates in your pull request unless they are to landed
-  commits.
-
 - If your patch is not getting reviewed or you need a specific person to review
   it, you can @-reply a reviewer asking for a review in the pull request or a
   comment, or you can ask for a review in `#servo` on `irc.mozilla.org`.
 
 - Add tests relevant to the fixed bug or new feature.  For a DOM change this
   will usually be a web platform test; for layout, a reftest.  See our [testing
   guide](https://github.com/servo/servo/wiki/Testing) for more information.
 
--- a/servo/README.md
+++ b/servo/README.md
@@ -2,17 +2,17 @@
 
 [![Linux Build Status](https://img.shields.io/travis/servo/servo/master.svg?label=Linux%20build)](https://travis-ci.org/servo/servo)  [![Windows Build Status](https://img.shields.io/appveyor/ci/servo/servo/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/servo/servo/branch/master)
 
 Servo is a prototype web browser engine written in the
 [Rust](https://github.com/rust-lang/rust) language. It is currently developed on
 64bit OS X, 64bit Linux, Android, and Gonk (Firefox OS).
 
 Servo welcomes contribution from everyone.  See
-[`CONTRIBUTING.md`](CONTRIBUTING.md) and [`HACKING_QUICKSTART.md`](HACKING_QUICKSTART.md)
+[`CONTRIBUTING.md`](CONTRIBUTING.md) and [`HACKING_QUICKSTART.md`](docs/HACKING_QUICKSTART.md)
 for help getting started.
 
 Visit the [Servo Project page](https://servo.org/) for news and guides.
 
 ## Prerequisites
 
 On OS X (homebrew):
 
rename from servo/HACKING_QUICKSTART.md
rename to servo/docs/HACKING_QUICKSTART.md
rename from servo/ORGANIZATION.md
rename to servo/docs/ORGANIZATION.md
new file mode 100644
--- /dev/null
+++ b/servo/docs/glossary.md
@@ -0,0 +1,35 @@
+# How to use this glossary
+
+This is a collection of common terms that have a specific meaning in the context of the Servo project. The goal is to provide high-level definitions and useful links for further reading, rather than complete documentation about particular parts of the code.
+
+If there is a word or phrase used in Servo's code, issue tracker, mailing list, etc. that is confusing, please make a pull request that adds it to this file with a body of `TODO`. This will signal more knowledgeable people to add a more meaningful definition.
+
+# Glossary
+
+### Compositor ###
+    
+The thread that receives input events from the operating system and forwards them to the constellation. It is also in charge of compositing complete renders of web content and displaying them on the screen as fast as possible.
+
+### Constellation ###
+
+The thread that controls a collection of related web content. This could be thought of as an owner of a single tab in a tabbed web browser; it encapsulates session history, knows about all frames in a frame tree, and is the owner of the pipeline for each contained frame.
+
+### Display list ###
+
+TODO
+
+### Layout thread ###
+
+A thread that is responsible for laying out a DOM tree into layers of boxes for a particular document. Receives commands from the script thread to lay out a page and either generate a new display list for use by the renderer thread, or return the results of querying the layout of the page for use by script.
+
+### Pipeline ###
+
+A unit encapsulating a means of communication with the script, layout, and renderer threads for a particular document. Each pipeline has a globally-unique id which can be used to access it from the constellation.
+
+### Script thread (alt. script task) ###
+
+A thread that executes JavaScript and stores the DOM representation of all documents that share a common [origin](https://tools.ietf.org/html/rfc6454). This thread translates input events received from the constellation into DOM events [per the specification](https://w3c.github.io/uievents/), invokes the HTML parser when new page content is received, and evaluates JS for events like timers and `<script>` elements.
+
+### Renderer thread (alt. paint thread) ###
+
+A thread which translates a display list into a series of drawing commands that render the contents of the associated document into a buffer, which is then sent to the compositor.