This change updates a large number of reftests to link to the
`/fonts/ahem.css` stylesheet. Each file contains a single additional
line before the first `<style>` element:
```
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
```
Differential Revision: https://phabricator.services.mozilla.com/D35958
--HG--
extra : moz-landing-system : lando
reftest manifests have ordering issues, re-organizing the fuzzy-if/random-if clauses to allow random-if to work.
Differential Revision: https://phabricator.services.mozilla.com/D36031
--HG--
extra : moz-landing-system : lando
mark w3c-css/submitted/variables/variable-external-font-face-01.html as random-if on win7/debug
Differential Revision: https://phabricator.services.mozilla.com/D35653
--HG--
extra : moz-landing-system : lando
We're seeing occasional fuzzy-mismatch failures with a single pixel differing,
where an antialiased "a" serif overlaps an adjacent table border. Hopefully a
sans-serif font will reduce the likelihood of this fuzziness.
Differential Revision: https://phabricator.services.mozilla.com/D35266
--HG--
extra : moz-landing-system : lando
This patch implements the majority of the planned picture caching
improvements. It supports most of the functionality required to
(as a follow up) support OS compositor integration. It also improves
on the robustness and functionality of the previous picture caching
implementation.
There are some expected temporary performance regressions in
some cases (such as content that is constantly invalidating) and
during initial page render when many render targets must be drawn
to. These performance regressions will be resolved in follow up
commits by supporting multi-resolution tiles.
The scene is split into a number of slices, determined by the scroll
root of each primitive, which can be found by the primitive's
spatial node indices. If a scene contains too many slices, then
picture caching is disabled on the page, to avoid excessive texture
memory usage, and rendering falls back to rasterizing each frame.
The specific changes in this patch are:
* Support tile caches for multiple scroll roots, allowing the
entire page (including fixed divs and the main UI bar) to be
cached in most cases, in addition to the main content.
* Remove requirement to read tiles back from the framebuffer.
Instead, they are drawn into the picture cache target tiles,
and blitted to the screen. This is slightly slower than the
existing picture caching when content is constantly changing,
however this cost will disappear / become irrelevant when
the OS compositor integration work is complete.
* Switch picture cache render targets to be nearest sampled (they
are always rendered 1:1) and support depth buffer targets.
* Make use of the external scroll offset support to allow removal
of the primitive correlation hacks in the previous picture
caching implementation. Also allows storing of primitive
dependencies in picture space rather than world space, which
reduces floating point inaccuracies.
* Determine if each tile and picture cache can be considered
opaque. This is used to determine whether subpixel AA text
rendering is available on a slice, and for rendering optimizations
related to disabling blending and/or tile clears.
* Use the clip chain instance results from the recent visibility pass
work to determine clip chain dependencies. This results in fewer
clip item dependencies in tiles, which is faster to check validity
and reduces redundant invalidations.
* Remove extra overhead during batching related to batch lists,
and region iteration, as they are no longer required.
* Support PrimitiveVisibilityMask during batching. This allows a
single traversal of a picture (surface) root during batching to
efficiently construct multiple alpha batcher objects (typically
one per invalida tile).
* Picture caching is now handled implicitly by WR, depending on
the content of the scene. There is no requirement for client
code to manually select which stacking context should be cached.
* Simplify how clip chain / transform dependencies are tracked by
picture cache tiles.
* Support pushing / popping enclosing clip chain roots without
the need for a stacking context / picture in some cases. This
simplifies the logic to split the scene into multiple slices.
The main remaining work in this area is (a) extend the code to
optionally provide each slice as an input to the OS compositor
rather than drawing the tiles in WR, and (b) support multi-resolution
tiles so that we reduce the draw call, batching and render target
overhead in cases where much of the page content is changing.
Differential Revision: https://phabricator.services.mozilla.com/D34319
--HG--
extra : moz-landing-system : lando
There are a number of failures, for which I've filed separate bugs.
And then a lot of fuzziness. I manually inspected the reftest analyzer
results on try pushes to distinguish failures vs fuzziness.
Depends on D34537
Differential Revision: https://phabricator.services.mozilla.com/D34538
--HG--
extra : moz-landing-system : lando
We previously (in bug 1491235) adjusted some utility code to make
layout-contained frames behave as if they have no baseline.
But that's not sufficient. To make frames fully report lack-of-a-baseline,
we now do the following for layout-contained frames, as of this patch:
(a) We now leave the ReflowOutput outparam's BlockStartAscent member at its
default value (which is what we do for frames without a baseline like
e.g. nsCheckboxRadioFrame and nsHTMLCanvasFrame). And if the parent cares
about the baseline, it'll then ask directly, using a baseline getter.
(b) We now return 'false' in more implementations of bool-returning
baseline-getter-methods (where 'false' indicates 'no baseline').
(c) We now return the margin-box-bottom edge, in the nscoord-returning
'GetLogicalBaseline()' getter method. (We typically do this by deferring
to the inherited method, which ultimately comes from nsFrame's
implementation). It's appropriate to use the margin-box-bottom edge when
there's no baseline, per the definition of 'vertical-align: baseline',
here: https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align
Depends on D32182
Differential Revision: https://phabricator.services.mozilla.com/D32183
--HG--
extra : moz-landing-system : lando
In particular:
- In contain-layout-suppress-baseline-002.html, the test currently indirectly
relies on the 50px-tall-canvas being the tallest thing in each flex
container. This isn't robustly true (and in fact on windows, the textarea is
taller at 50.8px tall). So I'm adjusting this test so that it no longer has a
hardcoded flex container size and no longer depends on this.
- In contain-layout-baseline-005.html and its reference case, we need to
explicitly specify 'vertical-align:baseline' to test baseline-alignment,
because some of its tested form controls have other UA-stylesheet-provided
default values of 'vertical-align'.
(e.g. <select multiple> defaults to 'vertical-align:text-bottom")
- Also: in that same test, we need to reduce the width of the an <input>
textfield -- otherwise, it and the other elements on its line may not fit and
may linewrap, which prevents us from effectively testing baseline-alignment
on the linewrapped element.
- In contain-layout-button-001.html, the expectation was not correct. Before
this patch, the test expects that a layout-contained button will have the
same baseline as an empty button, and that's an invalid expectation. An empty
button uses a point inside of its content-box as its baseline, whereas a
layout-contained element *has no baseline*, which means that it does
'vertical-align:baseline' alignment by aligning its own margin-bottom edge
with the parent's baseline, per
https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align
So, I'm amending the test to have this expectation and updating its meta tags
to reference the updated expectation and with a reference to that spec text.
Firefox fails the amended contain-layout-button-001.html test, so this patch
adds a .ini file to reflect that failure. The next patch in this series will
fix our implementation to make us pass the test, and will remove the .ini file.
Chrome also fails the amended contain-layout-button-001.html tests, and I filed
https://bugs.chromium.org/p/chromium/issues/detail?id=965740 on them with an
explanation.
Differential Revision: https://phabricator.services.mozilla.com/D32182
--HG--
extra : moz-landing-system : lando
We previously (in bug 1491235) adjusted some utility code to make
layout-contained frames behave as if they have no baseline.
But that's not sufficient. To make frames fully report lack-of-a-baseline,
we now do the following for layout-contained frames, as of this patch:
(a) We now leave the ReflowOutput outparam's BlockStartAscent member at its
default value (which is what we do for frames without a baseline like
e.g. nsCheckboxRadioFrame and nsHTMLCanvasFrame). And if the parent cares
about the baseline, it'll then ask directly, using a baseline getter.
(b) We now return 'false' in more implementations of bool-returning
baseline-getter-methods (where 'false' indicates 'no baseline').
(c) We now return the margin-box-bottom edge, in the nscoord-returning
'GetLogicalBaseline()' getter method. (We typically do this by deferring
to the inherited method, which ultimately comes from nsFrame's
implementation). It's appropriate to use the margin-box-bottom edge when
there's no baseline, per the definition of 'vertical-align: baseline',
here: https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align
Depends on D32182
Differential Revision: https://phabricator.services.mozilla.com/D32183
--HG--
extra : moz-landing-system : lando
CSS containment is enabled on early beta or earlier. Using
"default-preferences" to flip column-span pref overrides CSS
containment's pref at the first line in the reftest.list, which make the
two test fail on late beta.
Differential Revision: https://phabricator.services.mozilla.com/D30674
--HG--
extra : moz-landing-system : lando
multicol-span-000.xht passes because the id in
<div id="column-span">123456</div>
was incorrect replaced by "-moz-column-span". Strip the "-moz" prefix
fixed it.
Except failures.list, other files were modified mechanically by running
import-tests.py against https://github.com/web-platform-tests/wpt commit
15f199c91a72b0d51bf0a12b3b77827ecb5051ff (the same commit in
received/import.log).
Differential Revision: https://phabricator.services.mozilla.com/D30406
--HG--
extra : moz-landing-system : lando
Also, build gPrefixRegexp and replace lines only if gPrefixedProperties
is non-empty. Otherwise, the import tests are messed up due to bogus
gPrefixRegexp.
Differential Revision: https://phabricator.services.mozilla.com/D30405
--HG--
extra : moz-landing-system : lando
Add multicol-width-004.html and multicol-width-005.html to test "width:
min-content" and "width: max-content" with column-span:all children.
There's no size containment in these tests.
Note it may be worth to reuse nsBlockFrame's mCachedMinISize and
mCachedPrefISize to cache intrinsic size for ColumnSetWrapperFrame, but
this can be done separately.
Differential Revision: https://phabricator.services.mozilla.com/D29616
--HG--
extra : moz-landing-system : lando
Due to the syntax limitation in failures.list, I cannot mark
multicol-rule-004.xht as fails with column-span enabled and success with
column-span disabled simultaneously. Luckily, we had another copy of it
in testing/web-platform/tests/css/css-multicol/multicol-rule-004.xht, We
can use it to test with column-span disabled for now.
Differential Revision: https://phabricator.services.mozilla.com/D29419
--HG--
extra : moz-landing-system : lando
The comment in nsDisplayTransform::GetTransformForRendering() clearly
says that |aOutOrigin| should return the same offset as GetTransform().
GetTransform() will pass the offset to GetResultingTransformMatrix()
which will round it in many cases to avoid subpixel blurry rendering.
But GetTransformForRendering() doesn't take this rounding into account,
thus contradicting the intent described by the comment.
This rounding is important to keep subpixel behavior consistent with
or without webrender enabled. Currently, SVG will be rendered blurry
in some cases if it's at a subpixel position. After fixing the problem
in non-webrender case, the strange blur still occurs in webrender case.
It turns out to be caused by this inconsistency.
Differential Revision: https://phabricator.services.mozilla.com/D29495
--HG--
extra : moz-landing-system : lando
We should snap subpixel value at nsDisplayTransform::GetResultingTransformMatrix
for outer svg and the anon child. This will solve blurry rendering for subpixel position
when webrender is __not__ enabled.
Differential Revision: https://phabricator.services.mozilla.com/D29344
--HG--
extra : moz-landing-system : lando
import.log and reftest.list are generated automatically.
I run import-test.py on Linux, and the filenames in import.log are not
sorted properly, so I make them sort case-insensitively to reproduce the
exact same order in import.log.
Differential Revision: https://phabricator.services.mozilla.com/D29064
--HG--
extra : moz-landing-system : lando
When an SVG is used as a CSS background-image, we previously used the same behavior as
a normal image. It will stretch if the background-size is incompatible with the intrinsic
size of the SVG. This is a webcompat issue.
Now we use the painting destination rect size instead to avoid stretching.
Differential Revision: https://phabricator.services.mozilla.com/D26935
--HG--
extra : moz-landing-system : lando
'contain:size' just means we should size these elements as if they had no
contents -- i.e. wherever we derive the size of the scrollable frame from the
size of its contents, we should pretend that its contents had zero size.
Differential Revision: https://phabricator.services.mozilla.com/D25155
--HG--
rename : layout/reftests/w3c-css/submitted/contain/contain-size-block-001.html => layout/reftests/w3c-css/submitted/contain/contain-size-block-002.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-001.html => layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-002.html
extra : moz-landing-system : lando
Most rounded rect clips in real content are (a) axis aligned and
(b) have uniform radii.
When these conditions are met, we can run a fast path for clip
mask generation that uses significantly fewer ALU shader ops.
This is not typically a bottleneck on desktop GPUs, but can have
a large performance impact on mobile GPUs (and perhaps low end
integrated GPUs).
The Mali shader analyzer reports the slow path for the rounded
rect clip shader to be 94 cycles per fragment, while the fast
path is 10 cycles.
Differential Revision: https://phabricator.services.mozilla.com/D23817
--HG--
extra : moz-landing-system : lando
Most rounded rect clips in real content are (a) axis aligned and
(b) have uniform radii.
When these conditions are met, we can run a fast path for clip
mask generation that uses significantly fewer ALU shader ops.
This is not typically a bottleneck on desktop GPUs, but can have
a large performance impact on mobile GPUs (and perhaps low end
integrated GPUs).
The Mali shader analyzer reports the slow path for the rounded
rect clip shader to be 94 cycles per fragment, while the fast
path is 10 cycles.
Differential Revision: https://phabricator.services.mozilla.com/D23817
--HG--
extra : moz-landing-system : lando
And while we're at it, update the reference case to have "Reference" in
its title, so that the reference case and testcases are easier to distinguish
when viewing them side-by-side in several tabs.
Differential Revision: https://phabricator.services.mozilla.com/D21045
--HG--
extra : moz-landing-system : lando
For elements that have box-sizing:border-box specified, the aspect ratio
calculation code subtracts out border & padding from any specified property
values.
So, when we create a fake "override" specified property value for a flex item
whose main size has been resolved, we need to add in the border and padding to
account for the fact that they're going to be subtracted out later.
Differential Revision: https://phabricator.services.mozilla.com/D17712
--HG--
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-intrinsic-ratio-001-ref.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-intrinsic-ratio-007-ref.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-intrinsic-ratio-001.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-intrinsic-ratio-007.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-intrinsic-ratio-001v.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-intrinsic-ratio-007v.html
extra : moz-landing-system : lando
All of these tests have an .ini file indicating a failure for at least one of
them right now, in the copy that lives in the WPT harness, because
- they trigger a scrollbar in the WPT harness
...and:
- the scrollbar is a slightly different size in the reference case vs.
in one of the testcases, e.g. due to a tiny margin being honored (or not)
on the final piece of content.
This patch shrinks the content a bit in these test files so that they all fit
in a 400x400 viewport and won't trigger a scrollbar. I expect this should make
them pass in the WPT harness when they make the roundtrip through our
synchronization process.
Differential Revision: https://phabricator.services.mozilla.com/D16935
--HG--
extra : moz-landing-system : lando
This patch makes us handle calc with percentages when we can convert to
percentages the same way we handle plain percentages in table layout.
We still treat length + percentage as auto (this matches Blink / WebKit as
well). There's one case we differ with Blink / WebKit, which is calc(% + 0px),
which they'd treat as auto instead of a percentage.
I think this is a bug on them (or at least worth some spec clarification). I
filed https://github.com/w3c/csswg-drafts/issues/3482 for that.
In practice what that'd means for us if the WG decides that Blink / WebKit is
right in that case is that we'd need to keep track of whether the calc()
specifies lengths, and return false from ConvertsToPercent if so.
In any case, nothing that would massively change this patch, and I think enough
of an edge case that is not worth blocking on the CSSWG decision here. Though I
could be convinced otherwise of course.
Differential Revision: https://phabricator.services.mozilla.com/D15719
--HG--
extra : moz-landing-system : lando
1. Test the most simple cases when we use max-content/min-content on
width/height/block-size.
* block-size-with-min-or-max-content-1a.html
* block-size-with-min-or-max-content-1b.html
2. Test base cases when we use max-content/min-content on
width/height/block-size inside the table element.
* block-size-with-min-or-max-content-table-1a.html
* block-size-with-min-or-max-content-table-1b.html
3. For {horizontal|vertical} writing mode, we use max-content/min-content on
{min-|max-}{height|width} and {min-|max-}block-size on the inner element.
* hori-block-size-small-or-larger-than-container-with-min-or-max-content-1.html
* vert-block-size-small-or-larger-than-container-with-min-or-max-content-1.html
4. For {horizontal|vertical} writing mode, we use max-content/min-content on
{min-|max-}{height|width} on the outer element (i.e. the container).
* hori-block-size-small-or-larger-than-container-with-min-or-max-content-2a.html
* vert-block-size-small-or-larger-than-container-with-min-or-max-content-2a.html
5. For {horizontal|vertical} writing mode, we use max-content/min-content on
{min-|max-}block-size on the outer element (i.e. the container).
* hori-block-size-small-or-larger-than-container-with-min-or-max-content-2b.html
* vert-block-size-small-or-larger-than-container-with-min-or-max-content-2b.html
Depends on D14320
Differential Revision: https://phabricator.services.mozilla.com/D13485
--HG--
extra : moz-landing-system : lando
Support unprefixed min-content and max-content and treat the prefixed
version as aliases for
1. width, min-width, max-width if inline-axis is horizontal, and
2. height, min-height, max-height if inline-axis is vertical, and
3. inline-size, min-inline-size, max-inline-size, and
4. flex-basis.
Besides, update the test cases to use unprefixed max-content and
min-content.
Depends on D7535
Differential Revision: https://phabricator.services.mozilla.com/D7536
--HG--
extra : moz-landing-system : lando