Commit graph

167 commits

Author SHA1 Message Date
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
Jonathan Kew
a9e473c6e8 style: Allow full-width and/or full-size-kana values of text-transform to be combined with a case transformation.
Differential Revision: https://phabricator.services.mozilla.com/D27402
2019-05-07 12:55:21 +02:00
Hiroyuki Ikezoe
21481e315e style: Switch to the new scroll-snap-type syntax for the old scroll snap implementation and drop the scroll-snap-type-{x,y} longhands.
Now scroll-snap-type is a longhand property.

Differential Revision: https://phabricator.services.mozilla.com/D21622
2019-04-12 12:20:12 +02:00
Hiroyuki Ikezoe
2f457ed144 style: Rename ScrollSnapType to ScrollSnapStrictness.
The scroll snap strictness is defined in the new spec [1], and the structure
is the exactly same as the old scroll snap type structure.

[1] https://drafts.csswg.org/css-scroll-snap-1/#snap-strictness

Differential Revision: https://phabricator.services.mozilla.com/D21621
2019-04-12 12:20:12 +02:00
Mats Palmgren
4f44b1c6b1 style: Add an inherited internal UA sheet property (-moz-list-reversed:true|false) to propagate <ol reversed> to its relevant descendants.
Bug: 288704
Reviewed-by: emilio
2019-03-27 14:29:22 +01:00
Emilio Cobos Álvarez
9e0d38a64f style: Make word-break: break-word behave like word-break: normal; overflow-wrap: anywhere.
Differential Revision: https://phabricator.services.mozilla.com/D21398
2019-03-13 15:08:14 +01:00
Hiroyuki Ikezoe
22e12a0f52 style: Implement scroll-snap-align parser and serializer.
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

Differential Revision: https://phabricator.services.mozilla.com/D20205
2019-02-23 21:03:55 -08:00
Emilio Cobos Álvarez
289d9b033c style: Make tidy happy. 2019-01-20 17:50:18 +01:00
Mats Palmgren
beb4ad91af style: Add plumbing for handling physical/logical corner values.
Bug: 1520684
Reviewed-by: emilio
2019-01-20 14:32:26 +01:00
Ryan Hunt
c04a4140a7 style: Add 'overflow-anchor' CSS property.
https://drafts.csswg.org/css-scroll-anchoring/#exclusion-api

Differential Revision: https://phabricator.services.mozilla.com/D13265
2019-01-13 21:58:18 +01:00
Emilio Cobos Álvarez
31838b1e6f style: The 'all' property is not animatable.
Since it allows to animate display, which is not good.

This is a regression from:

  https://hg.mozilla.org/mozilla-central/rev/6884ba750aa3

Actually I wonder if the logic shouldn't be the other way around, i.e., a
shorthand is animatable if all the longhands are, not if just one.

In any case this rolls back to the previous behavior, should we do that, it
should be another bug.

Differential Revision: https://phabricator.services.mozilla.com/D14632
2019-01-07 00:03:15 +01:00
Emilio Cobos Álvarez
901c055519 style: Move overflow to use cbindgen.
It's one of the most annoying / hacky mako bits we have.

Differential Revision: https://phabricator.services.mozilla.com/D14084
2018-12-16 13:35:05 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Emilio Cobos Álvarez
a5f0eb9205
style: Also move page-break-inside outside of mako.
Differential Revision: https://phabricator.services.mozilla.com/D11876
2018-11-17 09:56:04 +01:00
Emilio Cobos Álvarez
d9de68ad6a
style: Move the page-break-{before,after} properties to not use mako.
And respect the computed value of `left` / `right` / etc.

Differential Revision: https://phabricator.services.mozilla.com/D11872
2018-11-17 09:56:03 +01:00
Emilio Cobos Álvarez
1aa6725f9a
style: Move user-select outside of mako.
This is the first step to unprefix user-select.

This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).

Differential Revision: https://phabricator.services.mozilla.com/D11580
2018-11-17 09:55:47 +01:00
Emilio Cobos Álvarez
fa764fc8e9
style: Implement overflow-wrap: anywhere.
Per https://github.com/w3c/csswg-drafts/issues/2682

Differential Revision: https://phabricator.services.mozilla.com/D11328
2018-11-10 21:10:19 +01:00
Simon Sapin
e1fcffb336 Use 2018-style paths in code generated by Mako 2018-11-10 17:47:28 +01:00
Emilio Cobos Álvarez
8b49ef813f
style: Remove nscsspropertyid_is_{animatable,transitionable}.
There are better ways, plus the existing code didn't handle aliases at
all (not that it needed to, but it's better if it does).

Differential Revision: https://phabricator.services.mozilla.com/D10838
2018-11-05 12:32:52 +01:00
Boris Chiou
c7027e2676
style: Use alias for StyleFillRule.
This needs to update the "fill-rule" and "clip-rule" to use
predefined_type to avoid some compilation errors.

Differential Revision: https://phabricator.services.mozilla.com/D10142
2018-11-05 12:30:46 +01:00
Xidorn Quan
c77ecd6984
style: Implement flow-relative values for resize property.
Differential Revision: https://phabricator.services.mozilla.com/D2908
2018-08-18 17:47:51 +02:00
Xidorn Quan
5299ce31aa
style: Make several more specified values Copy.
Differential Revision: https://phabricator.services.mozilla.com/D2932
2018-08-18 17:47:44 +02:00
Xidorn Quan
e22850dc85
style: Add check for non-Copy specified value to ensure specified_is_copy always returns the right result.
Differential Revision: https://phabricator.services.mozilla.com/D2931
2018-08-18 17:47:37 +02:00