Oriol Brufau
4cee8cf937
style: Support image-set in the content property
...
Differential Revision: https://phabricator.services.mozilla.com/D107397
2023-05-16 12:54:05 +02:00
Oriol Brufau
efea71ff9b
style: Cherry-pick various servo changes
...
All formatting and not-part-of-the-gecko-build changes.
Differential Revision: https://phabricator.services.mozilla.com/D106634
2023-05-16 08:14:58 +02:00
Simon Sapin
4a4199c1d6
Don’t parse unspported values of content
2020-07-24 09:31:24 +02:00
Emilio Cobos Álvarez
685e749cfc
style: Switch all callsites of try() to try_parse() in the style crate.
...
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-18 23:51:14 +02:00
Fernando Jiménez Moreno
dc9a33f3a9
Generate ::before and ::after content from url() for layout2020
2020-02-28 15:00:07 +01:00
Fernando Jiménez Moreno
5b2d6c81b2
Generate ::before and ::after content from attr() for layout 2020
2020-02-25 10:47:48 +01:00
Emilio Cobos Álvarez
e227715aee
style: Miscellaneous Servo build fixes.
2020-02-12 02:43:23 +01:00
Emilio Cobos Álvarez
219c0f6328
style: Use cbindgen for content property.
...
This cleans up and also allows us to keep the distinction between content: none
and content: normal, which allows us to fix the computed style we return from
getComputedStyle().
Do this last bit from the resolved value instead of StyleAdjuster, because
otherwise we need to tweak every initial struct for ::before / ::after.
Differential Revision: https://phabricator.services.mozilla.com/D58276
2020-02-12 02:43:08 +01:00
Emilio Cobos Álvarez
006417e40a
style: Rustfmt recent changes.
2019-11-30 20:45:07 +01:00
Emilio Cobos Álvarez
d9aa0571e3
style: Simplify some code now that lifetimes are non-lexical.
...
Differential Revision: https://phabricator.services.mozilla.com/D54529
2019-11-30 20:45:05 +01:00
Emilio Cobos Álvarez
cd3b0c23fa
style: Fix Servo build, and rustfmt recent changes.
2019-09-12 23:04:56 +02:00
Emilio Cobos Álvarez
987a1eeb62
style: Use cbindgen for counters.
...
Differential Revision: https://phabricator.services.mozilla.com/D44403
2019-09-12 22:34:16 +02:00
Mats Palmgren
f7a87c49b1
style: [css-lists-3] Make 'none' invalid as a <counter-style> in counter()/counters().
...
CSSWG resolution:
https://github.com/w3c/csswg-drafts/issues/4163#issuecomment-521331100
Spec:
https://drafts.csswg.org/css-lists-3/#counter-functions
Differential Revision: https://phabricator.services.mozilla.com/D43893
2019-09-12 22:34:16 +02:00
Mats Palmgren
4b4b5b6a1d
style: Implement the counter-set property.
...
Bug: 1518201
Reviewed-by: emilio
2019-03-27 14:29:21 +01:00
Simon Sapin
be69f9c3e6
Rustfmt has changed its default style :/
2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Emilio Cobos Álvarez
212b3e1311
style: Revert try -> r#try change.
...
Since we're in an inconsistent state because mako files weren't updated, and
it's really really ugly.
2018-11-10 21:42:17 +01:00
Simon Sapin
b1822a39fa
cargo fix --edition --features gecko
2018-11-10 17:47:28 +01:00
Simon Sapin
a15d33a10e
cargo fix --edition
2018-11-10 17:47:28 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
chansuke
8dab4d659a
Format style component.
2018-09-09 16:24:45 +02:00
Emilio Cobos Álvarez
164bfbcb40
Make servo-tidy happy.
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
1314f47da5
style: Distinguish between specified and computed URLs.
...
This is needed to serialize computed URLs correctly from getComputedStyle.
Bug: 1461288
Reviewed-by: xidorn
MozReview-Commit-ID: 9wakhqNrszb
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
39169ad92e
style: Fix tidy issues.
2018-05-05 16:24:36 +02:00
Emilio Cobos Álvarez
a375baf84b
style: Derive ToCss for Counters.
...
Bug: 1457332
Reviewed-by: xidorn
MozReview-Commit-ID: 1jOglcqt1Dd
2018-05-05 16:20:10 +02:00
Xidorn Quan
7fe7b2ffb1
style: Add a ValueInfo trait for exposing types needed by devtools.
...
Most of types just derive it using proc_macro directly. Some of value
types need manual impl.
In my current plan, this new trait will be used in bug 1434130 to expose
values as well.
Bug: 1455576
Reviewed-by: emilio
MozReview-Commit-ID: LI7fy45VkRw
2018-04-29 03:28:34 +02:00
Bobby Holley
c99bcdd4b8
Run rustfmt on selectors, servo_arc, and style.
...
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Emilio Cobos Álvarez
839eda000a
style: Avoid serializing the counter type in counter functions if it's decimal.
...
See https://github.com/w3c/web-platform-tests/pull/9862 and such.
2018-03-14 16:41:33 +01:00
Xidorn Quan
a99ca543cd
Add SpecifiedImageUrl for <url> used as images.
2018-03-08 23:34:32 +11:00
Anthony Ramine
85950a801f
Move #[css(iterable)] on fields rather than variants
2018-03-06 11:08:19 +01:00
Anthony Ramine
91ed0b0aa5
Derive ToCss for ContentItem
2018-03-02 16:07:02 +01:00
Anthony Ramine
a4d3a8d74a
Make ContentItem use a CustomIdent for counter names
...
See https://github.com/w3c/csswg-drafts/pull/2377
2018-03-02 16:06:54 +01:00
Nupur Baghel
8116962298
Added derive ToCss for Content and removed manual Impl
2018-02-12 00:35:56 +05:30
Igor Gutorov
7a00066477
style: Move content property out of mako.
2018-02-07 00:11:57 +02:00
Anthony Ramine
df11a7fec7
Simplify counter CSS properties
2018-02-04 14:52:38 +01:00
Jonas Reinwald
d24301b7a0
moved css longhand counter-reset out of mako
2018-02-01 15:43:40 +01:00