Commit graph

189 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
036056d2a9 style: Move image-rendering out of mako
It's easier to touch in the future that way, even though the derive list is
massive.

Differential Revision: https://phabricator.services.mozilla.com/D124377
2023-05-26 15:23:24 +02:00
Emilio Cobos Álvarez
6d9580fef0 style: Specify has_no_effect_on_gecko_scrollbars on inherited internal properties
Otherwise we assert due to the styles being different from the cached
ones, but it doesn't matter as these don't influence Gecko scrollbars.

Differential Revision: https://phabricator.services.mozilla.com/D117147
2023-05-24 18:32:34 +02:00
Jonathan Kew
f0a178b56a style: Un-prefix -moz-tab-size (keeping the prefixed version as an alias for now)
This results in lots of new WPT test passes.

There were also a couple of WPT tests that turned out to be broken;
tab-size-inline-001 and -002 had errors in their reference files such
that they'd never pass anywhere. So those are fixed here.

Depends on D117331

Differential Revision: https://phabricator.services.mozilla.com/D117332
2023-05-24 18:32:33 +02:00
Oriol Brufau
a7ca8022d3 style: [css-pseudo] Use 'white-space: pre' by default in ::marker
Differential Revision: https://phabricator.services.mozilla.com/D107359
2023-05-16 23:40:23 +02:00
Oriol Brufau
743f213c25 style: Move moz-control-character-visibility out of mako, and remove support for gecko_pref_controlled_initial_value
No behavior change, just cleanup. Actually seem this technically _adds_ some code even
though it's a cleanup, but that's mostly because of the wrapping of the
derive list.  The resulting code is simpler (more in-line with our usual
things, so I think it's an improvement).

Differential Revision: https://phabricator.services.mozilla.com/D111551
2023-05-16 23:17:16 +02:00
Oriol Brufau
b40f4b6fec style: Clean up text-justify, and make distribute a parse-time alias
Since it's simpler, as discussed in the CSSWG issue.

Differential Revision: https://phabricator.services.mozilla.com/D111346
2023-05-16 23:14:19 +02:00
Oriol Brufau
cdce0d3b34 style: Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing propertie
To know the valid rules for each property, we need to put this information
into the Servo prop list and add an appropriate getter to Longhand/Shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D105825
2023-05-16 13:02:34 +02:00
Oriol Brufau
17ae374c65 style: part 1 - Support parsing ruby-position: alternate
Differential Revision: https://phabricator.services.mozilla.com/D107382
2023-05-16 12:56:06 +02:00
Emilio Cobos Álvarez
a0c6628cf2 Miscellaneous rebase fixes. 2021-02-26 16:44:05 +01:00
Emily McDonough
4dc475d3a1 style: Rename alias to aliases in Longhand and Shorthand
Differential Revision: https://phabricator.services.mozilla.com/D105810
2021-02-26 16:44:05 +01:00
Emily McDonough
742c5e0d17 style: Use a base class for Shorthand and Longhand
Differential Revision: https://phabricator.services.mozilla.com/D105797
2021-02-26 16:44:05 +01:00
Emily McDonough
1b18b06186 style: Switch properties to use a bitfield to determine validity in rules.
This doesn't use a full bitmap for every single rule type, as we only expect
that keyframe, page, and style rules will be checked.

Differential Revision: https://phabricator.services.mozilla.com/D104949
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
5fe702fa2b style: Move caption-side outside of mako.
Make it an enum class, etc.

Differential Revision: https://phabricator.services.mozilla.com/D103978
2021-02-26 16:44:05 +01:00
Ricky Stewart
8a723d48d5 Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).


Differential Revision: https://phabricator.services.mozilla.com/D94045
2021-02-26 16:44:05 +01:00
Frederic Wang
4dfcf583cf style: Rename -moz-math-script-level to math-depth.
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2021-02-26 16:44:05 +01:00
Mats Palmgren
1f8c9aec88 style: [css-lists-3][css-pseudo-4] Add support for 'text-transform' on ::marker.
Differential Revision: https://phabricator.services.mozilla.com/D90329
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
768db078ef style: Make appearance: button behave like auto.
As per https://github.com/w3c/csswg-drafts/issues/5174.

Differential Revision: https://phabricator.services.mozilla.com/D89119
2021-02-26 16:44:05 +01:00
Brian Birtles
ad22c7a369 style: Allow animations and transitions on ::marker
As per the following change to the spec:

6b3d7240b5

The additional failure annotation is added because we don't currently treat
text-combine-upright as non-animatable and this patch exposes the existing bug
(bug 1654195).

Differential Revision: https://phabricator.services.mozilla.com/D84308
2021-02-26 16:44:05 +01:00
Cameron McCormack
862b7d1249 style: Make appearance: button behave like auto on various elements.
Differential Revision: https://phabricator.services.mozilla.com/D83434
2021-02-26 16:44:05 +01:00
Kagami Sascha Rosylight
d01648d637 Fix remaining flake8 warnings 2020-06-21 03:34:32 +02:00
Mats Palmgren
1fcc00a11a style: Allow 'opacity' on ::first-letter/::first-line pseudos.
Differential Revision: https://phabricator.services.mozilla.com/D76387
2020-06-04 01:50:36 +02:00
Boris Chiou
fc9321bb23 style: Let aspect-ratio (css-sizing-4) support 'auto | <ratio>'.
In order to test its parsing and serialization, we expose it but protect
it behind a pref.

Besides, I would like to drop layout.css.aspect-ratio-number.enabled in
the next patch because the spec has been updated. It seems we don't have
to keep this pref and we should always use Number.

Differential Revision: https://phabricator.services.mozilla.com/D74955
2020-06-04 01:50:36 +02:00
Mats Palmgren
6f58c66589 style: Implement style system support for Masonry layout.
This implements support for this CSS Masonry layout proposal:
https://github.com/w3c/csswg-drafts/issues/4650

I've intentionally left out a shorthand (place-tracks?) for now until
we have a draft CSS spec for this.

Differential Revision: https://phabricator.services.mozilla.com/D67061
2020-06-04 01:50:36 +02:00
Mike Hommey
07c1b39637 style: Convert GenerateServoCSSPropList.py to py3.
Differential Revision: https://phabricator.services.mozilla.com/D70308
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
7af9a087aa style: Use enums for text-align / text-align-last.
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

Differential Revision: https://phabricator.services.mozilla.com/D63793
2020-04-16 16:35:07 +02:00
Jonathan Kew
51c1dfee2d
style: Add support for parsing of the CSS text-underline-position property.
Differential Revision: https://phabricator.services.mozilla.com/D54722
2019-12-15 21:03:31 +01:00
Emilio Cobos Álvarez
a7c50b57a1
style: Handle logical shorthand animations with variable references correctly.
When we physicalize the declarations for @keyframes, we end up having a physical
declaration with an unparsed value with `from_shorthand` being the logical
shorthand.

Account for this case properly when substituting custom properties, to avoid
panicking.

Differential Revision: https://phabricator.services.mozilla.com/D53663
2019-11-30 20:45:01 +01:00
Emilio Cobos Álvarez
cd3b0c23fa
style: Fix Servo build, and rustfmt recent changes. 2019-09-12 23:04:56 +02:00
Boris Chiou
c3a3bd48d7 style: Support css use counters for unimplemented properties.
For developing properties, we will handle them in an other bug.

Besides, I use an iframe for the test because we create a use counter in
the constructor of Document, which use the prefs to decide what kind of
properties we want to record. So, in the test, we have to reload iframe
to make sure we re-create the document, so does the use counter, to make
sure the prefs work properly.

The two prefs affect the css use counters:
1. layout.css.use-counters.enabled: Allocate use counters, and record
   non-custom properties.
2. layout.css.use-counters-unimplemented.enabled: Record all unimplmented
   properties into the use counters.

If we disable layout.css.use-counters.enblaed, we don't create use counters
object, so layout.css.use-counters-unimplemented.enabled doesn't work,
either.

Differential Revision: https://phabricator.services.mozilla.com/D43860
2019-09-12 22:34:16 +02:00
Charlie Marlow
0d0f1fb69c
style: updating text-underline-offset to support ::first-line/first-letter/placeholder.
Differential Revision: https://phabricator.services.mozilla.com/D41227
2019-08-15 17:01:27 +02:00
Charlie Marlow
9e826e380a
style: updating text-decoration-skip-ink to support ::first-line/first-letter/placeholder.
Differential Revision: https://phabricator.services.mozilla.com/D41228
2019-08-15 17:00:58 +02:00
Charlie Marlow
ad1d028e40
style: added text-decoration-thickness to the text-decoration shorthands.
Differential Revision: https://phabricator.services.mozilla.com/D40335
2019-08-15 17:00:31 +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
Emilio Cobos Álvarez
2ff7cb5a37
style: Appease tidy. 2019-07-23 22:54:12 +02:00
Emilio Cobos Álvarez
8665d9dc12
Fix Servo build. 2019-07-23 22:54:10 +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
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
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
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
Charlie Marlow
034557a717
style: Adding parsing support for text-decoration-skip-ink
Differential Revision: https://phabricator.services.mozilla.com/D35831
2019-07-08 12:45:14 +02:00
Emilio Cobos Álvarez
960be2fd01
style: Add an internal aspect-ratio CSS property.
Differential Revision: https://phabricator.services.mozilla.com/D29037
2019-07-08 12:43:58 +02:00
Emilio Cobos Álvarez
ed2e9ce482
Rustfmt and fix tidy on recent changes. 2019-06-25 13:11:31 +02:00
violet
c7c1fed95c
style: Implement overflow-block and overflow-inline properties
Differential Revision: https://phabricator.services.mozilla.com/D34738
2019-06-25 13:11:30 +02:00
Daniel Holbert
e9b0d54a95
style: Remove support for the layout.css.prefixes.webkit pref.
From this point on, the webkit-prefixed CSS features that were previously
protected by this pref will now be unconditionally enabled.

Differential Revision: https://phabricator.services.mozilla.com/D33807
2019-06-25 13:11:26 +02:00
Boris Chiou
73b0b7c477 style: Implement offset-rotate.
This includes style system and layout update. I add 3 extra reftests
because the original tests use ray() function as the offset-path, but we
don't support it. It'd be better to add tests using a different type of
offset-path.

The spec issue about the serialization:
https://github.com/w3c/fxtf-drafts/issues/340

Differential Revision: https://phabricator.services.mozilla.com/D32212
2019-05-29 16:14:27 +02:00
violet
d552969ca1 style: Support AllowQuirks::Always option in helpers.mako.rs
Differential Revision: https://phabricator.services.mozilla.com/D29936
2019-05-29 16:14:21 +02:00
Jonathan Kew
0dc70cf7f2 style: Implement the CSS line-break property, with values "auto | anywhere".
Note that the "loose | normal | strict" values are not yet parsed/implemented.

Differential Revision: https://phabricator.services.mozilla.com/D29817
2019-05-29 16:14:18 +02:00
Emilio Cobos Álvarez
5f6c8d9060 style: Add bindings for box shadows, and remove nsCSSShadowArray and friends.
Differential Revision: https://phabricator.services.mozilla.com/D30547
2019-05-29 16:14:11 +02:00
Cameron McCormack
ca756a8550 style: Implement -webkit-line-clamp.
Differential Revision: https://phabricator.services.mozilla.com/D20115
2019-05-10 12:43:00 +02:00
Brian Birtles
9636ef7be7 style: Allow animating the 'all' property from Web Animations.
Differential Revision: https://phabricator.services.mozilla.com/D28763
2019-05-07 12:55:33 +02:00