Commit Graph

12673 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
26197b29e2 Bug 1563484 - Apply text-only zoom to system fonts. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D36893

--HG--
extra : moz-landing-system : lando
2019-07-05 21:31:40 +00:00
Calixte Denizet
8cff6b528a Bug 1559975 - Fix python3 lint issues on servo r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35247

--HG--
extra : moz-landing-system : lando
2019-07-05 14:29:44 +00:00
Emilio Cobos Álvarez
18e6e5dc1e Bug 1561283 - Don't optimize out recascading of children when becoming or stopping being display: contents. r=dholbert
Since they can change whether descendants get blockified.

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:39:47 +00:00
Emilio Cobos Álvarez
be10aa358a No bug - rustfmt recent changes. r=whitespace-only 2019-06-29 23:00:11 +02:00
Hugh Gallagher
d18768244b Bug 1560494 - In CounterStyleOrNone check if SymbolsType is symbolic and skip if it is. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D36235

--HG--
extra : moz-landing-system : lando
2019-06-28 16:10:13 +00:00
Emilio Cobos Álvarez
b1ca51fe1e Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

Differential Revision: https://phabricator.services.mozilla.com/D36120
2019-06-28 12:44:44 +02:00
Emilio Cobos Álvarez
6dea92be38 Bug 1561738 - Stop using nsStyleSides for -moz-image-rect. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36119
2019-06-28 12:44:43 +02:00
Emilio Cobos Álvarez
0a4d4343b9 Bug 1561738 - Use cbindgen for grid track sizing. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36118
2019-06-28 12:44:43 +02:00
Cosmin Sabou
2fa2a56685 Backed out 3 changesets (bug 1561738) for causing build bustages on nsGridContainerFrame.cpp CLOSED TREE
Backed out changeset 98f100abc2ba (bug 1561738)
Backed out changeset 9ed20d0fb9ba (bug 1561738)
Backed out changeset 483b1e134ace (bug 1561738)
2019-06-28 13:27:09 +03:00
Emilio Cobos Álvarez
e023916761 Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

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

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:26 +00:00
Emilio Cobos Álvarez
02348421e4 Bug 1561738 - Stop using nsStyleSides for -moz-image-rect. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36119

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:17 +00:00
Emilio Cobos Álvarez
9d92ed9a07 Bug 1561738 - Use cbindgen for grid track sizing. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36118

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:02 +00:00
Charlie Marlow
8d6b1bcaa4 Bug 1561131: Adding parsing support for text-decoration-skip-ink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D35831

--HG--
extra : moz-landing-system : lando
2019-06-27 21:34:33 +00:00
Andreea Pavel
ea400c1438 Backed out changeset 21d365e43fec (bug 1561131) for failing test_bug1112014.html on a CLOSED TREE 2019-06-28 00:12:41 +03:00
Charlie Marlow
3f0f7ff856 Bug 1561131: Adding parsing support for text-decoration-skip-ink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D35831

--HG--
extra : moz-landing-system : lando
2019-06-27 18:09:10 +00:00
Emilio Cobos Álvarez
ca7c3716eb Bug 1552578 - Restrict properties that apply to ::marker for now. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D31680
2019-06-27 13:27:40 +02:00
Cameron McCormack
9bbe5b00a3 Bug 1554571 - Part 3: Cache computed styles of scrollbar part anonymous content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33123

--HG--
extra : moz-landing-system : lando
2019-06-27 07:22:22 +00:00
Cameron McCormack
5bf528676e Bug 1554571 - Part 1: Remove unused argument from Servo_ResolveStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33121

--HG--
extra : moz-landing-system : lando
2019-06-27 07:22:13 +00:00
Mihai Alexandru Michis
b485399185 Backed out 4 changesets (bug 1554571) for causing failures in minimal-xul.css
Backed out changeset 1cc4e6374b8a (bug 1554571)
Backed out changeset 30728685499e (bug 1554571)
Backed out changeset c14e9c381345 (bug 1554571)
Backed out changeset a2143551d7bc (bug 1554571)

--HG--
extra : rebase_source : 4b4442d96eb40e57b0a9834b4048b11f9be1a964
2019-06-27 07:09:55 +03:00
Mihai Alexandru Michis
c97c5547e7 Backed out changeset 7423f5bc275c (bug 1552578) for causing failures in test_marker_restrictions.html. CLOSED TREE 2019-06-27 05:52:48 +03:00
Emilio Cobos Álvarez
5fa55a81bc Bug 1552578 - Restrict properties that apply to ::marker for now. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D31680

--HG--
extra : moz-landing-system : lando
2019-06-27 00:53:45 +00:00
Cameron McCormack
8538a62557 Bug 1554571 - Part 3: Cache computed styles of scrollbar part anonymous content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33123

--HG--
extra : moz-landing-system : lando
2019-06-27 00:25:03 +00:00
Cameron McCormack
60ac348ac5 Bug 1554571 - Part 1: Remove unused argument from Servo_ResolveStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33121

--HG--
extra : moz-landing-system : lando
2019-06-27 00:24:54 +00:00
Connor Brewster
691d3c2a59 Bug 1555165 - Part 1: Parse backdrop-filter CSS property r=emilio,boris
Differential Revision: https://phabricator.services.mozilla.com/D35816

--HG--
extra : moz-landing-system : lando
2019-06-26 23:02:16 +00:00
Emilio Cobos Álvarez
3ff14f467f Bug 1547231 - Add an internal aspect-ratio CSS property. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29037

--HG--
extra : moz-landing-system : lando
2019-06-26 22:10:04 +00:00
Emilio Cobos Álvarez
e86340308c Bug 1559814 - Use the cbindgen representation for grid line properties. r=mats
We clamp earlier (parse time rather than computed value time), but that's the
only behavior change, which I think doesn't really matter.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 21:21:38 +00:00
Emilio Cobos Álvarez
914637451c Bug 1559814 - Generate top-level function and constant declarations for the style crate. r=heycam
This needs https://github.com/eqrion/cbindgen/pull/362, but I expect it to be
uncontroversial. I'll add a patch to this bug when it's merged to update it.

cbindgen historically didn't include these, but it turns out to be pretty useful
to generate constants for the style crate (since the binding crate is
`servo/ports/geckolib`).

An alternative is to get a completely different cbindgen-generated header for
these, but that seems a bit wasteful. This generates the constants with the
Style prefix (so we'll get `StyleMAX_GRID_LINE` for example), which is very
ugly. But we probably want to eventually stop using the Style prefix and use a
namespace instead, plus it's trivial to do `auto kMaxLine = StyleMAX_GRID_LINE`,
for example, so it's probably not a huge deal.

Another alternative would be to use associated consts, which _are_ generated by
cbindgen. Something like:

```
struct GridConstants([u8; 0]);
impl GridConstants {
    const MAX_GRID_LINE: i32 = 10000;
}
```

Which would yield something like:

```
static const int32 StyleGridConstants_MAX_GRID_LINE = 10000;
```

I'm not sure if you find it preferrable, but I'm also happy to change it in a
follow-up to use this.

We need to fix a few manual C++ function signature definitions to match the C++
declaration.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 21:21:28 +00:00
Emilio Cobos Álvarez
96113a798b Bug 1559814 - Use a more similar representation in Rust and C++ for grid lines. r=heycam
Option<> is not FFI-safe, so if we want to use the same representation
everywhere we need to get rid of it. This also makes it take the same amount of
memory as the C++ representation, and it's not very complex, I'd think.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 21:21:06 +00:00
Mihai Alexandru Michis
0f86a6b30b Backed out 4 changesets (bug 1559814) for causing bustages. CLOSED TREE
Backed out changeset 11ec9de59076 (bug 1559814)
Backed out changeset fec03c5d3661 (bug 1559814)
Backed out changeset 62f9d89fb827 (bug 1559814)
Backed out changeset 362d9435ca4e (bug 1559814)
2019-06-27 00:04:50 +03:00
Emilio Cobos Álvarez
f792986565 Bug 1559814 - Use the cbindgen representation for grid line properties. r=mats
We clamp earlier (parse time rather than computed value time), but that's the
only behavior change, which I think doesn't really matter.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 20:33:23 +00:00
Emilio Cobos Álvarez
48ab92e23c Bug 1559814 - Generate top-level function and constant declarations for the style crate. r=heycam
This needs https://github.com/eqrion/cbindgen/pull/362, but I expect it to be
uncontroversial. I'll add a patch to this bug when it's merged to update it.

cbindgen historically didn't include these, but it turns out to be pretty useful
to generate constants for the style crate (since the binding crate is
`servo/ports/geckolib`).

An alternative is to get a completely different cbindgen-generated header for
these, but that seems a bit wasteful. This generates the constants with the
Style prefix (so we'll get `StyleMAX_GRID_LINE` for example), which is very
ugly. But we probably want to eventually stop using the Style prefix and use a
namespace instead, plus it's trivial to do `auto kMaxLine = StyleMAX_GRID_LINE`,
for example, so it's probably not a huge deal.

Another alternative would be to use associated consts, which _are_ generated by
cbindgen. Something like:

```
struct GridConstants([u8; 0]);
impl GridConstants {
    const MAX_GRID_LINE: i32 = 10000;
}
```

Which would yield something like:

```
static const int32 StyleGridConstants_MAX_GRID_LINE = 10000;
```

I'm not sure if you find it preferrable, but I'm also happy to change it in a
follow-up to use this.

We need to fix a few manual C++ function signature definitions to match the C++
declaration.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 20:33:14 +00:00
Emilio Cobos Álvarez
9228dbbbfa Bug 1559814 - Use a more similar representation in Rust and C++ for grid lines. r=heycam
Option<> is not FFI-safe, so if we want to use the same representation
everywhere we need to get rid of it. This also makes it take the same amount of
memory as the C++ representation, and it's not very complex, I'd think.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 20:32:49 +00:00
Nicholas Nethercote
41b679b6e2 Bug 1561216 - Change StaticPrefs from a class to a namespace. r=froydnj
This doesn't change the way C++ code uses static prefs. But it does slightly
change how Rust code uses static prefs, specifically the name generated by
bindgen is slightly different.

The commit also improves some comments.

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

--HG--
extra : rebase_source : 13cf215aeb713e188103ef0cd04d094aa150853e
2019-06-25 10:36:59 +10:00
Alastor Wu
b501f4f9fe 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-25 00:32:07 +00:00
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