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
df01cec675
style: Move the from-font value from text-underline-offset to text-underline-position, as per recent spec changes, and fix interaction between position and offset.
...
Differential Revision: https://phabricator.services.mozilla.com/D59778
2020-02-12 02:43:19 +01:00
Jonathan Kew
2910ca6197
style: Support percentage values for the CSS text-decoration-thickness and text-underline-offset properties.
...
Differential Revision: https://phabricator.services.mozilla.com/D59777
2020-02-12 02:43:19 +01:00
Emilio Cobos Álvarez
ef16c5844f
Rustfmt recent changes.
2019-12-16 14:23:56 +01: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
54ce45f3ee
style: Update cbindgen.
...
This cleans up the pattern of "Use a private dtor so that the helper functions
do the right thing" by enabling it everywhere using:
https://github.com/eqrion/cbindgen/pull/377
It also caught some uninitialized value issues.
I think they're mostly harmless since we zero-initialize our structs:
https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632
And since we override the clip rect, which is the other bit of code that was
failing to build with this change.
Differential Revision: https://phabricator.services.mozilla.com/D43491
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
4d8fc4b8f7
style: Fix formatting of recent changes.
2019-08-15 17:02:37 +02:00
Charlie Marlow
cf7b0e13b6
style: adding from-font support to text-underline-offset and text-decoration-thickness.
...
Differential Revision: https://phabricator.services.mozilla.com/D41476
2019-08-15 17:02:01 +02:00
Emilio Cobos Álvarez
566f1ea600
style: Use shortest serialization for computed text-emphasis-style too.
...
Differential Revision: https://phabricator.services.mozilla.com/D41513
2019-08-15 17:01:54 +02:00
Emilio Cobos Álvarez
a9e914e3f0
style: Undo last minute serialization change so that I can land it with tests.
2019-08-15 17:01:20 +02:00
Emilio Cobos Álvarez
7f02662770
style: Use cbindgen for text-emphasis-style.
...
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)
Differential Revision: https://phabricator.services.mozilla.com/D41419
2019-08-15 17:01:14 +02:00
Emilio Cobos Álvarez
fa06241ab6
style: Simplify text-emphasis-style.
...
Differential Revision: https://phabricator.services.mozilla.com/D41418
2019-08-15 17:01:06 +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
1af30fa0c9
style: rustfmt recent changes.
2019-07-08 12:45:56 +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
violet
e66e612452
style: Use cbindgen for text-overflow.
...
Differential Revision: https://phabricator.services.mozilla.com/D32285
2019-05-29 16:14:28 +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
57874ae90a
style: Rustfmt recent changes.
2019-05-07 12:56:02 +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
Emilio Cobos Álvarez
a47dcb5707
style: Derive ToResolvedValue.
...
Differential Revision: https://phabricator.services.mozilla.com/D26783
2019-04-12 12:20:09 +02:00
Emilio Cobos Álvarez
ff41f82720
style: Fix Gecko and Servo builds, and appease tidy.
2019-03-27 14:29:28 +01:00
Emilio Cobos Álvarez
b0af565656
style: Use cbindgen for text-decoration-line.
...
Differential Revision: https://phabricator.services.mozilla.com/D23412
2019-03-27 14:29:10 +01:00
Emilio Cobos Álvarez
a65925cb85
style: Fix servo build.
2019-03-13 15:08:39 +01:00
Emilio Cobos Álvarez
5aeab7adb1
style: Reformat recent changes.
2019-03-13 15:08:38 +01:00
Emilio Cobos Álvarez
b96981f88e
style: Make word-spacing, letter-spacing, and line-height use Rust lengths.
...
This also adopts the resolution from [1] while at it, making letter-spacing
compute to a length, serializing 0 to normal rather than keeping normal in the
computed value, which matches every other engine.
This removes the SMIL tests for percentages from letter-spacing since
letter-spacing does in fact not support percentages, so they were passing just
by chance.
[1]: https://github.com/w3c/csswg-drafts/issues/1484
Differential Revision: https://phabricator.services.mozilla.com/D21850
2019-03-13 15:08:28 +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
Emilio Cobos Álvarez
6118e4d993
style: Use Rust types for some misc properties.
...
-moz-tab-size, border-image-outset and border-image-slice.
This is not a particularly interesting patch, just removes some code. We can
remove way more code when a few related properties are also ported.
Differential Revision: https://phabricator.services.mozilla.com/D19825
2019-02-23 21:04:33 -08:00
Emilio Cobos Álvarez
daf1f02feb
style: Rename LengthOrPercentage to LengthPercentage.
...
It does not represent `<length> | <percentage>`, but `<length-percentage>`, so
`LengthOrPercentage` is not the right name.
This patch is totally autogenerated using:
rg 'LengthOrPercentage' servo | cut -d : -f 1 | sort | uniq > files
for file in $(cat files); do sed -i "s#LengthOrPercentage#LengthPercentage#g" $file; done
Differential Revision: https://phabricator.services.mozilla.com/D15812
2019-01-08 12:00:48 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Emilio Cobos Álvarez
bd9c53c5da
style: Manually extinguish multi-line use statements.
2018-11-10 21:42:24 +01:00
Emilio Cobos Álvarez
155caba595
style: Cargo fix + ./mach fmt.
2018-11-10 21:11: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
a15d33a10e
cargo fix --edition
2018-11-10 17:47:28 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Emilio Cobos Álvarez
a4dcb33986
style: Make StyleStruct.name_lower snake case.
...
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: A3TpDTmFgF
2018-06-23 20:35:49 +02:00
Xidorn Quan
20398491cc
style: Use unified list for TextDecorationLine and implement its SpecifiedValueInfo.
...
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 2sCnK1AecFk
2018-04-29 03:28:46 +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
Bobby Holley
f7ae1a37e3
Manual fixups so that the rustfmt output won't trigger tidy.
2018-04-10 17:33:25 -07:00
Li Hao Tan
8d5a2a9aeb
Refactor text-emphasis-position
to use ${helpers.predefined_type(..)}
2018-04-01 21:12:01 +08:00
Dmitry
a1dd888c23
Rename entities that belong to text-emphasis-style value. Fix order of imports
2018-03-09 20:55:26 +03:00
Dmitry
6febdf3751
Add docs for text-emphasis-property values
2018-03-09 00:04:32 +03:00
Dmitry
73113e28dd
Move text-emphasis-style variables out of mako templates
2018-03-09 00:04:32 +03:00
Anthony Ramine
27732c7dbb
Replace NonNegativeLengthOrNumber by a specific type for -moz-tab-size
...
This is the only use of this type.
2018-02-27 11:26:52 +01:00
Anthony Ramine
056abcbf5f
Change AnimatedValue for GreaterThanOrEqualToOneNumber to CSSFloat
2018-02-13 16:12:31 +01:00
janczer
661d234c3c
Change debug assertions to specific ones
2018-02-07 09:21:24 +01:00
Anthony Ramine
cd8f96cc9e
Change ToCss to take a CssWriter<W>
...
This more concrete wrapper type can write a prefix the very first time something
is written to it. This allows removing plenty of useless monomorphisations caused
by the former W/SequenceWriter<W> pair of types.
2018-01-23 10:41:42 +01:00
Emilio Cobos Álvarez
8732a1d7de
style: Remove -servo-text-decorations-in-effect.
...
It is bogus, because it depends on the display property as it's cascaded, but
the display property can change afterwards, for example, if we get blockified
because we're the root element or a flex item.
Replace it with a normal field instead.
Also, it carries some weight, because it's the last property that uses this
concept of "derived" property, and "custom cascade". So we can remove some code
after this.
Compute it after the cascade process in StyleAdjuster.
2018-01-14 17:10:44 +01:00
Nazım Can Altınova
9882d0bae5
style: Move text-align outside of the mako file.
2017-12-18 11:58:06 -06:00
Keith Yeung
6f59a45cdc
Move text-decoration-line out of mako
2017-11-14 13:13:23 -08:00
Connor Brewster
deb932784e
style: Move text-overflow outside of mako
2017-10-27 23:09:05 -05:00