Emilio Cobos Álvarez
e04273a4d9
style: Move the overrides to a separate struct in nsPresContext.
...
Just so that we can keep track of these together.
Differential Revision: https://phabricator.services.mozilla.com/D40247
2019-08-15 16:57:56 +02:00
Emilio Cobos Álvarez
07b8666029
style: Simplify emulated medium setup in nsPresContext.
...
Differential Revision: https://phabricator.services.mozilla.com/D40246
2019-08-15 16:57:50 +02:00
Emilio Cobos Álvarez
032347f4ff
style: Fix cursor prefixed aliases to do the right thing.
...
This was an oversight in bug 1520154. We kept the -moz- version in the specified
value but not the computed value.
That's a very peculiar way of making aliases work. This makes them work
consistently as many other aliases instead.
Also, add an assert that would've caught this much much earlier.
Differential Revision: https://phabricator.services.mozilla.com/D40063
2019-08-15 16:57:41 +02:00
Bastien Orivel
f7411db717
Update toml to 0.5 and cbindgen to 0.9
2019-08-13 13:26:13 +02:00
Bastien Orivel
62e46cf87c
Force the std feature for log
...
While trying to build this crate with the gecko feature rust complained
about us using `log::set_boxed_logger` because it requires the std feature
which was not explicitly set in that crate.
2019-08-13 13:24:35 +02:00
Anthony Ramine
8e6591b81b
Fix a panic when using layout 2020
2019-08-06 18:07:31 +02:00
bors-servo
196c511d5e
Auto merge of #23896 - nox:layout-2020, r=SimonSapin
...
Remove most of the things in layout 2020
We keep mostly the query system. There is probably more to delete but
that's a good start I think.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23896 )
<!-- Reviewable:end -->
2019-08-01 08:08:19 -04:00
Anthony Ramine
f8341daf95
Fix compilation errors due to the rebase
...
It's too complicated to make all the commits in that branch compile properly.
2019-08-01 13:50:52 +02:00
Simon Sapin
c38c964f1b
Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)
2019-07-31 13:34:01 +02:00
Emilio Cobos Álvarez
46236d015b
style: Fix some issues with #23856 in Gecko.
2019-07-30 12:06:26 +02:00
Boris Chiou
4813390e60
style: Accept percentage for shape-image-threshold.
...
Differential Revision: https://phabricator.services.mozilla.com/D39241
2019-07-30 12:06:19 +02:00
Simon Sapin
0215d09ccb
Generate apis.html and css-properties.json for docs as part of crates’ build scripts
...
… rather than as an extra step after `cargo doc`.
This helps always using the correct set of CSS properties
(for layout 2013 v.s. 2020).
2019-07-30 08:37:33 +02:00
Simon Sapin
ddb4e369dd
Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}
...
Renaming the variable helped make sure I looked at every use.
2019-07-29 17:37:03 +02:00
Simon Sapin
f1300bb98b
Auto-generate CSSStyleDeclaration.webidl for CSS properties based on the style crate
2019-07-29 17:37:03 +02:00
bors-servo
8f7440f368
Auto merge of #23827 - emilio:gecko-sync, r=emilio,manishearth
...
style: Sync changes from mozilla-central, and update euclid
See individual commits for details.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23827 )
<!-- Reviewable:end -->
2019-07-23 18:42:00 -04:00
Emilio Cobos Álvarez
3d57c22e9c
Update euclid.
...
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.
Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Emilio Cobos Álvarez
2ff7cb5a37
style: Appease tidy.
2019-07-23 22:54:12 +02:00
Emilio Cobos Álvarez
3da8f85914
style: Fix a warning in Servo builds by moving a macro to where it's used.
2019-07-23 22:54:11 +02:00
Emilio Cobos Álvarez
8665d9dc12
Fix Servo build.
2019-07-23 22:54:10 +02:00
longsonr
243520fb27
style: Change dominant-baseline from reset to inherit.
...
Bug: 1353164
Reviewed-by: heycam
2019-07-23 22:54:09 +02:00
Charlie Marlow
6bc1b97a6c
style: renamed text-decoration-width to text-decoration-thickness.
...
Differential Revision: https://phabricator.services.mozilla.com/D38586
2019-07-23 22:54:09 +02:00
Nicolas Silva
239f2da9d9
style: Update to euclid 0.20.
...
Differential Revision: https://phabricator.services.mozilla.com/D38530
2019-07-23 22:54:08 +02:00
Emilio Cobos Álvarez
66eae2fc81
style: Remove the ability to build Gecko without the bindgen feature.
...
This is not used for anything, as far as I can tell.
Differential Revision: https://phabricator.services.mozilla.com/D38584
2019-07-23 22:54:07 +02:00
Emilio Cobos Álvarez
137044a3db
style: Update animations when a pseudo-element had animations but no longer has, and has been re-framed in the meantime.
...
This is the easy fix.
The hard fix (outlined in the comment) would be nice, but I don't think this bug
alone justifies it.
Differential Revision: https://phabricator.services.mozilla.com/D38184
2019-07-23 22:54:06 +02:00
Thomas Nguyen
59cf10d1b0
style: Modify URLExtraData rust debug to include referrerInfo.
...
Differential Revision: https://phabricator.services.mozilla.com/D36475
2019-07-23 22:54:06 +02:00
longsonr
2ab9156401
style: Remove dominant-baseline values that no longer exist.
...
Bug: 1353164
Reviewed-by: heycam
2019-07-23 22:54:05 +02:00
Boris Chiou
87231e676d
style: Add percentage for opacity (i.e. <alpha-value>).
...
The following properties accept <alpha-value> [1], which is
"<number> | <percentage>", so we update the parser, spec links, and
their web-platform-tests.
1. opacity
2. flood-opacity
3. fill-opacity
4. stroke-opacity
5. stop-opacity
6. -moz-window-opacity
Besides, shape-image-threshold [2] still only accepts <number>, so we need
to support a different version of `Opacity::parse()`.
[1] https://drafts.csswg.org/css-color/#typedef-alpha-value
[2] https://drafts.csswg.org/css-shapes/#shape-image-threshold-property
Differential Revision: https://phabricator.services.mozilla.com/D37493
2019-07-23 22:54:04 +02:00
Emilio Cobos Álvarez
65bf72f131
style: Set the property restrictions flags from the centralized list.
...
Differential Revision: https://phabricator.services.mozilla.com/D37721
2019-07-23 22:54:04 +02:00
Emilio Cobos Álvarez
e33a799775
style: Centralize property restrictions.
...
The assertion in properties.mako.rs ensures I got this right.
Differential Revision: https://phabricator.services.mozilla.com/D37720
2019-07-23 22:54:03 +02:00
Emilio Cobos Álvarez
2a500eadd3
style: scroll-margin properties shouldn't apply to first-line / first-letter.
...
From https://drafts.csswg.org/css-scroll-snap-1/#placement :
> None of the properties in this module apply to the ::first-line and
> ::first-letter pseudo-elements.
Differential Revision: https://phabricator.services.mozilla.com/D37719
2019-07-23 22:54:02 +02:00
Emilio Cobos Álvarez
b8e3247b32
style: Update spec link for font-variation-settings.
...
It had got outdated.
Differential Revision: https://phabricator.services.mozilla.com/D37718
2019-07-23 22:54:01 +02:00
Emilio Cobos Álvarez
10cb9c07aa
style: Don't apply property restrictions to pseudo-elements in UA stylesheets.
...
And remove some of the ::placeholder and ::cue hacks where we need to use
!important to make the property not apply for content but apply on UA sheets.
The comment about the white-space property was wrong, we don't enforce it with
!important in the UA stylesheets for <input> (we do for <textarea> though), so
I've kept the flag since it really applies.
Differential Revision: https://phabricator.services.mozilla.com/D37717
2019-07-23 22:54:01 +02:00
Cameron McCormack
e3b57efc7e
style: Ignore pref-controlled properties in cached scrollbar style assertions.
...
Now if you add a new inherited, pref-controlled property, you must
declare whether it can have an effect on scrollbar styles. If no,
then the property will be skipped in the assertions that check
whether our cached styles are equal to those we would compute.
Differential Revision: https://phabricator.services.mozilla.com/D37507
2019-07-23 22:54:00 +02:00
Boris Chiou
145acbf876
style: Part 2: Retire the support for 3-valued syntax for position.
...
According to this resolved spec issue:
https://github.com/w3c/csswg-drafts/issues/2140 ,
we retire the 3-valued <position> on
1. `object-position`
2. `perspective-origin`,
3. `mask-position`
4. `circle()` and `ellipse()`
, but still keep the support for `background-position`.
Besides, I simply run this python script to generate the .ini file:
```
s = sys.argv[1] + ".ini"
with open(s, "w") as f:
f.write('[{}]\n'.format(sys.argv[1]))
f.write(' expected: FAIL\n')
f.write(' bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559276\n ')
```
Differential Revision: https://phabricator.services.mozilla.com/D37126
2019-07-23 22:53:59 +02:00
Jonathan Kew
6cf87d23f8
style: Add an 'auto' value for the CSS 'quotes' property, and make it use language-dependent quote marks.
...
Differential Revision: https://phabricator.services.mozilla.com/D36429
2019-07-23 22:53:59 +02:00
alwu
c00045b0c9
style: set CSS properties directly on '::cue'.
...
According to the spec [1], we have to set those CSS properties on the root node,
and then this root node would have a child node, background box [2], which would
contain all other child nodes.
In our case, the background box is `cueDiv` [3].
In theory, all those properties set on the root node should be inherited by the
background box. However, when the background box is a pseudo element `::cue`,
they won't be directly inherit from the the background box's parent, inherited
styles would acutally come from video instead.
Therefore, we have to directly set these properties on the pseudo element and
mark them as `!important` to avoid being overrided by user style script.
[1] https://www.w3.org/TR/webvtt1/#ref-for-list-of-webvtt-node-objects-9
[2] https://www.w3.org/TR/webvtt1/#webvtt-cue-background-box
[3] https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/dom/media/webvtt/vtt.jsm#533-534
Differential Revision: https://phabricator.services.mozilla.com/D35694
2019-07-23 22:53:58 +02:00
bors-servo
e948c7dcc6
Auto merge of #23824 - servo:stylo-uninit, r=emilio
...
Stylo: replace uses of mem::uninitialized with MaybeUninit
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23824 )
<!-- Reviewable:end -->
2019-07-23 16:28:42 -04:00
Simon Sapin
17ec774a49
Stylo: replace uses of mem::uninitialized with MaybeUninit
...
MozReview-Commit-ID: KGhYL6DJRaR
2019-07-16 08:03:54 +02:00
Bastien Orivel
28fa0f8009
Update rayon to dedupe crossbeam-epoch
...
As a bonus this also removes one version of crossbeam-utils
2019-07-12 21:01:33 +02:00
Emilio Cobos Álvarez
fbf6b926e5
style: Servo doesn't support backdrop-filter yet.
2019-07-08 14:59:16 +02:00
Emilio Cobos Álvarez
03a8e57b9c
style: Appease tidy.
2019-07-08 12:58:20 +02:00
Emilio Cobos Álvarez
55966412af
style: Rustfmt recent changes.
2019-07-08 12:56:47 +02:00
Emilio Cobos Álvarez
c913941669
style: Trivially simplify some recently-added code.
2019-07-08 12:56:37 +02:00
Emilio Cobos Álvarez
c5a90e1baf
style: Remove a map(From::from) statement that does literally nothing.
2019-07-08 12:47:04 +02:00
Emilio Cobos Álvarez
341023690c
style: Use cbindgen for fill and stroke.
...
Differential Revision: https://phabricator.services.mozilla.com/D36807
2019-07-08 12:46:46 +02:00
Emilio Cobos Álvarez
83da7c1535
style: Simplify parsing and storage of SVG paint server fallback. r=boris
...
Differential Revision: https://phabricator.services.mozilla.com/D36806
2019-07-08 12:46:39 +02:00
Emilio Cobos Álvarez
f0b5d02901
style: Use more compact and ffi-friendly types for some svg props.
...
No functional change yet.
Differential Revision: https://phabricator.services.mozilla.com/D36805
2019-07-08 12:46:29 +02:00
Emilio Cobos Álvarez
a0df9f76de
style: Apply text-only zoom to system fonts.
...
Differential Revision: https://phabricator.services.mozilla.com/D36893
2019-07-08 12:46:22 +02:00
Calixte Denizet
1c452e6c45
style: Fix python3 lint issues on servo.
...
Differential Revision: https://phabricator.services.mozilla.com/D35247
2019-07-08 12:46:12 +02:00
Emilio Cobos Álvarez
4abfa1a2d8
style: Don't optimize out recascading of children when becoming or stopping being display: contents.
...
Since they can change whether descendants get blockified.
Differential Revision: https://phabricator.services.mozilla.com/D35818
2019-07-08 12:46:03 +02:00