Commit Graph

15997 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
aa2f460364 Bug 1625419 - Don't double-apply non-symmetric vertical padding for number inputs. r=dholbert
Turns out that align-self is enough for sizing to end up like we want (not
getting squashed by the flex container's padding). This prevents double-applying
the padding in cases where the top and bottom paddings don't match.

We also fix another change from my previous patch, which is that we wouldn't
clip stuff if the text editor is much bigger than the flex container. Most
trivial example of this is:

  data:text/html,<input type=number style="font-size: 300px; height: 40px;">

I renamed the test from overflow-clip-box-* to padding-*, as we're not
technically exercising overflow-clip-box anymore, and added a test for the
clipping too.

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

--HG--
rename : layout/reftests/forms/input/number/overflow-clip-box-notref.html => layout/reftests/forms/input/number/padding-001-notref.html
rename : layout/reftests/forms/input/number/overflow-clip-box-ref.html => layout/reftests/forms/input/number/padding-001-ref.html
rename : layout/reftests/forms/input/number/overflow-clip-box.html => layout/reftests/forms/input/number/padding-001.html
rename : layout/reftests/forms/input/number/overflow-clip-box-ref.html => layout/reftests/forms/input/number/padding-002-ref.html
rename : layout/reftests/forms/input/number/overflow-clip-box.html => layout/reftests/forms/input/number/padding-002.html
extra : moz-landing-system : lando
2020-03-31 09:39:21 +00:00
Daniel Varga
58cc69bc1f Backed out changeset 4627b2918816 (bug 1625419) for causing reftest failures at layout/reftests/forms/input/number/padding.html
CLOSED TREE

--HG--
rename : layout/reftests/forms/input/number/padding.html => layout/reftests/forms/input/number/overflow-clip-box-notref.html
rename : layout/reftests/forms/input/number/padding-ref.html => layout/reftests/forms/input/number/overflow-clip-box-ref.html
rename : layout/reftests/forms/input/number/padding-notref.html => layout/reftests/forms/input/number/overflow-clip-box.html
2020-03-31 00:59:27 +03:00
Emilio Cobos Álvarez
be03c17e1d Bug 1625419 - Don't double-apply non-symmetric vertical padding for number inputs. r=dholbert
Turns out that align-self is enough for sizing to end up like we want (not
getting squashed by the flex container's padding). This prevents double-applying
the padding in cases where the top and bottom paddings don't match.

We also fix another change from my previous patch, which is that we wouldn't
clip stuff if the text editor is much bigger than the flex container. Most
trivial example of this is:

  data:text/html,<input type=number style="font-size: 300px; height: 40px;">

I renamed the test from overflow-clip-box-* to padding-*, as we're not
technically exercising overflow-clip-box anymore, and added a test for the
clipping too.

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

--HG--
rename : layout/reftests/forms/input/number/overflow-clip-box.html => layout/reftests/forms/input/number/padding-notref.html
rename : layout/reftests/forms/input/number/overflow-clip-box-ref.html => layout/reftests/forms/input/number/padding-ref.html
rename : layout/reftests/forms/input/number/overflow-clip-box-notref.html => layout/reftests/forms/input/number/padding.html
extra : moz-landing-system : lando
2020-03-30 19:47:32 +00:00
Emilio Cobos Álvarez
2153b0cb92 Bug 1625571 - Invalidate canvas background in ImageLoader rather than nsDisplayBackgroundImage. r=tnikkel
This is less error prone and also less code.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 08:35:34 +00:00
Philipp Zech
53a8327ecd Bug 1625699 - Convert control-character-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68705

--HG--
extra : moz-landing-system : lando
2020-03-28 22:17:50 +00:00
André Bargull
1e4d8b891e Bug 1625138 - Part 4: Replace mozilla::MakeUnsigned with std::make_unsigned. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68358

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:12 +00:00
Tim Nguyen
19ca5d7afa Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 22:52:32 +00:00
Karl Tomlinson
d13eef7aff Bug 1581896 allow AudioWorklet on release-or-beta behind a pref r=smaug
AudioWorklets are now functional for most use cases, and so it's time to allow
people to experiment.

PaintWorklets are not ready.

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

--HG--
extra : moz-landing-system : lando
2020-03-27 03:09:06 +00:00
Emilio Cobos Álvarez
a214514a58 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 16:48:01 +00:00
Razvan Maries
7155f2665a Backed out changeset ac0d06c0ca93 (bug 1624080) for assertion failures. CLOSED TREE 2020-03-26 16:52:18 +02:00
Emilio Cobos Álvarez
c556351cd0 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 13:23:42 +00:00
Erik Nordin
ca4fa23626 Bug 1621415 - Ensure adopted styles are applied when printing r=emilio
- Add functionality to clone adopted style sheets for printing.
- Add reftest to ensure that the document's adopted styles show in print.
- Add reftest to ensure that a shadow root's adopted styles show in print.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 22:54:18 +00:00
Andrea Marchesini
6e5bd2d254 Bug 1402784 - Use nsIContentPolicy::TYPE_INTERNAL_AUDIOWORKLET and nsIContentPolicy::TYPE_INTERNAL_PAINTWORKLET in Worklet code, r=smaug
Depends on D67105

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

--HG--
extra : moz-landing-system : lando
2020-03-17 22:24:39 +00:00
Simon Giesecke
58d0171406 Bug 1620632 - Ensure nsTArray_Impl only declares a copy-constructor/assignment operator if E is copy-constructible. r=froydnj
To correctly implement this, it must be known on instantiation whether E is
copy-constructible, which is not the case if only a forward declaration is
available. This can be resolved either by making sure a full definition of E is
available, which is preferable. But in cases where this is not (easily) possible,
the information can be explicitly provided by the MOZ_DECLARE_COPY_CONSTRUCTIBLE
and MOZ_DECLARE_NON_COPY_CONSTRUCTIBLE macros. In particular, declarations for
IPDL-declared types are added to nsTArray.h itself, like it was already done
for MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR.

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:13:51 +00:00
Simon Giesecke
7e9a7de895 Bug 1620632 - Rename confusingly named types/macros for relocation handling of nsTArray. r=froydnj
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:04:27 +00:00
Emily McDonough
f3e3a0107d Bug 1341507 part 7 - Update mochitests and wpt for supporting repeat-auto with multiple values in grid and subgrid. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D60932

--HG--
extra : moz-landing-system : lando
2020-03-20 00:27:22 +00:00
Emily McDonough
033d08d7ef Bug 1341507 part 1 - Refactor computed DOM for grid layout to make it simpler for handling repeat values, and to handle multiple repeat values. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D59070

--HG--
extra : moz-landing-system : lando
2020-03-19 22:11:31 +00:00
Philipp Zech
8b9b6fdab2 Bug 1623410 - Convert mask-composite #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67394

--HG--
extra : moz-landing-system : lando
2020-03-19 13:48:57 +00:00
Stefan Hindli
f3854a78ed Backed out 7 changesets (bug 1341507) for mochitest failures in dom/grid/test/chrome/test_grid_repeat_auto_fill.html CLOSED TREE
Backed out changeset e4e968fabe2b (bug 1341507)
Backed out changeset 6cafdef7eb79 (bug 1341507)
Backed out changeset eff4ad47440c (bug 1341507)
Backed out changeset 55432ee0cd4b (bug 1341507)
Backed out changeset e798ebf91eca (bug 1341507)
Backed out changeset 08d38f05b160 (bug 1341507)
Backed out changeset 6b35af9ecb38 (bug 1341507)
2020-03-19 02:49:17 +02:00
Emily McDonough
89848fa4f9 Bug 1341507 part 7 - Update mochitests and wpt for supporting repeat-auto with multiple values in grid and subgrid. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D60932

--HG--
extra : moz-landing-system : lando
2020-03-18 22:44:48 +00:00
Emily McDonough
6b2f90642b Bug 1341507 part 1 - Refactor computed DOM for grid layout to make it simpler for handling repeat values, and to handle multiple repeat values. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D59070

--HG--
extra : moz-landing-system : lando
2020-03-18 22:44:29 +00:00
Emilio Cobos Álvarez
664a546418 Bug 1618260 - Fix number input so that it honors overflow-clip-box-block. r=mats
This never worked, but it's more visible with the new form controls which have
more padding.

Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.

This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 09:21:44 +00:00
Emilio Cobos Álvarez
b6fbdd3eeb Bug 1623108 - Use ThreeDFace instead of ThreeDLightShadow for fieldset borders. r=mats
As per https://html.spec.whatwg.org/#the-fieldset-and-legend-elements

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

--HG--
extra : moz-landing-system : lando
2020-03-18 08:51:26 +00:00
Sam Mauldin
9f2ec488bb Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason,
and the backplate is now properly applied, causing them to fail.

Remove tests for field and fieldtext from color-valid.html because they are tested again
in system-color-valid.html.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 16:08:19 +00:00
Chris Fronk
d5b004443b Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-17 12:42:12 +00:00
Simon Giesecke
8aa47bcfb7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016

--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00:00
Emilio Cobos Álvarez
9b76d28bff Bug 1622058 - Cleanup CSS error reporting a bit. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D66642

--HG--
extra : moz-landing-system : lando
2020-03-16 20:50:21 +00:00
Daniel Varga
2ef4614ee8 Backed out changeset a2030f611422 (bug 1590894) for causing mochitest failure at layout/style/test/test_value_computation.html 2020-03-15 23:09:42 +02:00
Sam Mauldin
2c684678d4 Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason,
and the backplate is now properly applied, causing them to fail.

Remove tests for field and fieldtext from color-valid.html because they are tested again
in system-color-valid.html.

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

--HG--
extra : moz-landing-system : lando
2020-03-15 19:45:27 +00:00
Philipp Zech
50f765938d Bug 1622332 - Remove redundant StyleBlend initializers. r=emilio
Depends on D66867

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

--HG--
extra : moz-landing-system : lando
2020-03-14 21:41:06 +00:00
Philipp Zech
3db72bdd4b Bug 1622332 - Convert style-blend #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66867

--HG--
extra : moz-landing-system : lando
2020-03-14 21:24:11 +00:00
Razvan Maries
a2e3903c68 Backed out changeset c0235b7bddcc (bug 1621415) for Mochitest perma failures on test_printpreview.xhtml. CLOSED TREE 2020-03-14 02:52:09 +02:00
Ed Lee
acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Erik Nordin
b6f5189943 Bug 1621415 - Ensure adopted styles are applied when printing r=emilio
- Add functionality to clone adopted style sheets for printing.
- Add reftest to ensure that the document's adopted styles show in print.
- Add reftest to ensure that a shadow root's adopted styles show in print.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 21:20:22 +00:00
Erik Nordin
17dbae2125 Bug 1613511 - Disallow @import rules for all Constructable StyleSheets functions r=emilio
- Add enum AllowImportRules to CSS parsing.
- `replaceSync()` will skip over @import rules and continue parsing.
- `replace()` will skip over @import rules and continue parsing.
- `insertRule()` will throw a syntax error on @import rules.
- Modify WPT test cases to reflect these changes.

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

--HG--
extra : moz-landing-system : lando
2020-03-12 18:11:09 +00:00
Boris Zbarsky
4e0a47195b Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 04:25:34 +00:00
Mihai Alexandru Michis
795c7787a3 Backed out changeset 3552ac882d4f (bug 1621835) for causing bustages.
CLOSED TREE
2020-03-12 04:15:33 +02:00
Boris Zbarsky
e5766424b8 Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 01:46:16 +00:00
Philipp Zech
0e22ff2b24 Bug 1621706 - Convert backface-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66487

--HG--
extra : moz-landing-system : lando
2020-03-11 20:58:23 +00:00
shindli
b02b3a6e1a Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
--HG--
rename : mfbt/CompactPair.h => mfbt/Pair.h
2020-03-11 14:30:54 +02:00
Chris Fronk
a27e438c2d Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-11 12:18:13 +00:00
Ehsan Akhgari
cde7e014c2 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 23:36:39 +00:00
Hiroyuki Ikezoe
2baddbcb2f Bug 1620865 - Drop ComputedStyle argument from AnimationValue::ComputeDistance. r=boris
It has not been used since we dropped the old style system.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 18:44:22 +00:00
Narcis Beleuzu
0186cbe565 Backed out 8 changesets (bug 1620322) for bustages on nsContentSink.cpp . CLOSED TREE
Backed out changeset f41739c64dff (bug 1620322)
Backed out changeset be942a7f329e (bug 1620322)
Backed out changeset a916987c7c71 (bug 1620322)
Backed out changeset ead3484ffb5f (bug 1620322)
Backed out changeset 4e1e8b9afa1a (bug 1620322)
Backed out changeset 473bba698e5a (bug 1620322)
Backed out changeset 0e5e5d41597d (bug 1620322)
Backed out changeset 31b24d79db3d (bug 1620322)

--HG--
rename : toolkit/components/antitracking/ContentBlockingLog.cpp => dom/base/ContentBlockingLog.cpp
rename : toolkit/components/antitracking/ContentBlockingLog.h => dom/base/ContentBlockingLog.h
rename : toolkit/components/antitracking/ContentBlocking.cpp => toolkit/components/antitracking/AntiTrackingCommon.cpp
rename : toolkit/components/antitracking/ContentBlocking.h => toolkit/components/antitracking/AntiTrackingCommon.h
2020-03-09 22:18:36 +02:00
Ehsan Akhgari
8530d61140 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 18:12:42 +00:00
Emilio Cobos Álvarez
2a451d978e Bug 1618509 - Allow to export a shadow part under multiple names. r=jwatt
Other browsers allow this and the spec doesn't really disallow it, so fix it,
add a test and carry on.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 13:04:21 +00:00
Mark Banner
15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Boris Zbarsky
ed4e79ec6a Bug 1332550 tests.
Differential Revision: https://phabricator.services.mozilla.com/D65844

--HG--
extra : moz-landing-system : lando
2020-03-07 04:01:12 +00:00
Emilio Cobos Álvarez
3d29b274ae Bug 1620359 - Don't clear the "uses viewport units" bit when a font that doesn't cause a style change loads. r=jfkthame
This is probably an old-ish bug made more frequent by the font loading
optimizations.

PostRebuildAllStyleData is a bit of a misnomer, but was always calling
ClearCachedData() on the style set, even if we weren't guaranteed to restyle
every element.

This means both wasted work and correctness issues (as the "uses <rare-feature>"
bits are cleared during this call, on the assumption that we'll then visit all
elements and that'd recompute it properly).

For now, unify a bit the different code paths and only clear these bits if we're
guaranteed to restyle all elements.

I should rename this to something better in a follow-up, and ideally also
decouple the ClearCachedData() calls a bit...

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

--HG--
extra : moz-landing-system : lando
2020-03-06 20:11:51 +00:00
Philipp Zech
75033d421b Bug 1620034 - Convert vector-effect #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D65718

--HG--
extra : moz-landing-system : lando
2020-03-06 14:40:50 +00:00