Commit Graph

13325 Commits

Author SHA1 Message Date
neil
6b1f254a89 Bug 1641324 Remove the layout.css.scrollbar-width.enabled and layout.css.scrollbar-color.enabled prefs r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D78400
2020-06-10 13:16:34 +00:00
Emilio Cobos Álvarez
e8caef7a14 Bug 477157 - Ceil border and outline widths to 1 dev px at computed value time, but don't floor others to dev pixels until paint time. r=mats,dbaron
This seems to match what other browsers do, and seems saner layout-wise,
at least.

I only annotated outline-width-interpolation.html because it's already
fixed upstream in:

  8a489657bc

Differential Revision: https://phabricator.services.mozilla.com/D75360
2020-06-10 10:44:32 +00:00
Razvan Maries
f761608e79 Backed out changeset bca9f7459a16 (bug 1643656) for reftests perma failures. CLOSED TREE 2020-06-09 18:24:48 +03:00
Emilio Cobos Álvarez
6b86e22f72 Bug 1643656 - Remove prefers-color-scheme: no-preference. r=gl,remote-protocol-reviewers,hiro,whimboo
It was removed from the spec. Bug 1643934 updates the WPT tests.

Differential Revision: https://phabricator.services.mozilla.com/D78834
2020-06-09 13:21:54 +00:00
Colomban Wendling
120fea1c42 Bug 1628762 - Fix tree column header color to follow theme. r=geckoview-reviewers,snorp
The background color for the tree column headers is drawn using the
system APIs, but the foreground uses custom colors, which didn't follow
theme.  This can lead to unreadable text with specific colors, e.g.
leading to black on black.

Fix this by using system colors for the foreground as well.  It also
adds on-hover styling to match possible background change on hover.

Differential Revision: https://phabricator.services.mozilla.com/D78073
2020-06-03 20:52:55 +00:00
Cameron McCormack
5e27c1bd6b Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-05 00:39:50 +00:00
Emilio Cobos Álvarez
15e3db4260 Bug 1643230 - Clear last_parsed_property_id right after successfully parsing the value. r=jwatt
Rather than waiting until parsing another id (successfully or
unsuccessfully).

If we error before we even get to PropertyId::parse, we'd incorrectly
associate the error with the wrong property, incorrectly omitting it
sometimes.

Differential Revision: https://phabricator.services.mozilla.com/D78260
2020-06-05 18:13:14 +00:00
Dorel Luca
fc6456ef88 Backed out changeset bde27b38c9c5 (bug 1643201) for causing Valgrind failures and build bustages 2020-06-04 05:17:11 +03:00
Emilio Cobos Álvarez
a58560613e Bug 1643201 - Rustfmt recent changes.
Depends on D78203

Differential Revision: https://phabricator.services.mozilla.com/D78204
2020-06-04 00:35:41 +00:00
Simon Sapin
0cf71dd3a3 Bug 1643201 - Move most of SequenceWriter::write_item to non-generic functions.
The size of LLVM IR for the `style` crate is reduced by ~1.5% (27k lines out of 1.8M)

CC https://github.com/servo/servo/issues/26713

Depends on D78202

Differential Revision: https://phabricator.services.mozilla.com/D78203
2020-06-04 00:35:30 +00:00
Emilio Cobos Álvarez
25666b5157 Bug 1643201 - Cherry-pick servo changes to use the matches macro from the standard library.
Depends on D78201

Differential Revision: https://phabricator.services.mozilla.com/D78202
2020-06-04 00:35:22 +00:00
Emilio Cobos Álvarez
1afb168e99 Bug 1643201 - Cherry-pick some Servo Cargo.toml cleanups.
Depends on D78200

Differential Revision: https://phabricator.services.mozilla.com/D78201
2020-06-04 00:35:19 +00:00
Emilio Cobos Álvarez
fa85c059f7 Bug 1643201 - Cherry-pick some servo changes to derive_common.
Depends on D78199

Differential Revision: https://phabricator.services.mozilla.com/D78200
2020-06-04 00:35:11 +00:00
Emilio Cobos Álvarez
31ea245f41 Bug 1643201 - Miscellaneous build fixes.
Depends on D78198

Differential Revision: https://phabricator.services.mozilla.com/D78199
2020-06-04 00:35:08 +00:00
Anthony Ramine
b6b478f721 Bug 1643201 - servo: Return the root from the traversal.
Depends on D78196

Differential Revision: https://phabricator.services.mozilla.com/D78198
2020-06-04 00:35:00 +00:00
Martin Robinson
72e28ea0e8 Bug 1643201 - servo: layout_2020: Add support for transitions and animations.
Depends on D78195

Differential Revision: https://phabricator.services.mozilla.com/D78196
2020-06-04 00:34:53 +00:00
Martin Robinson
81d4be443e Bug 1643201 - servo: Implement animation-fill-mode.
Fixes #26460.

Depends on D78194

Differential Revision: https://phabricator.services.mozilla.com/D78195
2020-06-04 00:34:45 +00:00
Simon Sapin
376d2f283e Bug 1643201 - servo: display: contents computes to block on the root element.
Depends on D78193

Differential Revision: https://phabricator.services.mozilla.com/D78194
2020-06-04 00:34:42 +00:00
Martin Robinson
fb83423da6 Bug 1643201 - servo: Remove AnimatedProperty.
This removes an extra layer of abstraction and allows Servo to share
more code with Gecko. In addition, we will need to handle raw
`AnimationValue` structs soon in order to fully implement "faster
reversing of interrupted transitions."

Depends on D78192

Differential Revision: https://phabricator.services.mozilla.com/D78193
2020-06-04 00:34:34 +00:00
Martin Robinson
67b71f76f3 Bug 1643201 - servo: Move most animation processing to script.
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.

Depends on D78191

Differential Revision: https://phabricator.services.mozilla.com/D78192
2020-06-04 00:34:31 +00:00
Martin Robinson
bd72db8c67 Bug 1643201 - servo: layout_2020: Add initial support for getComputedStyle.
This implementation is more-or-less on par with the one from layout_2013
and in some cases better. There are still some cases where we don't
return the correct "resolved value," but this is enough to test
animations and transitions.

Depends on D78190

Differential Revision: https://phabricator.services.mozilla.com/D78191
2020-06-04 00:34:28 +00:00
Martin Robinson
f095ec60bf Bug 1643201 - servo: Split animations and transitions into separate lists.
This change splits the list of animations and transitions, which are
almost always handled differently. It also renames
`ElementAnimationState` to `ElementAnimationSet` and establishes an
`AnimationState` for every transition and animation. This allows us to
stop continually reallocating lists every time a transition or animation
needs to be canceled.

Fixes #14419.

Depends on D78189

Differential Revision: https://phabricator.services.mozilla.com/D78190
2020-06-04 00:34:20 +00:00
Martin Robinson
bf4fd750e3 Bug 1643201 - servo: Start having animations conform to the HTML spec.
This is a small step toward fixing #19242. The main idea is that the
clock for animations should advance as the event loop ticks. We
accomplish this by moving the clock from layout and naming it the
"animation timeline" which is the spec language. This should fix
flakiness with animations and transitions tests where a reflow could
move animations forward while script was running.

This change also starts to break out transition and animation events
into their own data structure, because it's quite likely that the next
step in fixing #19242 is to no longer send these events through a
channel.

Depends on D78188

Differential Revision: https://phabricator.services.mozilla.com/D78189
2020-06-04 00:34:18 +00:00
Martin Robinson
f92e20c3cc Bug 1643201 - servo: Use a restyle for animation ticks.
This change corrects synchronization issues with animations, by
reworking the animation processing model to do a quick restyle and
incremental layout when ticking animations.

While this change adds overhead to animation ticks, the idea is that
this will be the fallback when synchronous behavior is required to
fulfill specification requirements. In the optimistic case, many
animations could be updated and applied off-the-main-thread and then
resynchronized when style information is queried by script.

Fixes #13865.

Depends on D78187

Differential Revision: https://phabricator.services.mozilla.com/D78188
2020-06-04 00:34:15 +00:00
Martin Robinson
f879808ac6 Bug 1643201 - servo: Add support for animationend event.
This is triggered when an animation finishes. This is a high priority
because it allows us to start rooting nodes with animations in the
script thread.

This doesn't yet cause a lot of tests to pass because they rely on the
existence of `Document.getAnimations()` and the presence of
`animationstart` and animationiteration` events.

Depends on D78186

Differential Revision: https://phabricator.services.mozilla.com/D78187
2020-06-04 00:34:12 +00:00
Martin Robinson
05ab25fd1b Bug 1643201 - servo: Split animation cancellation from update_style_for_animation.
`update_style_for_animation` previously handled both canceling defunct
animations and also updating style to reflect current animation state.
This change splits those two concerns because we want to start handling
replaced or canceled animations and finished animations in two different
places.

This is a refactor, so ideally it shouldn't change any behavior.

Depends on D78185

Differential Revision: https://phabricator.services.mozilla.com/D78186
2020-06-04 00:34:09 +00:00
Martin Robinson
35c1ea7756 Bug 1643201 - servo: Restyle should reflect animations and transitions.
When doing a restyle, we should apply animations and transitions to the
new style so that it is reflected in `getComputedStyle()` and the new
style information properly cascades. This is the first part of properly
ticking animations and transitions.

This causes a couple new animations tests failures (along with many new
passes), but we currently don't have support for properly handling
animations after they have completed, so this isn't totally unexpected.

Depends on D78184

Differential Revision: https://phabricator.services.mozilla.com/D78185
2020-06-04 00:34:06 +00:00
Martin Robinson
504f6b82e4 Bug 1643201 - servo: Add ElementAnimationState and PossibleElementAnimationState.
This refactor is preparation for implementing a specification
compliant transitions and animations processing model.

These data structures hold all the animation information about a single
node. Since adding, updating, and modifying animations for a single node
are all interdependent, it makes sense to start encapsulating animation
data and functionality into a single data structure. This also opens up
the possibility for easier concurrency in the future by more easily
allowing per-node mutexes.

Differential Revision: https://phabricator.services.mozilla.com/D78184
2020-06-04 00:34:02 +00:00
Emilio Cobos Álvarez
96b2b6d63a Bug 1643078 - Don't use lazy_static for media feature parsing. r=boris
This used to be needed when destructors in statics were not allowed, but
we can get rid of it nowadays.

Differential Revision: https://phabricator.services.mozilla.com/D78109
2020-06-03 22:43:49 +00:00
Bogdan Tara
ffdcf42e89 Backed out 2 changesets (bug 1642261) for browser_use_counters.js failures CLOSED TREE
Backed out changeset dd4c99038ede (bug 1642261)
Backed out changeset 308d2f7a4a13 (bug 1642261)
2020-06-03 11:43:20 +03:00
Cameron McCormack
061da14b2e Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-03 05:15:21 +00:00
Narcis Beleuzu
726ebdec39 Backed out 2 changesets (bug 1642261) for mochitest failures on test_property_database.html . CLOSED TREE
Backed out changeset 32b26c1984f6 (bug 1642261)
Backed out changeset 68456151c046 (bug 1642261)
2020-06-03 07:30:23 +03:00
Cameron McCormack
8cf9670c90 Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-02 13:15:04 +00:00
Boris Chiou
57938596a7 Bug 1640036 - Update aspec-ratio syntax for HTML IMG mapped ratio. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D76942
2020-05-27 21:43:00 +00:00
Emilio Cobos Álvarez
99ed9d65e3 Bug 1640843 - Finer grained invalidation for attribute changes. r=heycam
This should help out quite a bit with uBO, which has lots of very
general attribute selectors. We invalidate per attribute name rather
than using a SelectorMap, which prevents matching for attribute
selectors that can't have changed.

The idea is that this should be generally cheaper, though there are
cases where this would be a slight pesimization. For example, if there's
an attribute selector like:

  my-specific-element[my-attribute] { /* ... */ }

And you change `my-attribute` in an element that isn't a
`my-specific-element`, before that the SelectorMap would've prevented us
from selector-matching completely. Now we'd still run selector-matching
for that (though the matching would be pretty cheap).

However I think this should speed up things generally, let's see what
the perf tests think before landing this though.

Differential Revision: https://phabricator.services.mozilla.com/D76825
2020-05-27 09:17:47 +00:00
Emilio Cobos Álvarez
9dd644c92d Bug 1640667 - Manually tweak inlining in stateless pseudo selector matching. r=boris
This addresses a minor regression in bloom-matching.html. The common
case here is that there's no selector to the right of the
pseudo-element, so keep that path inline, while keeping all other checks
out of line.

Differential Revision: https://phabricator.services.mozilla.com/D76793
2020-05-27 00:00:52 +00:00
Emilio Cobos Álvarez
7e76f582e7 Bug 1640985 - Remove two useless mem::replace calls. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D76884
2020-05-26 21:58:25 +00:00
Emilio Cobos Álvarez
31c487f429 Bug 1449753 - Remove the @-moz-document url-prefix() hack preference, enable it everywhere. r=jwatt
It doesn't seem like realistically we're going to be able to get rid of
this any time soon.

Differential Revision: https://phabricator.services.mozilla.com/D76809
2020-05-26 09:39:33 +00:00
Emilio Cobos Álvarez
b68f73c01a Bug 1635675 - Implement the ::file-chooser-button pseudo-element. r=jwatt
As per https://github.com/w3c/csswg-drafts/issues/5049.

Don't enable it unconditionally just yet, as the name may change.

I had to move some rules in forms.css because otherwise you get
specificity conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D76214
2020-05-25 23:54:10 +00:00
Narcis Beleuzu
973d9eb6a0 Backed out changeset 82df6f70ec60 (bug 1635675) for lint failure on file-chooser-button-001.tentative.html . CLOSED TREE 2020-05-25 13:49:39 +03:00
Emilio Cobos Álvarez
a39a3a3807 Bug 1635675 - Implement the ::file-chooser-button pseudo-element. r=jwatt
As per https://github.com/w3c/csswg-drafts/issues/5049.

Don't enable it unconditionally just yet, as the name may change.

I had to move some rules in forms.css because otherwise you get
specificity conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D76214
2020-05-21 12:27:54 +00:00
Emilio Cobos Álvarez
0b56353433 Bug 1639756 - Enable :is() and :where() in UA sheets. r=jwatt
This will allow us to clean them up.

Differential Revision: https://phabricator.services.mozilla.com/D76262
2020-05-21 12:10:34 +00:00
sefeng
67c1284c8c Bug 1637307 - Push/Pop dialog to top layer when needed r=smaug,emilio
This patch completes the top layer requirement for showModal()
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-showmodal

Differential Revision: https://phabricator.services.mozilla.com/D74922
2020-05-23 01:45:33 +00:00
Mats Palmgren
7d8f8a5007 Bug 1639664 - Allow 'opacity' on ::first-letter/::first-line pseudos. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D76387
2020-05-21 21:13:10 +00:00
Emilio Cobos Álvarez
f5e6a1beee Bug 1639905 - Derive parse for ShapeRadius. r=boris
Depends on D76331

Differential Revision: https://phabricator.services.mozilla.com/D76332
2020-05-21 18:43:12 +00:00
Emilio Cobos Álvarez
5b0a85dfc3 Bug 1639905 - Derive parse for TextOverflowSide. r=boris
Depends on D76330

Differential Revision: https://phabricator.services.mozilla.com/D76331
2020-05-21 18:44:19 +00:00
Emilio Cobos Álvarez
5786fe2012 Bug 1639905 - Clean up parsing of UnicodeRange. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D76330
2020-05-21 16:52:20 +00:00
Emilio Cobos Álvarez
18af4db46b Bug 1639689 - Support field_bound in #[derive(Parse)]. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D76268
2020-05-21 13:48:36 +00:00
Boris Chiou
5d461fdfee Bug 1635939 - Use style::One for Integer to avoid implementing Mul. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D76207
2020-05-20 21:13:37 +00:00
Boris Chiou
6b78a43a20 Bug 1635939 - Replace AspectRatio with computed::position::Ratio in media-queries. r=emilio
Also, we drop the pref, layout.css.aspect-ratio-number.enabled, becacuse
the spec of css-sizing-4 uses Number now.

Differential Revision: https://phabricator.services.mozilla.com/D75233
2020-05-20 21:13:35 +00:00