Instead of waiting to create the root layer, create them as soon as the
Compositor receives the frame tree. This allows the compositor to
create a layer tree skeleton of which to hang the base layers when they
are ready.
The font cache previously kept weak references to the fonts,
however in layout these fonts are dropped before they are
referenced again, so no caching was being used.
For now, just hold a strong reference in the cache, which means
that fonts will never be thrown out (this will need to be fixed
in the future).
This fixes the visual artifacts seen at the top of wikipedia pages by:
- Setting clipping rect to avoid images going outside their bounds.
- Handling case of background-position being >= 100% such that wrapping is required.
However, the gradient is not currently visible on wikipedia. This relies on bug #1997 being fixed.
When calculating the preferred width for a block, accumulate
the left and right float widths of children separately, which
is then max'ed with the normal flow widths later on.
Ref bug #2554 - improves the layout of the top bar.
The freetype hinting only works on integer pixel sizes. For this
reason, the advance width metrics for a font of size 12.99 are
the same as the advance metrics for a font of size 12.0. This
results in small fonts appearing to overlap slightly, which is
particularly noticeable on parts of Wikipedia. Round the font
size up to a pixel boundary inside the freetype system.
Also fetch the system default fonts for the generic font families
rather than hard coding them.
These two changes make the font rendering on Linux very close
to the Firefox font rendering on Wikipedia.