layout: Unify the block-size computation for blocks and floats.

The float code was old and did not support most of CSS 2.1. So unifying
the two paths both simplifies code and improves functionality.

Improves the Reddit sidebar.
Merge pull request #3472 from pcwalton/unify-block-and-float-layout

layout: Unify the block-size computation for blocks and floats.

Reviewed-by: glennw
Merge pull request #3398 from glennw/config-res

Allow resolution to be configured on command line. Default to 1280x1024.

Reviewed-by: SimonSapin
layout: Enhance the heuristic that guesses the inline size of block
formatting contexts.

The widths of block formatting contexts depend on the floats prior to
them. To avoid a circular dependency between width assignment and height
assignment, we must guess their widths during the assign-widths pass.
The old code simply used the size of the last float, whether
left-floated or right-floated, but this proved insufficient to handle
layouts like those seen on Reddit. The new heuristic keeps track of both
left and right floats independently and sums the width of all left and
right floats to determine the width of a block formatting context. This
is still insufficient to properly lay out Reddit, but the results are
much more acceptable.

A fully correct approach will require that blocks be laid out again if
the initial guess proved to be incorrect. A `TODO` is in the code to
handle this case.
Merge pull request #3467 from pcwalton/enhance-block-formatting-context-guess

layout: Enhance the heuristic that guesses the inline size of block formatting contexts.

Reviewed-by: glennw
Improve acid2. Fix line height calculation. Text fragments get correct enclosing element style.

* Enabled acid2 on mac + linux. Updated the reference image. The only difference from the
real acid2 now is the paint order and a 1 pixel horizontal offset on the nose.
* Change line-height to be calculated correctly.
* Apply enclosing element style to text fragments.
layout: Block formatting contexts should contain all their floats.

Improves Pinterest considerably.
Merge pull request #3483 from pcwalton/block-formatting-contexts-containing-floats

layout: Block formatting contexts should contain all their floats.

Reviewed-by: glennw
Don't render backgrounds for text fragments.
Made some DOM fields private.

Relevant to #2242.
layout: Support any `display` property in generated content, and allow
tables to clear floats.

Improves the GitHub header.
Improve the correctness of Root lifetimes

Use the new lifetime bounds feature of Rust to enforce that the
RootCollection field of Root outlives the jsref field. This still
doesn't enforce that the Root itself outlives the jsref field, and
doing this would require some sort of init dance.
Fix /python/servo code formatting.

(My editor screams at me for flake8 lint errors.)
Convert &JSRef -> JSRef for the PrivateNodeHelpers trait
Convert &JSRef -> JSRef in DisabledStateHelpers
Merge pull request #3494 from SimonSapin/flake8

Fix /python/servo code formatting.

Reviewed-by: larsbergstrom
Handle dynamic addition of attributes

Handles dynamic addition of attributes to <link rel=stylesheet>
elements.

Fixes #3361
Merge pull request #3495 from zwarich/private-node-helpers-jsref

Convert &JSRef -> JSRef for the PrivateNodeHelpers trait

Reviewed-by: jdm
Merge pull request #3432 from gilles-leblanc/issue-3361

Handle dynamic addition of attributes

Reviewed-by: jdm
Merge pull request #3489 from ProgramFOX/issue2242-2

Made some DOM fields private.

Reviewed-by: jdm