Martin Robinson
02deb99a05
Use euclid data types for physical structs in layout_2020
...
This removes a bit of duplication and allows layout_2020 to benefit from
a much richer set of utilities.
2020-01-23 15:39:32 +01:00
Simon Sapin
2720c05c4b
Add the full background shorthand
2020-01-13 21:59:46 +01:00
Simon Sapin
7c1f2335d4
Add background-repeat
2020-01-13 21:59:46 +01:00
Simon Sapin
c73dc885bb
Add background-position
2020-01-13 21:59:46 +01:00
Simon Sapin
b1dcd5ecb6
Add background-size
2020-01-13 21:59:46 +01:00
Simon Sapin
649d3cb6b4
Add background-origin
2020-01-13 21:59:46 +01:00
Simon Sapin
3874946ac6
Add background-clip
2020-01-13 21:59:46 +01:00
Simon Sapin
c6ba6c40b9
Initial rendering of background-image
2020-01-13 21:59:46 +01:00
Simon Sapin
cbcf83fc65
Move OpaqueNode
to style_traits
2020-01-13 21:59:45 +01:00
Simon Sapin
062c1872f0
Parse -moz-image-rect()
and -moz-element()
only in Gecko
2020-01-07 14:44:28 +01:00
Simon Sapin
962c85b553
Apply border-radius when painting borders
2020-01-03 15:45:28 +01:00
Emilio Cobos Álvarez
7513bc293e
Cherry-pick some parts of the cssparser update.
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
ef16c5844f
Rustfmt recent changes.
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
e885ccb7ae
layout-2020: build fixes.
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
7d30a7da75
Servo build fixes.
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
ad61cae6b0
style: Update smallvec to 1.0.
...
Differential Revision: https://phabricator.services.mozilla.com/D56044
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
789ddd9dc1
style: Make LengthPercentage not copy.
...
This is needed to support min() / max() / clamp(), etc.
Differential Revision: https://phabricator.services.mozilla.com/D57249
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
a541046147
style: Use less Au in font code.
...
Font code is the only thing that was using Au in the style system without
interfacing with Gecko, and there was no real reason for it to do so.
This slightly simplifies the code.
Differential Revision: https://phabricator.services.mozilla.com/D57248
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
4cd8813a81
style: Remove full-screen-api.unprefix.enabled.
...
It's been enabled since Firefox 64.
Differential Revision: https://phabricator.services.mozilla.com/D56951
2019-12-16 14:23:56 +01:00
jeffin143
4b62e9ff2b
style: convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D56140
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
02c30bccbd
style: Preserve CSS input exactly during sanitization.
...
This avoids the mutation due to the different serialization in some cases.
Differential Revision: https://phabricator.services.mozilla.com/D56732
2019-12-16 14:23:56 +01:00
jeffin143
e8a3a71080
style: convert NS_STYLE_POINTER_EVENTS_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D56203
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
d954f516e9
style: Fix serialization of @namespace rule.
...
This code comes from:
https://hg.mozilla.org/mozilla-central/rev/2418cfba72c33c5623f6fb4c243c5203819c8240
I audited other callers of write_str, they seem ok.
Differential Revision: https://phabricator.services.mozilla.com/D54601
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
7cd59da2a0
style: Invalidate shadow part pseudo-class styles correctly.
...
I was going to send a test for `:focus` via wpt, but then realized it was
probably not spec-compliant with the new rules people want to follow for
:focus, so I filed https://github.com/w3c/csswg-drafts/issues/4555 instead.
Testing `:hover` / `:active` via wpt looked quite a bit of a hassle.
Differential Revision: https://phabricator.services.mozilla.com/D55591
2019-12-16 14:23:56 +01:00
Cameron McCormack
6973317a58
style: Correctly style dark scrollbars in tree components.
...
We need to ensure the rules that override all properties for scrollbar
part elements only apply to those that are NAC (and so will be eligible
for NAC style sharing). We have some uses of non-NAC <scrollbar>
elements that should continue to inherit properties from their parents.
To avoid any changes in rule matching order that come with changing specificity,
we add a new :-moz-native-anonymous-no-specificity pseudo-class.
While we're here, we note :-moz-native-anonymous-no-specificity (and the
regular :-moz-native-anonymous pseudo-class) as not needing style
sharing cache revalidation, as we never share NAC styles.
Differential Revision: https://phabricator.services.mozilla.com/D56154
2019-12-16 14:23:56 +01:00
jeffin143
e944962fe2
style: convert NS_STYLE_ISOLATION_* to an enum class in nsStyleConsts.h.
...
Differential Revision: https://phabricator.services.mozilla.com/D55378
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
baa9ac1903
style: Update derive_more.
...
Differential Revision: https://phabricator.services.mozilla.com/D56043
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
80ac4d2ff2
style: Avoid writing into the empty array header.
...
Differential Revision: https://phabricator.services.mozilla.com/D55291
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
f89c31120f
style: Remove layout.css.xul-box-display-values.survive-blockification.enabled.
...
Differential Revision: https://phabricator.services.mozilla.com/D55898
2019-12-15 21:03:48 +01:00
enordin
5e7d429c0a
style: Refactor InvalidationMap flags to use bitflags.
...
Differential Revision: https://phabricator.services.mozilla.com/D55862
2019-12-15 21:03:38 +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
enordin
3bd62cf0cd
style: Check for border-image-* initial specified values when serializing border shorthand.
...
Differential Revision: https://phabricator.services.mozilla.com/D55588
2019-12-15 21:03:23 +01:00
jeffin143
7e3e8e1ca8
style: convert NS_STYLE_RUBY_POSITION_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D55379
2019-12-15 21:03:15 +01:00
jeffin143
24f21f375a
style: convert NS_STYLE_TEXT_SIZE_ADJUST_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D55382
2019-12-15 21:03:10 +01:00
jeffin143
5cc43940ad
style: convert NS_STYLE_RUBY_ALIGN_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D55380
2019-12-15 21:03:04 +01:00
jeffin143
519a0e7759
style: convert NS_STYLE_TOP_LAYER_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D55377
2019-12-15 21:02:56 +01:00
Anthony Ramine
22ea33cb37
Enable cursor and pointer-events in 2020
2019-12-13 17:51:06 +01:00
Simon Sapin
58b7005a9b
Make for_maybe_position_relative
take care of relative adjustment.
2019-12-13 13:13:50 +01:00
Simon Sapin
6fce97c65c
Parse background: <color>
2019-12-13 00:42:18 +01:00
Simon Sapin
d717382c0c
Disable in Layout 2020 an assertion that does not apply there
2019-12-10 18:41:14 +01:00
Simon Sapin
ce7e84be72
Replace percent_resolved_*
functions with methods
2019-12-10 12:36:43 +01:00
Simon Sapin
a2c2b294d5
Move clamp_*
functions to methods of Length
2019-12-10 12:36:43 +01:00
Simon Sapin
9f4b1a0f14
Implement text-align
(except justify
)
2019-12-07 14:31:45 +01:00
Simon Sapin
40ad9a722d
Use the WritingMode bitflags from Stylo
2019-12-07 12:45:36 +01:00
Simon Sapin
b9adf8b7ac
Don’t store computed values of logical properties in style structs
...
They are not used.
2019-12-07 12:45:36 +01:00
bors-servo
e70397d90a
Auto merge of #25033 - servo:intrinsic, r=nox
...
Add support for inline-block and for computing min/max-content
2019-12-04 16:23:33 -05:00
Anthony Ramine
48ceb56339
Implement size extremums
2019-12-04 10:32:58 +01:00
Simon Sapin
9c5a595044
Add intrinsic size computation for inline formatting contexts
2019-12-02 22:11:54 +01:00
Simon Sapin
8fe37f3ed6
Implement "outer min/max-content" (based on a given min/max-content)
...
https://dbaron.org/css/intrinsic/#outer-intrinsic
2019-12-02 17:36:33 +01:00
bors-servo
40fd7910a5
Auto merge of #24928 - servo:2020-images, r=SimonSapin
...
Start supporting images in layout 2020
2019-12-01 09:53:45 -05:00