Commit Graph

16028 Commits

Author SHA1 Message Date
Daniel Holbert
6b0d04e8fd Bug 1626459: Simplify test annotations/code to assume that CSS Containment is preffed on by default. r=AlaskanEmily
i.e. remove annotations that manually enable the property, and remove the
property_database.js check that tests for the property being enabled.

We've been shipping with the property enabled ever since Firefox 69, so we're
realistically not going to default-disable it at this point, which means these
annotations (and the property_database.js check) are just cruft.

Differential Revision: https://phabricator.services.mozilla.com/D69128
2020-04-20 17:31:48 +00:00
Botond Ballo
0cc43ec735 Bug 1629732 - Fix non-unified build errors in layout/style. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71454
2020-04-19 00:59:06 +00:00
Emilio Cobos Álvarez
c7992b8656 Bug 1449522 - Cleanup some parent walks in StyleSheet code. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D71410
2020-04-17 22:55:03 +00:00
Emilio Cobos Álvarez
5f95854d9b Bug 1449522 - Clean up stylesheet association modes. r=nordzilla
Should also have no behavior change.

After the previous patch we don't have sheets associated with a document but
not owned by it, so take advantage of that.

Differential Revision: https://phabricator.services.mozilla.com/D71264
2020-04-17 22:54:55 +00:00
Emilio Cobos Álvarez
63dce710f2 Bug 1630835 - Don't propagate associated document or shadow root to child sheets. r=nordzilla
This should have no behavior change, but makes the setup simpler and
more similar to the constructable sheets.

Differential Revision: https://phabricator.services.mozilla.com/D71262
2020-04-17 22:54:35 +00:00
Emilio Cobos Álvarez
1f3abc7835 Bug 1630837 - Optimize CC of rules from constructable stylesheets. r=smaug,nordzilla
This removes StyleSheet::GetComposedDoc because it wasn't doing the
right thing, and while constructable stylesheets _could_ in theory
return something meaningful (the constructor doc iff any adopters is
connected), it's not a concept we need in other places for now.

Differential Revision: https://phabricator.services.mozilla.com/D71261
2020-04-17 21:12:11 +00:00
Erik Nordin
65e0b8ff27 Bug 1629994 - Minor Code Changes Constructable StyleSheets r=emilio
These are a collection of minor changes that have no effect on the behavior of the code.

Differential Revision: https://phabricator.services.mozilla.com/D71093
2020-04-17 16:34:38 +00:00
Jeff Walden
3dddf97e18 Bug 1624266 - Add code to page/worker/worklet code so that the global "SharedArrayBuffer" property can be trivially omitted from their global objects by changing how a single C++ variable for each case is initialized. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71253
2020-04-17 08:21:02 +00:00
Erik Nordin
4caedb2b46 Bug 1627104 - Ensure Constructed StyleSheets' parent object is constructor document r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D69454
2020-04-16 21:16:08 +00:00
Erik Nordin
dbc1240152 Bug 1629596 - Rename mParent to mParentSheet r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70705

--HG--
extra : moz-landing-system : lando
2020-04-13 20:49:32 +00:00
Mike Hommey
070b148444 Bug 1621447 - Convert GenerateServoCSSPropList.py to py3. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70308

--HG--
extra : moz-landing-system : lando
2020-04-09 11:03:02 +00:00
Erik Nordin
8dfda8ef7c Bug 1621849 - Add CSS Error for DisallowedImportRule r=emilio
- Add new CSS Error
- Add new test case for error
- Ensure that test cases use `replace()` and `replaceSync()`

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

--HG--
extra : moz-landing-system : lando
2020-04-08 22:45:24 +00:00
Chris Peterson
4a9feda3ee Bug 1625855 - Replace MOZ_MUST_USE with [[nodiscard]] in layout. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D68751

--HG--
extra : moz-landing-system : lando
2020-04-08 01:59:36 +00:00
Itiel
7d8d735230 Bug 1627785 - Improve CSS style for forms.css r=emilio
This includes:
- Removal of `px` after a `0`
- Combining of logical properties
- Removal of spaces between "!" and "important"

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

--HG--
extra : moz-landing-system : lando
2020-04-07 20:39:59 +00:00
Tom Tung
b34fac17ed Bug 1586761 - P7 - Revert a few incorrect changes on P2; r=tjr
P2 removed IsTimerPrecisionReductionEnabled and thus removed the check for RFP
pref. While most ReduceTimePrecision* functions are fine with that because
GetTimerPrecisionType checks that, the two ReduceTimePrecision*RFP functions
miss the check.

This patch mainly cover the check for that two functions and rename them to
*RFPOnly since they only use RFP when the pref is on.

Depends on D64324

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

--HG--
extra : moz-landing-system : lando
2020-04-07 07:36:52 +00:00
Tom Tung
94183661ac Bug 1586761 - P2 - Introduce new TimerPrecisionTypes and a set of new Reduce methods to decide the TimerPrecisionType in the nsRFPService; r=tjr
To support checking CrossOriginIsolated in performance.now(), we need to:
- Add new types to TimerPrecisionType for nsRFPService
  - System, HighResAllowed are added
  - All is renamed to Normal
- Introduce a set of Reduce methods which require isSystemPrincipal and
CrossOriginIsolated to be passed and decide the TimerPrecisionType later
  - Original Reduce methods should only be called when callsites know the
  TimerPrecisionType. Otherwise, they should call the new methods.
- The following patches will use new methods

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

--HG--
extra : moz-landing-system : lando
2020-03-25 14:09:55 +00:00
Andreas Farre
25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Andreas Farre
f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.

Depends on D67634

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:07 +00:00
Andreas Farre
36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Andreas Farre
63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
Chris H-C
8b1032cdc9 Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 16:06:36 +00:00
Honza Bambas
cdc702ad46 Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025

--HG--
extra : moz-landing-system : lando
2020-04-06 15:12:15 +00:00
Cameron McCormack
c2bc259414 Bug 1623820 - Part 2: Make image-orientation initial value change be Nightly only. r=emilio
We'll let this ride the trains once Chrome 81 is set to be released.

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

--HG--
extra : moz-landing-system : lando
2020-04-05 03:21:24 +00:00
Emilio Cobos Álvarez
ddc86c2048 Bug 1615832 - Make an assertion nightly-only.
We confirmed that this is a networking issue, no point in making beta /
devedition crash due to this. Still worth keeping it on nightly to monitor the
crash volume once the networking fix arrives.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 17:33:53 +00:00
Emilio Cobos Álvarez
0caf890907 Bug 1625604 - Move pointer-events: none declaration for option to forms.css. r=snorp
This is a bit hacky, but is how it used tow work without the native theme. We
may be able to do better.

<input type="date"> / <input type="time"> work the same way with and without the
other two selectors, because they never match since we moved them to shadow DOM
in Firefox 65 (bug 1496242).

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

--HG--
extra : moz-landing-system : lando
2020-04-03 14:20:27 +00:00
Emilio Cobos Álvarez
e5e8a82f19 Bug 1626332 - null-check the canvas frame as it can be null in some documents.
Differential Revision: https://phabricator.services.mozilla.com/D69541

--HG--
extra : moz-landing-system : lando
2020-04-03 11:54:07 +00:00
Mihai Alexandru Michis
5a2979e8b7 Backed out changeset 30fe730b5ab1 (bug 1605895) for causing mochitest failures in HttpChannelChild
CLOSED TREE
2020-04-02 20:37:12 +03:00
Honza Bambas
994473ee21 Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025

--HG--
extra : moz-landing-system : lando
2020-04-02 15:53:54 +00:00
Erik Nordin
ccc51b2ce0 Bug 1622322 - Improve print performance when sheets are adopted multiple times r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68116

--HG--
extra : moz-landing-system : lando
2020-04-01 20:06:47 +00:00
Gurzau Raul
7a19945570 Backed out changeset 813e1405e501 (bug 40545) for Android failures at test_bug659596.html on a CLOSED TREE. 2020-04-01 19:35:32 +03:00
Chris H-C
faf5bd0c34 Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 09:20:21 +00:00
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