Commit Graph

12639 Commits

Author SHA1 Message Date
Dorel Luca
88d9c25909 Backed out changeset 49799d898958 (bug 1321488) for Mochitest failures in dom/base/test/test_audioNotificationSilent_audioFile.html 2019-06-25 03:08:45 +03:00
Alastor Wu
0fbd3654ff Bug 1321488 - restrict CSS properties for '::cue' r=emilio
According to the spec [1], only those CSS properties listed on the spec can be applied on the `::cue`.

[1] https://www.w3.org/TR/webvtt1/#the-cue-pseudo-element

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

--HG--
extra : moz-landing-system : lando
2019-06-24 20:16:39 +00:00
violet
75f6c6ddaa Bug 1560828 - paint-order parsing has off-by-one error r=emilio
A couple of firefox only WPT failure caused by this off-by-one bug.

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

--HG--
extra : moz-landing-system : lando
2019-06-24 04:07:42 +00:00
violet
8a8f7223a9 Bug 1557563 - Add computed value ZeroToOneNumber r=emilio,birtles
Correctly handle clamping to 1 behavior of grayscale(),
invert(), opacity() and sepia().

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

--HG--
extra : moz-landing-system : lando
2019-06-23 23:01:47 +00:00
Emilio Cobos Álvarez
6053d3deb8 Bug 1560777 - followup: Servo doesn't implement white-space: break-spaces. 2019-06-23 14:37:58 +02:00
Emilio Cobos Álvarez
dade3682e3 Bug 1560777 - Fix Servo build. 2019-06-23 13:20:02 +02:00
Emilio Cobos Álvarez
9ed6555245 Bug 1560777 - Rustfmt and fix tidy on recent changes. 2019-06-23 13:16:03 +02:00
Emilio Cobos Álvarez
ed31d80598 Bug 1560777 - Update various servo / test-only dependencies. 2019-06-23 13:15:55 +02:00
Emilio Cobos Álvarez
c08ad2bc03 Bug 1560777 - Fix various nightly warnings in Servo-only code. 2019-06-23 13:15:39 +02:00
Emilio Cobos Álvarez
2295794f5f Bug 1560777 - Fix RuleNode::has_children_for_testing.
I fixed it in the last sync but forgot to do that in Gecko.
2019-06-23 13:14:36 +02:00
Emilio Cobos Álvarez
86c78d4e72 Bug 1560777 - Remove various bits of dead code removed in upstream servo. r=emilio 2019-06-23 13:10:27 +02:00
Emilio Cobos Álvarez
568c07f7ef Bug 1560777 - Fix a typo in a comment. 2019-06-23 13:08:25 +02:00
violet
e6d794f2b0 Bug 1547633 - Invalidate style for ::selection r=emilio
This patch invalidates the style for `::selection`, which will restore the behavior before the regression.

However, it's still not quite correct, because repaint is not triggered. Given that `::selection` requires some major change to implement https://github.com/w3c/csswg-drafts/issues/2474, we can address this problem later.

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

--HG--
extra : moz-landing-system : lando
2019-06-22 10:09:51 +00:00
Boris Chiou
88447089e6 Bug 1560198 - Fix the serialization of the computed value of background-size. r=emilio
This patch produces the following serialization:
```
    input      |  computed value
  ------------------------------
1. "auto"            "auto"
2. "auto auto"       "auto"
3. "15px auto"       "15px"
4. "15px"            "15px"
```
i.e. If the second value is 'auto', then it's omitted from our serialization,
because it's implied.

Besides, we update the wpt to address this spec issue:
https://github.com/w3c/csswg-drafts/issues/2574

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

--HG--
extra : moz-landing-system : lando
2019-06-21 21:48:54 +00:00
Emilio Cobos Álvarez
3a16c93150 Bug 1556602 - Fix various warnings with rust 1.37 nightly. r=froydnj
In particular:

 * trait objects without an explicit `dyn` are deprecated
 * `...` range patterns are deprecated

I think these shouldn't really warn by default and should be clippy / opt-in
lints, but anyway, doesn't hurt.

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

--HG--
extra : moz-landing-system : lando
2019-06-18 21:32:16 +00:00
Emilio Cobos Álvarez
6ed8680108 Bug 1559546 - Use atoms for grid line names. r=mats
The style system already atomizes all CustomIdent values, which means that we're
just wasting memory and CPU by doing string copies all over the place.

This patch fixes it. This also simplifies further changes to use as much of the
rust data structures as possible.

I had to switch from nsTHashtable to mozilla::HashTable because the former
doesn't handle well non-default-constructible structs (like NamedLine, which
now has a StyleAtom, which is not default-constructible).

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

--HG--
extra : moz-landing-system : lando
2019-06-19 05:58:11 +00:00
Emilio Cobos Álvarez
5a2717a028 Bug 1559546 - Allow to construct StyleAtom objects from C++. r=heycam
I'm going to need it in an upcoming patch.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 05:58:01 +00:00
Emilio Cobos Álvarez
841d3eea32 Bug 1559545 - Use servo for the representation of grid template areas. r=mats
Right now we do a lot of useless string copying. In order to avoid transcoding
to utf-16 during layout, make sure to use nsCString at a few related places.

I may revisit this since we're storing other line names as atoms in some places.
So it may be better to just use atoms everywhere.

But that'd be a different patch either way.

Depends on D35116

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

--HG--
extra : moz-landing-system : lando
2019-06-18 22:29:58 +00:00
Emilio Cobos Álvarez
f720448603 Bug 1559545 - Use more ffi-friendly types in grid template areas. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D35116

--HG--
extra : moz-landing-system : lando
2019-06-17 15:44:21 +00:00
violet
f8f8760a7f Bug 1559796 - Should not serialize default radius of circle r=emilio
Should not serialize default shape-outside circle() function radius.

The ToCss impl of Circle and Ellipse turn out to be identical in specified and computed value, thus move them to generics.

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

--HG--
extra : moz-landing-system : lando
2019-06-18 11:54:41 +00:00
Noemi Erli
f555fa472a Backed out changeset a2a92e2fd645 (bug 1559796) for failing in shape-outside-circle-004.html 2019-06-18 08:44:42 +03:00
violet
a213db9419 Bug 1559796 - Should not serialize default radius of circle r=emilio
Should not serialize default shape-outside circle() function radius.

The ToCss impl of Circle and Ellipse turn out to be identical in specified and computed value, thus move them to generics.

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

--HG--
extra : moz-landing-system : lando
2019-06-18 03:48:27 +00:00
violet
682af614dd Bug 1470695 - Implement overflow-block and overflow-inline properties r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D34738

--HG--
extra : moz-landing-system : lando
2019-06-15 13:09:16 +00:00
violet
d5bbf998dd Bug 1351432 - Implement the break-spaces value of the white-space property r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D34499

--HG--
extra : moz-landing-system : lando
2019-06-12 10:23:49 +00:00
Boris Chiou
d6e5792aff Bug 1542064 - Add MOZ_DBG support for AnimationValue. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D33357

--HG--
extra : moz-landing-system : lando
2019-06-12 18:14:18 +00:00
Emilio Cobos Álvarez
8381c5ce61 Bug 1505489 - Add a pref and enable Shadow Parts in Nightly and for chrome stylesheets. r=heycam
I want to enable in Nightly to evaluate (in the medium term) shipping it without
the part forwarding, once the cascade order and importance issues are fixed, and
that we pass all the tests that don't involve forwarding.

That is, I want to monitor whether having ::part() causes compat issues or not.

Depends on D32648

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:58 +00:00
Emilio Cobos Álvarez
72a9fa3730 Bug 1505489 - Implement GeckoElement::each_part. r=heycam
This should make all the pieces come together.

Note that we don't need to look at the snapshot for ::part() for now (other than
when selector-matching normally) because I decided to just restyle the element
for now when the part attribute changes.

::part() can't affect descendants anyway (as long as we don't do the forwarding
stuff), and eager pseudo-elements are handled during the normal element restyle,
so it seems to me that adding all the complexity that we have for classes to
part may not be worth it at least yet.

Depends on D32647

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:49 +00:00
Emilio Cobos Álvarez
3685cf25a7 Bug 1505489 - Add code to make part rules affect the style of the elements. r=heycam
I still haven't implemented each_part(), so this will do nothing yet.

The cascade order stuff is fishy, I know, and I'll fix in a followup if it's
fine with you. I moved the sorting of the rules to rule_collector, since it
seemed to me it was better that way that duplicating the code, and those
SelectorMap functions only have a single caller anyway.

Depends on D32646

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:41 +00:00
Emilio Cobos Álvarez
838e209b31 Bug 1505489 - Collect ::part() rules during CascadeData rebuilds. r=heycam
Unlike for :host() or ::slotted(), or regular rules, we don't need a whole
SelectorMap<>, so gotta make the code a bit more generic.

Depends on D32645

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:32 +00:00
Emilio Cobos Álvarez
b2875e0362 Bug 1505489 - Add an extra flag to flag ::part() to selectors. r=heycam
This grows the selector struct, but only in 32-bit, since in 64-bit we take
space from the alignment padding that we're paying due to having the size of the
slice as a word.

Depends on D32644

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:23 +00:00
Emilio Cobos Álvarez
0d984c302b Bug 1505489 - Don't go through all the part names if not there. r=jwatt
This uses the bit added for tracking part attributes in order to avoid doing
wasted work.

Depends on D32643

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:09 +00:00
Emilio Cobos Álvarez
103cf22ede Bug 1505489 - Add plumbing code to invalidate shadow parts. r=heycam
Still does nothing, since we still do not collect part rules, but this is all
the plumbing that should allow us to invalidate parts when attributes or state
change on their ancestors.

Depends on D32641

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:41:51 +00:00
Emilio Cobos Álvarez
351d40e7c3 Bug 1557430 - Add memory reporters for SVG mapped attribute declarations. r=njn,heycam
These are owned by the element and not referenced from the stylesheets.

They're referenced from the rule tree, but the rule nodes don't measure their
style source (since they're non-owning).

So unconditionally reporting them even though it's a refcounted object is ok.

While at it, remove some other fields from the old style system that are no
longer used.

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

--HG--
extra : moz-landing-system : lando
2019-06-08 18:58:57 +00:00
Emilio Cobos Álvarez
67c30d05d2 Bug 1557212 - Use cbindgen for gradients. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D33901

--HG--
extra : moz-landing-system : lando
2019-06-07 14:13:17 +00:00
Daniel Varga
fe7dbedf22 Merge mozilla-inbound to mozilla-central. a=merge 2019-06-07 12:50:35 +03:00
Emilio Cobos Álvarez
e2fcdb0253 Bug 1557403 - Handle default angle in radians. r=me
We were not copying the angle in this case for some reason, and I overlooked
this.
2019-06-06 19:30:03 -04:00
Charlie Marlow
29aa4dbb9a Bug 1555863 added text-decoration-width support to style system including mochitests and web platform tests r=emilio
from-font support will be added later

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

--HG--
extra : moz-landing-system : lando
2019-06-06 17:12:22 +00:00
Emilio Cobos Álvarez
3df59a0cfa Bug 1557110 - Cleanup gradient parsing by removing the simple-moz-gradient parsing pref. r=dholbert
It looks like bug 1547939 will stick, given how fast the other regressions came
in for bug 1337655.

We haven't seen any regression from this, and it seems unlikely that we'd want
this code back.

This blocks further improvements to the style system. Simplifying this code
allows me to remove all the conversion code for gradients.

Let me know if you think it's premature and I'm happy to wait, but I really want
to see this code gone :)

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

--HG--
extra : moz-landing-system : lando
2019-06-06 04:08:52 +00:00
Daniel Holbert
d9ebfdd4d2 Bug 1556855 part 4: Remove support for the layout.css.prefixes.webkit pref. r=mats
From this point on, the webkit-prefixed CSS features that were previously
protected by this pref will now be unconditionally enabled.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 18:23:02 +00:00
Charlie Marlow
da73c04156 Bug 1555150: adding support for CSS text underline offset to the style system r=emilio
support  for from-font listed in the CSS spec will be implemented in a later bug

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

--HG--
extra : moz-landing-system : lando
2019-06-04 22:04:14 +00:00
Coroiu Cristina
b2c75da135 Backed out changeset ba1f75c56457 (bug 1555150) for xpcshell failures at devtools/shared/tests/unit/test_css-properties-db.js 2019-06-04 07:52:50 +03:00
Charlie Marlow
a2861fd11e Bug 1555150: adding support for CSS text underline offset to the style system r=emilio
support  for from-font listed in the CSS spec will be implemented in a later bug

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

--HG--
extra : moz-landing-system : lando
2019-06-03 19:43:08 +00:00
Emilio Cobos Álvarez
749db71829 Bug 1554150 - Hide some appearance values from content. r=mats
They're not used internally either, so remove all ability to address them.

I haven't removed the implementation yet, as some of them are quite complex, and
I don't have a mac / windows build. We should do that when this hits release
though.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 17:32:48 +00:00
Emilio Cobos Álvarez
e088b3760a Bug 1555867 - Report heap size of rule tree heap allocations as well. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D33353

--HG--
extra : moz-landing-system : lando
2019-06-03 16:37:53 +00:00
Emilio Cobos Álvarez
afb4bcad28 Bug 1555867 - Inline one child in the rule tree. r=heycam
It is indeed the most common case according to a bit of measurement.

A non-atypical example from GitHub for example:

> Rule tree stats:
>  0 - 340
>  1 - 1403
>  2 - 28
>  3 - 8
>  4 - 2
>  6 - 1
>  7 - 3
>  8 - 2
>  12 - 2
>  14 - 1
>  41 - 1
>  45 - 1
>  67 - 1
>  68 - 1

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

--HG--
extra : moz-landing-system : lando
2019-06-03 16:37:45 +00:00
Emilio Cobos Álvarez
d34afb7b9d Bug 1555867 - Add some very basic rule tree stats that can be enabled with trace-level logging. r=heycam
This is useful to analyze the shape of the rule tree at a glance.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 16:37:34 +00:00
Evgeniy Reizner
8e33a62cdd Bug 1556388 - Do not use borrowed types in the selectors::Element trait. r=emilio
This cherry-picks https://github.com/servo/servo/pull/23463 with a few fixes for
the Gecko build.
2019-06-03 09:12:17 -04:00
Emilio Cobos Álvarez
b58cd8f644 Bug 1556388 - Fix Servo build. 2019-06-03 09:12:15 -04:00
Emilio Cobos Álvarez
63da4ebdab Bug 1556388 - Appease tidy. 2019-06-03 09:12:13 -04:00
Emilio Cobos Álvarez
66b65a1241 Bug 1556388 - Rustfmt recent changes. 2019-06-03 09:12:12 -04:00