Commit Graph

12775 Commits

Author SHA1 Message Date
Boris Chiou
03853a6e87 Bug 1574957 - Clamp negative values for font-size-adjust animations. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D42586

--HG--
extra : moz-landing-system : lando
2019-08-20 01:30:43 +00:00
Dzmitry Malyshau
9875e48074 Bug 1575008 - Update parking_lot dependency to 0.9.0 r=aosmond
Updating parking_lot would allow us to avoid dependency duplication when WebGPU tree is vendored.

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

--HG--
rename : third_party/rust/parking_lot_core/src/thread_parker/wasm.rs => third_party/rust/parking_lot_core/src/thread_parker/wasm_atomic.rs
extra : moz-landing-system : lando
2019-08-19 21:28:51 +00:00
Emilio Cobos Álvarez
6a74af6652 Bug 1572738 - Don't clamp font-size calc() factors too early. r=manishearth
These two bugs (bug 1572738 and bug 1572451) are stylo regressions.

When font-family changes, we try to recompute the font-size with a length /
percentage combinations in case the generic family changes, so the user
preferences are kept.

When calc() is involved, we clamp to non-negative too early, via
NonNegativeLength::scale_by.

I think we should generally dump this "try to track font-size across calc()"
thingie, as as various comments note it is not quite perfect, and it's not clear
how it should work in presence of min()/max().

This patch fixes the issue and simplifies code a bit, I may consider removing
this altogether in a follow-up.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 19:59:48 +00:00
Emilio Cobos Álvarez
a03875ef63 Bug 1568536 - Simplify some style system APIs. r=heycam
Return a raw pointer instead of a strong reference to a ComputedStyle, and
handle the case of the style not being present by returning null rather than
requiring an extra function to check it and crashing if the precondition is not
met.

Also, name them so that it's clear they just return outdated styles and don't
make any extra effort.

This is just cleanup that makes the next patch easier / more obvious.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 05:59:03 +00:00
Mats Palmgren
1f1f009b71 Bug 1574060 - Implement layout for 'display: flow-root list-item'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42087

--HG--
extra : moz-landing-system : lando
2019-08-16 06:30:24 +00:00
Emilio Cobos Álvarez
4be851e345 Bug 1574148 - Update itertools in the style crate.
It was updated in Servo long ago.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 13:31:47 +00:00
Emilio Cobos Álvarez
3a60b58080 Bug 1574148 - Fix Servo build and unify display representation.
Differential Revision: https://phabricator.services.mozilla.com/D42130

--HG--
extra : moz-landing-system : lando
2019-08-15 13:31:44 +00:00
Emilio Cobos Álvarez
3fb09c923b Bug 1574148 - Fix formatting of recent changes.
Differential Revision: https://phabricator.services.mozilla.com/D42129

--HG--
extra : moz-landing-system : lando
2019-08-15 13:31:37 +00:00
Emilio Cobos Álvarez
7455082edb Bug 1574148 - Cherry-pick some Servo build/formatting fixes.
Differential Revision: https://phabricator.services.mozilla.com/D42128

--HG--
extra : moz-landing-system : lando
2019-08-15 13:31:36 +00:00
Mats Palmgren
c784db904f Bug 1557825 part 1 - Implement 'display:block ruby'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D40211

--HG--
extra : moz-landing-system : lando
2019-08-14 14:38:31 +00:00
Mats Palmgren
740cfc08a3 Bug 1105868 part 3 - Implement 'inline list-item' and 'inline flow-root list-item' values for the 'display' property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39832

--HG--
extra : moz-landing-system : lando
2019-08-14 14:37:03 +00:00
Mats Palmgren
307e0a6d66 Bug 1569825 - Hide some 'display' values in devtools auto-completion that we want to discourage authors from using. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D39810

--HG--
extra : moz-landing-system : lando
2019-08-14 14:35:56 +00:00
Mats Palmgren
6b3058eeb5 Bug 1038294 part 12 - Implement multi-keyword 'display' values for Gecko. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39764

--HG--
extra : moz-landing-system : lando
2019-08-14 14:34:37 +00:00
Charlie Marlow
693746ef3d Bug 1558929: adding from-font support to text-underline-offset and text-decoration-thickness r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D41476

--HG--
extra : moz-landing-system : lando
2019-08-13 17:43:25 +00:00
Emilio Cobos Álvarez
588e375d87 Bug 1573106 - Use shortest serialization for computed text-emphasis-style too. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D41513

--HG--
extra : moz-landing-system : lando
2019-08-13 19:26:02 +00:00
Narcis Beleuzu
043721cdd8 Backed out changeset 0836c998795b (bug 1573106) for wpt failures on accumulation-per-property.html . CLOSED TREE 2019-08-13 05:18:44 +03:00
Emilio Cobos Álvarez
7e441e1dd8 Bug 1573106 - Use shortest serialization for computed text-emphasis-style too. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D41513

--HG--
extra : moz-landing-system : lando
2019-08-12 21:31:52 +00:00
Emilio Cobos Álvarez
6283631506 Bug 1572805 - Adjust comment grammar as suggested by xidorn. r=comment-only
MANUAL PUSH: Comment only post-review fixup

DONTBUILD
2019-08-11 22:47:15 +02:00
Razvan Maries
c9a1909817 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-08-11 12:48:00 +03:00
Csoregi Natalia
99bc0eceee Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-08-11 00:39:45 +03:00
Csoregi Natalia
6d04491407 Merge inbound to mozilla-central. a=merge 2019-08-11 00:28:20 +03:00
Emilio Cobos Álvarez
20dc132b08 Bug 1553545 - Remove now-incorrect comment. r=comment-only
MANUAL PUSH: Comment-only fixup to an inbound patch.

DONTBUILD
2019-08-10 18:40:18 +02:00
Joel Olsson
aa7bc8f357 Bug 1553545 - Enable font-size:xxx-large. r=emilio
MANUAL PUSH: Manually fixed up contributor's patch stack to squash the two patches in the bug.

Differential Revision: https://phabricator.services.mozilla.com/D41240
2019-08-10 18:32:33 +02:00
Charlie Marlow
ab6f4c453d Bug 1572303: updating text-underline-offset to support ::first-line/first-letter/placeholder r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D41227

--HG--
extra : moz-landing-system : lando
2019-08-09 04:58:10 +00:00
Csoregi Natalia
3edad1f4b7 Merge mozilla-central to autoland. CLOSED TREE 2019-08-11 00:36:21 +03:00
Emilio Cobos Álvarez
1322bb7290 Bug 1572805 - Undo last minute serialization change so that I can land it with tests. r=me
MANUAL PUSH: bustage, some WPTs need updating.
2019-08-10 22:21:12 +02:00
Emilio Cobos Álvarez
6068035edc Bug 1572805 - Use cbindgen for text-emphasis-style. r=boris
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)

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

--HG--
extra : moz-landing-system : lando
2019-08-10 18:11:31 +00:00
Emilio Cobos Álvarez
60447df0e6 Bug 1572805 - Simplify text-emphasis-style. r=boris,xidorn
Differential Revision: https://phabricator.services.mozilla.com/D41418

--HG--
extra : moz-landing-system : lando
2019-08-10 18:15:37 +00:00
Daniel Varga
3430859a68 Backed out 2 changesets (bug 1572805) for build-rusttests failure. On a CLOSED TREE
Backed out changeset 849ca4b3f9de (bug 1572805)
Backed out changeset 81b56d76505a (bug 1572805)
2019-08-10 21:07:03 +03:00
Emilio Cobos Álvarez
ccd8c3bedc Bug 1572805 - Use cbindgen for text-emphasis-style. r=boris
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)

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

--HG--
extra : moz-landing-system : lando
2019-08-10 16:21:15 +00:00
Emilio Cobos Álvarez
5d9d9b9844 Bug 1572805 - Simplify text-emphasis-style. r=boris,xidorn
Differential Revision: https://phabricator.services.mozilla.com/D41418

--HG--
extra : moz-landing-system : lando
2019-08-10 16:23:52 +00:00
Emilio Cobos Álvarez
56df9575bc Bug 1499000 - Don't do CORS checks on CSS images with the resource:// scheme. r=bzbarsky
CORS only works on http channels, so anything else that tries to do a
CORS-enabled request fails catastrophically.

resource:// images are useful for extension developers, so don't perform CORS
checks on them. We may want to also do file:// and fix bug 1565509, while at it,
if we consider it's causing developer pain.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 18:09:55 +00:00
Charlie Marlow
b469e3daed Bug 1572304: updating text-decoration-skip-ink to support ::first-line/first-letter/placeholder r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D41228

--HG--
extra : moz-landing-system : lando
2019-08-08 18:44:03 +00:00
Nicholas Nethercote
2c0b69fee1 Bug 1563555 - Use static_prefs::pref! in Stylo. r=emilio
It's much nicer.

One nice thing about this is that the new code is subject to the existing
threadedness checking, which identified that several of these should be atomic
because they're accessed off the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 22:58:55 +00:00
Charlie Marlow
be2d349416 Bug 1555865: added text-decoration-thickness to the text-decoration shorthands r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D40335

--HG--
extra : moz-landing-system : lando
2019-08-07 17:42:15 +00:00
Cosmin Sabou
9453cf60bf Backed out 2 changesets (bug 1563555) for causing marionette failures on test_profile_management.py.
Backed out changeset 2559f5ddf8e0 (bug 1563555)
Backed out changeset e3c86ffa168c (bug 1563555)

--HG--
extra : histedit_source : 8569cceff2845f697109e2077a00c96074c7fe83
2019-08-07 12:09:13 +03:00
Nicholas Nethercote
b723ddbe42 Bug 1563555 - Use static_prefs::pref! in Stylo. r=emilio
It's much nicer.

One nice thing about this is that the new code is subject to the existing
threadedness checking, which identified that several of these should be atomic
because they're accessed off the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 04:17:08 +00:00
Boris Chiou
e158ad1169 Bug 1339672 - Support multiple track sizes for grid-auto-{columns|rows}. r=emilio,mats
Support `<track-size>+` on the implicit track sizing properties,
grid-auto-columns and grid-auto-rows.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 18:32:16 +00:00
Emilio Cobos Álvarez
9e60b0219a Bug 1571537 - Don't write manual glue code for the order property. r=boris
The default code works just as well.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 12:08:47 +00:00
Emilio Cobos Álvarez
bbb4b8dac6 Bug 1519958 - followup: Fix bustage in 32-bit builds and rust unit tests. r=me
CLOSED TREE
2019-08-05 22:53:35 +02:00
Emilio Cobos Álvarez
30fc8c8c4d Bug 1519958 - Improve stack size of grid templates and re-enable style struct size assertions disabled in the previous patch. r=boris
This re-enables the assertion which was disabled on the previous patch by doing
a bit of boxing around.

Differential Revision: https://phabricator.services.mozilla.com/D36599
2019-08-05 22:13:33 +02:00
Emilio Cobos Álvarez
1f3d6c04f2 Bug 1519958 - Refactor grid types to preserve repeat() at computed value time and use cbindgen. r=mats,boris
I'm _really_ sorry for the size of the patch. I tried to do this in two steps
but it was a lot of work and pretty ugly.

This patch makes us use cbindgen for grid-template-{rows,columns}, in order to:

 * Make us preserve repeat() at computed-value time. This is per spec since
   interpolation needs to know about repeat(). Except for subgrid, which did the
   repeat expansion at parse-time and was a bit more annoying (plus it doesn't
   really animate yet so we don't need it to comply with the spec).

 * Tweaks the WPT tests for interpolation to adopt the resolution at:
   https://github.com/w3c/csswg-drafts/issues/3503.

Trade-off here, as this patch stands, is that this change makes us use less
long-living memory, since we expand repeat() during layout, but at the cost of a
bit of CPU time during layout (conditional on the property applying though,
which wasn't the case before). It should be very easy to store a cached version
of the template, should this be too hot (I expect it isn't), or to change the
representation in other ways to optimize grid layout code if it's worth it.

Another trade-off: I've used SmallPointerArray to handle line-name merging,
pointing to the individual arrays in the style data, rather than actually
heap-allocating the merged lists. This would also be pretty easy to change
should we measure and see that it's not worth it.

This patch also opens the gate to potentially improving memory usage in some
other ways, by reference-counting line-name lists for example, though I don't
have data that suggests it is worth it.

In general, this patch makes much easier to tweak the internal representation of
the grid style data structures. Overall, I think it's a win, the amount of magic
going on in that mako code was a bit huge; it took a bit to wrap my head around
it.

This patch comments out the style struct size assertions. They will be
uncommented in a follow-up patch which contains some improvements for this type,
which are worth getting reviewed separately.

Also, this patch doesn't remove as much code as I would've hoped for because of
I tried not to change most of the dom/grid code for inspector, but I think a
fair bit of the nsGridContainerFrame.cpp code that collects information for it
can be simplified / de-copy-pasted to some extent. But that was a pre-existing
problem and this patch is already quite massive.

Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-08-05 22:13:21 +02:00
Emilio Cobos Álvarez
6515ac7225 Bug 1571151 - Expand and simplify a macro that's not very useful. r=boris
Skip whitespace upfront rather than on each individual branch. The only
difference in behavior is that we would've consumed some extra whitespace in the
error case, but I don't think that matters at all.

We were consuming some extra whitespace as well after the close path command for
example, which wasn't parsing anything.

Depends on D40538

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

--HG--
extra : moz-landing-system : lando
2019-08-03 10:05:14 +00:00
Emilio Cobos Álvarez
8374c113aa Bug 1571151 - Deindent a bit SVG path parsing code. r=boris
None cannot be returned, since we just called peek() and it returned something.

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

--HG--
extra : moz-landing-system : lando
2019-08-03 10:01:58 +00:00
Emilio Cobos Álvarez
0f118f30e5 Bug 1404140 - Remove the GetCSNeedsLayoutFlush flag, as it is unneeded now. r=heycam
MANUAL PUSH: Would need to reorder the stack manually (https://bugzilla.mozilla.org/show_bug.cgi?id=1481539)

Differential Revision: https://phabricator.services.mozilla.com/D40300
2019-08-03 04:10:55 +02:00
Emilio Cobos Álvarez
b38e7248ab Bug 1404140 - Don't flush layout for layout-dependent properties if we know that it won't affect the result. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D40299
2019-08-03 04:09:13 +02:00
Boris Chiou
f7b833b7ce Bug 1559231 - Make offset-anchor animatable. r=birtles
Per the spec issue, https://github.com/w3c/csswg-drafts/issues/3482,
we update the wpt to keep the percentage in `calc()` for `offset-anchor`.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 20:12:40 +00:00
Boris Chiou
b91b90c199 Bug 1559231 - Support offset-anchor. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39432

--HG--
extra : moz-landing-system : lando
2019-08-02 20:12:38 +00:00
Brindusan Cristian
0b3e26149c Backed out 2 changesets (bug 1559231) for rusttests build bustages. CLOSED TREE
Backed out changeset d47d9f4bf9a9 (bug 1559231)
Backed out changeset 50f92d01c47a (bug 1559231)
2019-08-02 21:55:37 +03:00
Boris Chiou
4dbc9ab7ef Bug 1559231 - Make offset-anchor animatable. r=birtles
Per the spec issue, https://github.com/w3c/csswg-drafts/issues/3482,
we update the wpt to keep the percentage in `calc()` for `offset-anchor`.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 00:47:09 +00:00