For now, we only avoid the repetition when we have no-repeat for x and y
axes. We could do this when the painting area is smaller than the image and
when the position doesn't require a repetition. But… Who cares?
Fix#238.
There was also a bug in the size of the surface needed to draw images that are
not repeated. Before this commit, the repeat size was the painting size * 2 to
avoid glitches at the boundaries. But we have to be sure to draw at least the
whole image, as the image may be translated before being drawn. The
multiplication is not needed as we don't repeat the image anymore.
Related to #669.
The spec says that we can do what we want to improve the rendering in such
cases. Adding a line would probably give exactly the same rendering as if there
were text, but the difference is so small that there's no need to hack the
formatting structure and keep the fix in 3 small lines during the layout.
Fix#873.
Example:
~~~html
<style>
p {
text-decoration: underline green dotted;
}
span {
color: red;
text-decoration: underline red dotted;
}
</style>
<p> Lorem <span>ipsum</span> dolor sit amet, <span>consectetur</span>
adipiscing elit, sed do eiusmod tempor <span>incididunt</span> ut
labore et dolore <span>magna aliqua</span>. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
~~~
"If a row has no cell box aligned to its baseline, the baseline of that row is
the bottom content edge of the lowest cell in the row."
Related to #867.
As the children's layout has not been done yet, their own children are not yet
positioned and thus can't be translated. We have to change the child position
instead and let the child layout move its own children.
Fix#811.
To fix#860 and #851, we decided to move block children a little bit to keep
them in the page. It's a bad idea, because children position is altered (and it
breaks many tests, by the way).
Increasing the allowed max_position_y is a better workaround as it doesn't
move blocks.
Here's another floating point rounding error we have to deal with. The original
issue comes from flex layout, but there are probably plenty of rounding
problems in other flows, so it's safe to put the workaround here.
Fix#851.
It will only be ignored while drawing, but it doesn't harm to keep the value
and makes code and tests more readable.
Also use a set instead of a frozenset to store text-decoration-line, bringing
more readability even if it may be a little, little, little bit slower.