Commit Graph

9574 Commits

Author SHA1 Message Date
Manuel Rego Casasnovas
d9ecddc9fa Bug 1491235: [css-contain] Make 'contain:layout' (not 'contain:size') suppress baseline measurements r=dholbert
The CSSWG has recently resolved that layout containment
suppress baseline alignment, while size containment does not:
https://github.com/w3c/csswg-drafts/issues/2995

Spec text (https://drafts.csswg.org/css-contain/#containment-layout):
  "7. For the purpose of the vertical-align property,
   or any other property whose effects need to relate
   the position of the containing element's baseline
   to something other than its descendants,
   the containing element is treated as having no baseline."

And a note in (https://drafts.csswg.org/css-contain/#containment-size):
  "Note: size containment does not suppress baseline alignment.
   See layout containment for that."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

--HG--
extra : amend_source : 05dc9a320afeb1d58981e2bd8bc47b435999f2f9
2018-10-09 14:13:13 -07:00
Mats Palmgren
4ebe60371d Bug 1495153 part 2 - Implement cropping the filename for <input type=file>. r=emilio,jfkthame 2018-10-07 10:08:45 +02:00
Narcis Beleuzu
5786b9be9f Backed out 2 changesets (bug 1495153) for causing perma failures on dynamic-max-width.html
Backed out changeset 6d95f0e0cc76 (bug 1495153)
Backed out changeset 6800eb348ebe (bug 1495153)
2018-10-07 05:14:44 +03:00
shindli
ea18bce030 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-07 00:15:20 +03:00
Mats Palmgren
3eec51d6b3 Bug 1495153 part 2 - Implement cropping the filename for <input type=file>. r=emilio,jfkthame 2018-10-06 19:31:51 +02:00
Emilio Cobos Álvarez
9aeb8183fd Bug 1444185 - More consistently round around fallback data. r=mstange
To avoid trimming pixels at the top / left.

This makes it closer to non-WR[1], and fixes both the checkboxes getting
cut off and the master password field.

[1]: non-WR at least at 124 scaling on a hiDPI display is still perfect, though I saw nin symmetric borders at other resolutions, so we might be able to improve here further.

Differential Revision: https://phabricator.services.mozilla.com/D7251

--HG--
extra : moz-landing-system : lando
2018-10-06 10:34:36 +00:00
Csoregi Natalia
518c1edc03 Merge inbound to mozilla-central. a=merge 2018-10-05 07:43:18 +03:00
Kartikaya Gupta
fea196e2e1 Bug 1496416 - Add a reftest for async-scrolling content with 2D rotation transforms. r=mstange 2018-10-04 16:12:16 -04:00
Csoregi Natalia
991b088ebf Merge mozilla-central to autoland. CLOSED TREE 2018-10-05 01:31:25 +03:00
Hiroyuki Ikezoe
a2880e9d4f Bug 1489327 - Start animation once after a MozReftestInvalidate event is received in continuation-opacity.html. r=kats
The animation in this reftests runs on the compositor.  In the mean time,
reftest harness waits for the state where there is no pending paint in the
initial phase (STATE_WAITING_TO_FIRE_INVALIDATE_EVENT, i.e. before sending
a MozReftestInvalidate event).  So if the animation starts running on the
compositor before a MozReftestInvalidate event is received, it means that
the reftest harness has to wait for the 'no pending paint' state until the
animation finishes because the reftest harness keeps flushing styles in the
initial phase which means the animation causes a paint on every flush.

To avoid above situation, we start the animation in question after we get a
MozReftestInvalidate event.

Differential Revision: https://phabricator.services.mozilla.com/D7681

--HG--
extra : moz-landing-system : lando
2018-10-04 15:15:37 +00:00
Kartikaya Gupta
a91d1a5df9 Back out bug 1415272 for introducing bug 1496416. r=me
The WR change was backed out upstream in WR PR 3165, but I'm landing it
here out-of-band so we don't have to wait for a regular WR update.
2018-10-04 12:13:13 -04:00
Noemi Erli
8bb8254a13 Merge inbound to mozilla-central. a=merge 2018-10-04 07:03:25 +03:00
Jeff Muizelaar
95e70c18bb Bug 1489663. Add test for invalidation inside of a mask r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D7379

--HG--
extra : moz-landing-system : lando
2018-10-02 20:27:54 +00:00
Timothy Guan-tin Chien
05efde21b8 Bug 1483656 - Part VI, Undo reftest.list changes r=jaws
This revert reftest changes in bug 1431255 Part VIII (c42039f3ffe7)
so that we could test UA Widget in these tests.

Depends on D5085

Differential Revision: https://phabricator.services.mozilla.com/D7543

--HG--
extra : moz-landing-system : lando
2018-10-03 15:50:00 +00:00
Jan Henning
f312188507 Bug 1380830 - Enable container-with-clamping reftest again. r=dbaron
Judging from the description in comment 3 and the fact that this test started
failing shortly after bug 1308876 landed, it is highly likely that this test is
being hit by the same issue as bug 1428670.
This also makes sense given that this test is supposed to test the clamping of
the effective container width for font inflation by the actually visible area of
that frame - be that the viewport for a top level document as in bug 1428670, or
the width of an <iframe> as in this test.

Without the patches for bug 1428670, this test is still failing very frequently.
With those patches applied on the other hand, no more failures are encountered.

Differential Revision: https://phabricator.services.mozilla.com/D5580

--HG--
extra : moz-landing-system : lando
2018-10-02 15:23:19 +00:00
Jan Henning
a51fb6feca Bug 1428670 - Part 2: Correctly mark all child frames as dirty when font inflation status changes. r=dbaron
Before bug 1308876, child frames marked themselves as dirty during reflow if
their parent was dirty, too. After bug 1308876, the point where dirtiness is
being propagated to a frame's descendants has been shifted: Now, dirty parents
are responsible for marking all their children as dirty, too, when the parent
starts reflowing.

This means that if a frame wants to mark a whole subtree as dirty *during its
own* reflow, it's no longer sufficient to just mark the root of the subtree as
dirty and then rely on all further children marking themselves as dirty as well
when reflow reaches them.

The font inflation code is one such case. When the font inflation data on a font
inflation flow root has become dirty, or we're resizing the top-level frame
(which because of the effective container width clamping from bug 707855 can
affect the font inflation font size as well), we now need to explicitly mark all
affected children as dirty.

Differential Revision: https://phabricator.services.mozilla.com/D5577

--HG--
extra : moz-landing-system : lando
2018-10-02 15:23:12 +00:00
Jan Henning
8b4d584087 Bug 1428670 - Part 1: Add reftest. r=dbaron
The failure mode this test is testing is the following:
Apart from the relevant preferences (which cannot change without reloading the
page, so they're not relevant in this case), the magnitude of font size
inflation for all content governed by a particular font inflation flow root
depends on the flow root's effective container width, which is calculated by
taking the smaller of the following two values:
- The font inflation flow root's calculated NCAIsize.
- The ISize of the PresContext's currently visible area.
Minimum font size for font inflation then scales linearly with the effective
container width.

While for a plain document without frames, the visible area normally
corresponds to the viewport size, the MobileViewportManager will only calculate
the viewport after the "load" event or the first paint, whichever is sooner.
This means that the initial reflow will proceed using the current window
dimensions (on mobile this is corresponding to the display size) for the
currently visible area, which in portrait mode typically means around
300 - 500 px width.
After the MVM has done its viewport calculations, we'll reflow again using the
new viewport size as our visible area. For non-mobile friendly pages where font
inflation is relevant, the standard viewport width is 980 px.

If a font inflation flow root is wider than the initial window size, this means
that its effective container width is governed by the visible area and will
therefore increase during the second reflow, as will correspondingly font
inflation's minimum font size.

While the font inflation code detects changes in a font inflation flow root's
NCAISize, respectively ISize resizes of the top-level (Viewport)Frame, after bug
1308876 it no longer correctly marks all descendants of the affected flow root
as dirty. If the text is contained inside an element with a fixed width, which
has therefore been unaffected by the viewport width change, this means that
we'll skip reflow for that text entirely, so the text gets rendered at the new,
increased font size, but continues using the old layout laid out assuming the
smaller initial font size.

I didn't manage to force the visible area to be larger than the initial window
size of 800 px using meta viewport tags, so I'm adjusting browser.viewport.
desktopWidth for this test instead. This also more closely mimics the real-life
failure case described above, where the viewport width gets set to a value
larger than the initial window size through the special desktop page viewport
width handling.

Differential Revision: https://phabricator.services.mozilla.com/D5579

--HG--
extra : moz-landing-system : lando
2018-10-02 15:23:10 +00:00
Bogdan Tara
80119cd08f Backed out 5 changesets (bug 1428670, bug 1380830) for perma failing tests/layout/generic/crashtests/742602.html
Backed out changeset f38ac02fefac (bug 1380830)
Backed out changeset 1bf6b5fac1f9 (bug 1428670)
Backed out changeset faec1cb8ab5d (bug 1428670)
Backed out changeset 34736c8507e6 (bug 1428670)
Backed out changeset 6ecb75be4a61 (bug 1428670)
2018-09-29 23:51:23 +03:00
Jan Henning
6371554477 Bug 1380830 - Enable container-with-clamping reftest again. r=dbaron
Judging from the description in comment 3 and the fact that this test started
failing shortly after bug 1308876 landed, it is highly likely that this test is
being hit by the same issue as bug 1428670.
This also makes sense given that this test is supposed to test the clamping of
the effective container width for font inflation by the actually visible area of
that frame - be that the viewport for a top level document as in bug 1428670, or
the width of an <iframe> as in this test.

Without the patches for bug 1428670, this test is still failing very frequently.
With those patches applied on the other hand, no more failures are encountered.

Differential Revision: https://phabricator.services.mozilla.com/D5580

--HG--
extra : moz-landing-system : lando
2018-09-29 15:55:22 +00:00
Jan Henning
972d6e462f Bug 1428670 - Part 2: Correctly mark all child frames as dirty when font inflation status changes. r=dbaron
Before bug 1308876, child frames marked themselves as dirty during reflow if
their parent was dirty, too. After bug 1308876, the point where dirtiness is
being propagated to a frame's descendants has been shifted: Now, dirty parents
are responsible for marking all their children as dirty, too, when the parent
starts reflowing.

This means that if a frame wants to mark a whole subtree as dirty *during its
own* reflow, it's no longer sufficient to just mark the root of the subtree as
dirty and then rely on all further children marking themselves as dirty as well
when reflow reaches them.

The font inflation code is one such case. When the font inflation data on a font
inflation flow root has become dirty, or we're resizing the top-level frame
(which because of the effective container width clamping from bug 707855 can
affect the font inflation font size as well), we now need to explicitly mark all
affected children as dirty.

Differential Revision: https://phabricator.services.mozilla.com/D5577

--HG--
extra : moz-landing-system : lando
2018-09-29 15:55:14 +00:00
Jan Henning
7d55435c2f Bug 1428670 - Part 1: Add reftest. r=dbaron
The failure mode this test is testing is the following:
Apart from the relevant preferences (which cannot change without reloading the
page, so they're not relevant in this case), the magnitude of font size
inflation for all content governed by a particular font inflation flow root
depends on the flow root's effective container width, which is calculated by
taking the smaller of the following two values:
- The font inflation flow root's calculated NCAIsize.
- The ISize of the PresContext's currently visible area.
Minimum font size for font inflation then scales linearly with the effective
container width.

While for a plain document without frames, the visible area normally
corresponds to the viewport size, the MobileViewportManager will only calculate
the viewport after the "load" event or the first paint, whichever is sooner.
This means that the initial reflow will proceed using the current window
dimensions (on mobile this is corresponding to the display size) for the
currently visible area, which in portrait mode typically means around
300 - 500 px width.
After the MVM has done its viewport calculations, we'll reflow again using the
new viewport size as our visible area. For non-mobile friendly pages where font
inflation is relevant, the standard viewport width is 980 px.

If a font inflation flow root is wider than the initial window size, this means
that its effective container width is governed by the visible area and will
therefore increase during the second reflow, as will correspondingly font
inflation's minimum font size.

While the font inflation code detects changes in a font inflation flow root's
NCAISize, respectively ISize resizes of the top-level (Viewport)Frame, after bug
1308876 it no longer correctly marks all descendants of the affected flow root
as dirty. If the text is contained inside an element with a fixed width, which
has therefore been unaffected by the viewport width change, this means that
we'll skip reflow for that text entirely, so the text gets rendered at the new,
increased font size, but continues using the old layout laid out assuming the
smaller initial font size.

I didn't manage to force the visible area to be larger than the initial window
size of 800 px using meta viewport tags, so I'm adjusting browser.viewport.
desktopWidth for this test instead. This also more closely mimics the real-life
failure case described above, where the viewport width gets set to a value
larger than the initial window size through the special desktop page viewport
width handling.

Differential Revision: https://phabricator.services.mozilla.com/D5579

--HG--
extra : moz-landing-system : lando
2018-09-29 15:54:59 +00:00
arthur.iakab
6d5ae40a02 Merge inbound to mozilla-central a=merge 2018-09-29 07:16:35 +03:00
Chris Pearce
6d006bbd02 Bug 1437608 - Enable layout/reftests/bugs/1425243-1.html with WebRender. r=emilio
This test now passes with WebRender enabled, but it's still fuzzy with WebRender
disabled, so just enable it when WebRender is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D7157

--HG--
extra : moz-landing-system : lando
2018-09-28 10:31:08 +00:00
Jeff Muizelaar
4407187413 Bug 1494206. Update tests for blur changes.
--HG--
extra : rebase_source : 88411ee6146fbf2781bcdaee4e3668a2b1473b34
2018-09-27 23:30:38 -04:00
Emilio Cobos Álvarez
d2ed7ef067 Bug 1493645 - Fix line endings in flexbox-dyn-resize-001.html. r=me 2018-09-28 00:28:57 +02:00
Kartikaya Gupta
1ee7800fce Bug 1439571 - Remove fuzzy-if annotation that is no longer necessary. r=Gankro 2018-09-28 13:40:20 -04:00
Jonathan Watt
5c1dd39583 Bug 1494285 p3. Rename nsDisplayFilter to nsDisplayFilters. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D7008

--HG--
extra : rebase_source : 89a1bd3e34666a09bd9d9d26329f183ebc28a1c3
extra : amend_source : 71c0eacf545383c23533ae05c46561159567d667
extra : histedit_source : a1047949377d690bba5cfcf86b16cb2be0610af0
2018-08-30 13:15:47 +01:00
Kartikaya Gupta
194daef76e Bug 1438171 - Re-enable passing reftest. r=nical 2018-09-27 13:04:27 -04:00
Xidorn Quan
cb87cec282 Bug 1494501 - Rename pref "layout.css.scrollbar-colors.enabled" to "layout.css.scrollbar-color.enabled". r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7030

--HG--
extra : moz-landing-system : lando
2018-09-27 00:38:16 +00:00
Daniel Holbert
62925b4703 Bug 1493645 part 1: When caching flex item sizes, use computed inline size as part of the cache key. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D6991

--HG--
extra : moz-landing-system : lando
2018-09-26 22:51:08 +00:00
Kartikaya Gupta
cca06c782d Bug 1415272 - Enable perspective-scrolling-3 as it passes with WR PR 3154. r=jrmuizel
--HG--
extra : rebase_source : 42d14d3c930f4b9dd4b2e62101fddf4c0b646a7f
2018-10-03 11:39:18 -04:00
Emilio Cobos Álvarez
2c6c40c0a0 Bug 1382896 - Update tests. r=jrmuizel
Mostly straight-forward, the bordercol.css changes are just color renames, but
that file had bogus newlines and such so it looks much bigger.

Differential Revision: https://phabricator.services.mozilla.com/D6604
2018-09-26 15:28:13 +02:00
Emilio Cobos Álvarez
0cf08372ac Bug 1382896 - Align Gecko and WebRender code for 3d border colors. r=mstange
See the discussion in https://github.com/servo/webrender/issues/1280. I think we
should do this sooner rather than later.

Need to update a couple reftests to hardcode the new colors, waiting on try for
that but should be trivial.

This makes a few more tests pass which are just marked as failure in bug 1487407,
because I implementing the border-collapsing reusing a bunch of Gecko code,
including the table 3d border stuff.

Differential Revision: https://phabricator.services.mozilla.com/D6565
2018-09-26 15:28:01 +02:00
Emilio Cobos Álvarez
2afc706839 Bug 1487407 - Properly support beveling bc borders in WR. r=Gankro
The previous border-collapse beveling implementation assumed that there would
only be one beveled border per side in the whole table, which is... not true at all.

So a bunch of borders ended up clobbering other values in mBevelBorders and
never getting painted.

I'm actually somewhat scarily surprised that only this reftest seems to fail
without this patch...

Here we reuse most of the existing one-off beveling / border rendering support
in nsCSSRendering, and convert the Gecko bevels into a WebRender display list
using rects and borders. This is only remotely possible thanks to Gecko not
supporting dotted / dashed beveled borders :)

This would slightly easier and presumably also more efficient with a triangle
display item in WR instead of (ab)using the border display item to render the
bevel, but this is probably relatively edge-casey so maybe not worth it... In
any case I've left a TODO comment there, that can be a nice followup if we deem
it worth it.

Anyway, I'm _so_ sorry for the border trick, I was this (||) close to go and
rewrite our border collapsing code, but after a few tries I realized it'd take
me a whole lot of time (instead of the day that this has taken me).

Differential Revision: https://phabricator.services.mozilla.com/D4793
2018-09-26 15:27:59 +02:00
Jonathan Watt
b389c507af Bug 1494092. Remove SVGFilterObserverList::IsInObserverLists and related code. r=mattwoodrow
This code is no longer necessary since we now invalidate using Display List
Based Invalidation instead of using recursive calls up the frame tree.

The tests that are marked as failing have only been passing due to a bug in the
code that's being removed from nsSVGIntegrationUtils.cpp which coincidentally
hides the fact that we are actually invalidating in those tests given their
particular structure (which the tests are supposed to be checking we're not
doing).

Differential Revision: https://phabricator.services.mozilla.com/D6850

--HG--
extra : rebase_source : cb95359d694dafeca915a22b3c48f580a69679ef
extra : amend_source : 7074f5837170ce0a9243811291782f689666e122
2018-08-27 17:05:37 +01:00
Daniel Holbert
8c7f509c02 Bug 1487537: Add reftest to exercise a scenario where presence of scrollbars influences the need for scrollbars. r=bradwerth
--HG--
extra : rebase_source : 0f4929158a7539e492e13966ea3c612ed30dd345
extra : amend_source : a5c8f74d78bac31262efd7b49f4eb36a04659998
2018-09-25 11:30:45 -07:00
Cosmin Sabou
2731d11658 Merge mozilla-central to inbound. a=merge 2018-10-04 02:40:08 +03:00
Emilio Cobos Álvarez
939fb708fe Bug 1493710 - Don't apply containing shadow-host rules to NAC. r=mats
This is a regression from bug 1487856.

Differential Revision: https://phabricator.services.mozilla.com/D6700
2018-09-25 09:21:23 +02:00
Csoregi Natalia
4a5dd87283 Backed out changeset 73a8628576e4 (bug 1493710) for failures on layout/reftests/forms/input/shadow-rules.html. CLOSED TREE 2018-09-25 03:57:36 +03:00
Emilio Cobos Álvarez
2375a01424 Bug 1493710 - Don't apply containing shadow-host rules to NAC. r=mats
This is a regression from bug 1487856.

Differential Revision: https://phabricator.services.mozilla.com/D6700

--HG--
extra : moz-landing-system : lando
2018-09-24 21:32:59 +00:00
Jonathan Kew
24a9c4ca21 Bug 1493181 - Use rounding instead of ceiling when computing 'ch' width; update test expectations accordingly. r=manishearth 2018-09-22 23:26:55 +01:00
Jonathan Kew
b4332d3149 Bug 1493181 - Test for expected width of CSS 'ch' unit. r=manishearth 2018-09-22 23:26:31 +01:00
Matt Woodrow
a03f5b443d Bug 1492250 - Create a WebRender stacking context for nsDisplayStickyPosition to ensure that all descendants get the same positioning. r=mstange
MozReview-Commit-ID: 5JZo0z3LC7t

Differential Revision: https://phabricator.services.mozilla.com/D6354

--HG--
extra : moz-landing-system : lando
2018-09-21 00:53:19 +00:00
Gurzau Raul
2a3847037c Backed out changeset 471ccb1a377e (bug 1492250) for failing at /reftests/async-scrolling/reftest.list line 36 on a CLOSED TREE 2018-09-21 03:31:24 +03:00
Matt Woodrow
610b7fd423 Bug 1492250 - Create a WebRender stacking context for nsDisplayStickyPosition to ensure that all descendants get the same positioning. r=mstange
MozReview-Commit-ID: 5JZo0z3LC7t

Differential Revision: https://phabricator.services.mozilla.com/D6354

--HG--
extra : moz-landing-system : lando
2018-09-20 23:18:07 +00:00
Andreea Pavel
f5f6c0b588 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-21 00:54:47 +03:00
Miko Mynttinen
43389f7825 Bug 1490518 - Scale areas after clipping to unscaled clip r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D6031

--HG--
extra : moz-landing-system : lando
2018-09-20 18:31:00 +00:00
Jeff Muizelaar
171146f369 Bug 1492566. Increase the fuzz some more so that things pass. 2018-09-20 13:22:58 -04:00
Jeff Muizelaar
3ed96a1b8e Bug 1492566. Adjust test expectations for https://github.com/servo/webrender/pull/3073
--HG--
extra : rebase_source : 7d090510f12caceaff8c2329e47871dbb5f4de55
2018-09-19 15:52:06 -04:00
Coroiu Cristina
fc2422e4c1 Backed out changeset a0179bdde496 (bug 1492250) for reftest failures at tests/layout/reftests/async-scrolling/sticky-pos-scrollable-7.html on a CLOSED TREE 2018-09-20 13:21:44 +03:00