Commit graph

43 commits

Author SHA1 Message Date
OJ Kwon
c8592ead6f
refactor(counter_style): parse int via parse_non_negative 2018-03-21 15:03:38 -07:00
Nupur Baghel
307858bf69 CounterBound::Integer made to store an Integer 2018-03-19 09:57:10 +05:30
Anthony Ramine
0b3a5b42ba Introduce enum CounterBound for the bounds in counter_style::Ranges 2018-03-05 12:02:25 +01:00
Jonathan Kew
33ead015b1 style: Make 'font' shorthand reset the 'font-variation-settings' property.
As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop

See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983

Basically, make font-variation-settings work in the same way as font-feature-settings
already does.
2018-03-04 12:26:32 +00:00
Anthony Ramine
ad7adee882 Use CustomIdent in Symbol::Ident
The former code was not following the spec.
2018-03-03 16:15:13 +01:00
Anthony Ramine
aea66a9fb6 Move FontTag to the generic module 2018-02-15 12:03:00 +01:00
Xidorn Quan
6ffa888dd6 Integrate font-variation-settings descriptor with stylo 2018-02-14 11:15:58 +11:00
Emilio Cobos Álvarez
3b34d734e6
style: Refactor font-feature-settings and font-variation-settings.
This fixes all known issues with serialization and parsing of these two
properties, and in particular calc handling and such:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1434692
  https://bugzilla.mozilla.org/show_bug.cgi?id=1434724

Also does a fair amount of cleanup and all that, which was needed.
2018-02-01 12:54:45 +01:00
Emilio Cobos Álvarez
09398d42af
style: Move a bunch of font stuff living under generics to the proper module.
FontSettingsTagInt and such shouldn't be in the generic module, I know...

But that will change in a bit.
2018-02-01 02:35:33 +01:00
Emilio Cobos Álvarez
1380f1a14f
style: Remove the stupid space serialization on font-settings. 2018-02-01 02:35:32 +01:00
Bobby Holley
5526947500 Avoid the generic writer parameter for PropertyDeclaration serialization.
MozReview-Commit-ID: JR3IcL1NRHO
2018-01-22 14:58:05 -08:00
Emilio Cobos Álvarez
af879523ea
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
2017-12-06 02:35:10 +01:00
CYBAI
a470ebd501 style: Move font-family outside of mako 2017-11-26 00:36:00 +08:00
Nicholas Nethercote
365ae0b637 Remove nsTFixedString<T>.
nsTFixedString<T> is only used as a base class for nsTAutoStringN<T, N>, so
this patch merges the former into the latter, cutting some code and simplifying
the string class hierarchy.

Because the "Fixed" name is now gone, the patch also renames
StringDataFlags::FIXED as INLINE and ClassDataFlags::FIXED as INLINE.

The patch also removes nsFixed[C]String and ns_auto_[c]string! from Rust code
because nsAutoString can't be implemented directly in Rust due to its move
semantics. There were only two uses of ns_auto_string! outside of tests so this
seems like a minor loss.
2017-10-04 13:31:09 +11:00
Xidorn Quan
8b842f5417 Use integer for specified and computed font-weight 2017-07-06 15:31:24 +10:00
Nazım Can Altınova
3421694f12 stylo: Implement font-language-override descriptor for @font-face rule 2017-06-25 18:51:18 -07:00
Fernando Jiménez Moreno
632c5571a9 stylo: make font-weight descriptor in @font-face preserve keyword values 2017-06-20 15:28:39 +02:00
Brad Werth
78ce522eed Define Gecko CounterStyle and FontFaceRule clone functions. 2017-06-08 09:47:40 -07:00
Manish Goregaokar
9ed5a7a05e stylo: Support font-variation-settings 2017-05-27 10:47:43 -07:00
Fernando Jiménez Moreno
96a23d9b73 stylo: Bug 1355345 - Support font-display descriptor in @font-face rule 2017-05-18 18:16:24 +02:00
Anthony Ramine
a0886213b6 Support font-feature-settings as a @font-face descriptor 2017-05-18 18:16:22 +02:00
Xidorn Quan
9354e90afc Set atom identifier for counter style names in @counter-style rule. 2017-05-16 14:42:43 +10:00
Xidorn Quan
138fa4ca08 Change ToNsCssValue to take the ownership of value. 2017-05-16 14:42:42 +10:00
Xidorn Quan
f733958f2e Add bindings for list and pair list value of nsCSSValue. 2017-05-16 14:42:40 +10:00
Xidorn Quan
fdb29e15a4 Add binding for setting pair value of nsCSSValue. 2017-05-16 14:42:36 +10:00
Xidorn Quan
3ea2f3a16c Add support for auto value in nsCSSValue sugar. 2017-05-16 14:42:35 +10:00
Xidorn Quan
11ac1e894e Add basic integration of @counter-style. 2017-05-16 14:42:33 +10:00
Fernando Jiménez Moreno
bc156cfe1c Stylo: Bug 1350175 - Support getting line / column number of CSS rules
Fix font_cache_thread test
2017-05-12 15:20:12 +02:00
Simon Sapin
ade56bbe8d Add missing 'additive-symbols' validity checks 2017-04-26 13:02:40 +09:00
Simon Sapin
6dc317f80b Add speak-as descriptor for @counter-style 2017-04-26 13:02:37 +09:00
Simon Sapin
62d261add4 Add 'additive-symbols' descriptor for @counter-style 2017-04-26 13:02:36 +09:00
Simon Sapin
f93a9a4b10 Don’t make up initial values not in spec for @counter-style descriptors 2017-04-26 13:02:34 +09:00
Simon Sapin
fe15663423 Add the 'symbols' descriptor for @counter-style 2017-04-26 13:02:31 +09:00
Simon Sapin
0ba5cae707 Add 'fallback' descriptor to @counter-style 2017-04-26 13:02:30 +09:00
Simon Sapin
e27de3842d Add 'pad' descritor of @counter-style 2017-04-26 13:02:29 +09:00
Simon Sapin
6f79684468 Add 'range' descriptor to @counter-style 2017-04-26 13:02:27 +09:00
Simon Sapin
d1558a2025 Add 'negative' descriptor of @counter-style 2017-04-26 13:02:25 +09:00
Simon Sapin
4477a2da40 Add the 'system' descriptor of @counter-style 2017-04-26 13:02:23 +09:00
Simon Sapin
797f40b0a3 Add initial style system support for @counter-style rules 2017-04-26 13:02:22 +09:00
Simon Sapin
b43e2fb0df Macroize conversion of @font-face values to Gecko types 2017-04-01 14:05:32 +02:00
Simon Sapin
61812d4d9d Make the parser accept @font-face rules without font-family or src.
Fix #16165.

Also, it turns out that the CSSFontFaceRule IDL specified in the
css-fonts spec is not web-compatible.
Instead browsers implement a .style attribute like in CSSStyleRule:
https://github.com/w3c/csswg-drafts/issues/825

This in turn requires preserving data about which descriptors
were set or not (distinguishing unset from set to a value that happens
to be the initial value),
so this commit also makes every field `Option<_>`.
2017-04-01 14:05:32 +02:00
Nazım Can Altınova
9991c496b3
Serialize unquoted font-family without quote 2017-03-30 23:40:23 +03:00
Xidorn Quan
f68e2948d5 Use Gecko nsCSSFontFaceRule for font face rule. 2017-03-30 11:41:09 +11:00