Граф коммитов

13355 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez b9b9e38dd9 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-22 09:45:40 +00:00
Emilio Cobos Álvarez 40b0214e2c Bug 1646811 - Fix gecko build.
Depends on D80248

Differential Revision: https://phabricator.services.mozilla.com/D80249
2020-06-18 18:14:29 +00:00
Emilio Cobos Álvarez 3222b8debd Bug 1646811 - Remove some unused extern crate declarations now that style is in rust 2018.
This avoids some warnings.

Depends on D80247

Differential Revision: https://phabricator.services.mozilla.com/D80248
2020-06-18 18:14:24 +00:00
Emilio Cobos Álvarez 886d53972c Bug 1646811 - servo: Remove the dependency on font-kit from style.
No good reason to have this IMO, and helps remove some #[cfg] blocks.

Depends on D80246

Differential Revision: https://phabricator.services.mozilla.com/D80247
2020-06-18 18:14:21 +00:00
Emilio Cobos Álvarez 9077e6a4a9 Bug 1646811 - Fix servo build.
Depends on D80245

Differential Revision: https://phabricator.services.mozilla.com/D80246
2020-06-18 18:14:13 +00:00
Emilio Cobos Álvarez 3eaf5b6acb Bug 1646811 - Sync some comment changes from servo.
Depends on D80244

Differential Revision: https://phabricator.services.mozilla.com/D80245
2020-06-18 18:14:10 +00:00
Martin Robinson ce1653098e Bug 1646811 - servo: Combine AnimationAndTransitionDeclarations and AnimationRules.
These two structs are very similar, so we can combine them.

Depends on D80243

Differential Revision: https://phabricator.services.mozilla.com/D80244
2020-06-18 18:14:07 +00:00
Martin Robinson 0346b7de29 Bug 1646811 - servo: Add animation and transition support for pseudo-elements.
This change extends the DocumentAnimationSet to hold animations for
pseudo-elements. Since pseudo-elements in Servo are not in the DOM like
in Gecko, they need to be handled a bit carefully in stylo.  When a
pseudo-element has an animation, recascade the style. Finally, this
change passes the pseudo-element string properly to animation events.

Fixes: #10316

Depends on D80242

Differential Revision: https://phabricator.services.mozilla.com/D80243
2020-06-18 18:14:05 +00:00
Martin Robinson d406afe4e6 Bug 1646811 - servo: Add DocumentAnimationSet and AnimationSetKey.
This will be used in order to hold animations for pseudo elements in the
DocumentAnimationSet. Also no longer store the OpaqueNode in the
animation and transition data structures. This is already part of the
DocumentAnimationSet key.

Depends on D80241

Differential Revision: https://phabricator.services.mozilla.com/D80242
2020-06-18 18:14:02 +00:00
Matthias Deiml 1a949f1378 Bug 1646811 - servo: Implement visibility for layout_2020.
Depends on D80240

Differential Revision: https://phabricator.services.mozilla.com/D80241
2020-06-18 18:13:59 +00:00
Utsav Oza 6817ed6eaa Bug 1646811 - servo: Derive Serialize and Deserialize traits for font styles.
Depends on D80239

Differential Revision: https://phabricator.services.mozilla.com/D80240
2020-06-18 18:13:56 +00:00
Utsav Oza d2b54e0692 Bug 1646811 - servo: Enable textAlign, textBaseline and direction attributes for canvas.
Depends on D80238

Differential Revision: https://phabricator.services.mozilla.com/D80239
2020-06-18 18:12:56 +00:00
Utsav Oza 464c001324 Bug 1646811 - servo: Implement CanvasRenderingContext2D.font property.
Depends on D80237

Differential Revision: https://phabricator.services.mozilla.com/D80238
2020-06-18 18:12:46 +00:00
Martin Robinson 27f264de00 Bug 1646811 - servo: animations: Don't always re-resolve the node style.
When animations and transitions change don't always re-resolve node
style, just replace the animation and transition rules and re-cascade.

Depends on D80236

Differential Revision: https://phabricator.services.mozilla.com/D80237
2020-06-18 18:12:34 +00:00
Simon Sapin 0dc1b939cb Bug 1646811 - servo: Enable parsing of `flex-*` properties for layout-2020.
Depends on D80235

Differential Revision: https://phabricator.services.mozilla.com/D80236
2020-06-18 18:12:23 +00:00
Martin Robinson 7b23d8c773 Bug 1646811 - servo: Include animations and transitions in the cascade.
Instead of applying animations and transitions to styled elements,
include them in the cascade. This allows them to interact properly with
things like font-size and !important rules.

Depends on D80234

Differential Revision: https://phabricator.services.mozilla.com/D80235
2020-06-18 18:12:14 +00:00
Martin Robinson 697bb739d1 Bug 1646811 - servo: Better computation of animation keyframes.
This begins to address #26625 by properly applying CSS variables during
keyframe computation and no longer using `apply_declarations`. Instead,
walk the declarations, combining them into IntermediateComputedKeyframe,
maintaining declarations that modify CSS custom properties. Then compute
a set of AnimationValues for each keyframe and use those to produce
interpolated animation values.

Depends on D80233

Differential Revision: https://phabricator.services.mozilla.com/D80234
2020-06-18 18:12:07 +00:00
Martin Robinson 0afc032d4b Bug 1646811 - servo: Cache animation computed values when animations change.
Instead of recalculating the animation style every tick of an animation,
cache the computed values when animations change. In addition to being
more efficient, this will allow us to return animation rules as property
declarations because we don't need to consult the final style to produce
them.

Depends on D80232

Differential Revision: https://phabricator.services.mozilla.com/D80233
2020-06-18 18:11:57 +00:00
Simon Sapin f1f1e8df2b Bug 1646811 - Enable `order` in layout-2020.
Depends on D80231

Differential Revision: https://phabricator.services.mozilla.com/D80232
2020-06-18 18:11:47 +00:00
Simon Sapin ce5f91aa47 Bug 1646811 - servo: Gate layout 2020 flex implementation behind a pref.
Differential Revision: https://phabricator.services.mozilla.com/D80231
2020-06-18 18:11:39 +00:00
Simon Sapin 7c14e4e23e Bug 1633410 - Back out bug 1631721.
Rebased and squashed.

Differential Revision: https://phabricator.services.mozilla.com/D78174
2020-06-18 15:25:33 +00:00
Cosmin Sabou 65d75a47f3 Backed out changeset 299e19193e11 (bug 1646224) for causing font related failures. CLOSED TREE 2020-06-18 18:26:51 +03:00
Emilio Cobos Álvarez 090e3d2409 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-18 13:55:03 +00:00
Emilio Cobos Álvarez 28c68306b3 Bug 1646546 - Port the style crate to rust 2018. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D80101
2020-06-17 23:40:30 +00:00
Emilio Cobos Álvarez 7b1b460d78 Bug 1646546 - Fix some manual occurrences of try(). r=boris
Depends on D80099

Differential Revision: https://phabricator.services.mozilla.com/D80100
2020-06-17 22:27:45 +00:00
Emilio Cobos Álvarez b774002cf9 Bug 1646546 - Switch all callsites of try() to try_parse() in the style crate. r=boris
Fully automated via:

  $ rg -l '\.try\(' | xargs sed -i 's/\.try(/.try_parse(/g'
  $ cd servo/components/style && cargo +nightly fmt

Differential Revision: https://phabricator.services.mozilla.com/D80099
2020-06-17 22:27:37 +00:00
Philipp Zech 169b68c745 Bug 1636205 - Remove StyleFontSize enum from nsStyleConsts.h. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77511
2020-06-17 11:08:44 +00:00
Emilio Cobos Álvarez ffec6f608b Bug 1643656 - Remove prefers-color-scheme: no-preference. r=gl,remote-protocol-reviewers,hiro,whimboo
It was removed from the spec.

Differential Revision: https://phabricator.services.mozilla.com/D78834
2020-06-14 23:26:04 +00:00
Emilio Cobos Álvarez 58bb0b25d9 Backed out 2 changesets (bug 477157) for border rendering regressions.
Backed out changeset 04543b8ded50 (bug 477157)
Backed out changeset 5df17ecbcaa1 (bug 477157)

MANUAL PUSH: backout
2020-06-14 11:45:06 +02:00
Emilio Cobos Álvarez 4cb5da08a2 Bug 1640623 - Use an enum class for LookAndFeel::FontID. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D76696
2020-06-11 11:27:58 +00:00
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