Emilio Cobos Álvarez
55f20759b2
style: Properly hide -moz-context-properties from content
...
Depends on D114481
Differential Revision: https://phabricator.services.mozilla.com/D114482
2023-05-24 18:32:30 +02:00
Emilio Cobos Álvarez
87a3f2598a
style: Properly hide -moz-control-character-visibility from content
...
Differential Revision: https://phabricator.services.mozilla.com/D114481
2023-05-24 18:32:30 +02:00
Oriol Brufau
1cc44bd065
style: Will-change should only create stacking contexts / containing blocks / etc if the property it'd change would apply
...
As per https://drafts.csswg.org/css-will-change/#will-change .
> If any non-initial value of a property would cause the element to
> generate a containing block for absolutely positioned elements,
> specifying that property in will-change must cause the element to
> generate a containing block for absolutely positioned elements.
But in this case the transform property wouldn't apply to the element so
there's no reason to create a stacking-context.
Differential Revision: https://phabricator.services.mozilla.com/D114121
2023-05-19 19:06:09 +02:00
Oriol Brufau
ab445a02b0
style: Implement accent-color in nsNativeBasicTheme
...
This is a new addition for CSS UI Level 4:
https://drafts.csswg.org/css-ui-4/#widget-accent
I want to provide feedback on some spec issues, and thought it was a
kinda neat thing to prototype (it also makes testing contrast and such
with random GTK themes easier).
For now enable for Nightly only.
Differential Revision: https://phabricator.services.mozilla.com/D112312
2023-05-19 19:06:08 +02:00
Oriol Brufau
7567ddd262
style: Hide -moz-outline-radius behind a pref
...
This property does nothing since bug 315209 got implemented.
Every single user that I checked was doing the same math by hand, so
hooray for good defaults :-)
Differential Revision: https://phabricator.services.mozilla.com/D112253
2023-05-17 02:12:40 +02:00
Oriol Brufau
743f213c25
style: Move moz-control-character-visibility out of mako, and remove support for gecko_pref_controlled_initial_value
...
No behavior change, just cleanup. Actually seem this technically _adds_ some code even
though it's a cleanup, but that's mostly because of the wrapping of the
derive list. The resulting code is simpler (more in-line with our usual
things, so I think it's an improvement).
Differential Revision: https://phabricator.services.mozilla.com/D111551
2023-05-16 23:17:16 +02:00
Oriol Brufau
fac547276f
style: Remove various image-orientation related prefs
...
These shipped in 77.
Differential Revision: https://phabricator.services.mozilla.com/D111550
2023-05-16 23:16:24 +02:00
Oriol Brufau
b40f4b6fec
style: Clean up text-justify, and make distribute a parse-time alias
...
Since it's simpler, as discussed in the CSSWG issue.
Differential Revision: https://phabricator.services.mozilla.com/D111346
2023-05-16 23:14:19 +02:00
Oriol Brufau
7c26fb82b1
style: add an appearance type that forces a dropshadow on menus on Windows, and uses SetWindowRgn to clip the popup to the border radius
...
Differential Revision: https://phabricator.services.mozilla.com/D109833
2023-05-16 23:00:33 +02:00
Oriol Brufau
4d2ccaf445
style: Use a single system font definition rather than two
...
Follow the pattern we use for system colors.
Differential Revision: https://phabricator.services.mozilla.com/D108822
2023-05-16 13:16:53 +02:00
Oriol Brufau
3b2eef3d7d
style: Part 2 - Add page-size attribute to nsStyleStruct and property parsing
...
This parsing is hidden behind the pref layout.css.page-size.enabled.
It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.
Differential Revision: https://phabricator.services.mozilla.com/D103958
2023-05-16 13:02:53 +02:00
Oriol Brufau
b38517757f
style: Remove layout.css.ruby.position-alternate.enabled pref
...
Differential Revision: https://phabricator.services.mozilla.com/D114044
2023-05-16 12:59:19 +02:00
Oriol Brufau
17ae374c65
style: part 1 - Support parsing ruby-position: alternate
...
Differential Revision: https://phabricator.services.mozilla.com/D107382
2023-05-16 12:56:06 +02:00
Pu Xingyu
4a65dd0425
layout_2020: Implement align-content in flexbox
...
Align all flex lines per `align-content`.
2023-05-12 10:43:32 +08:00
Pu Xingyu
debcd30b21
layout 2020: Implement justify-content in flexbox
...
Align the items along the main-axis per justify-content.
2023-05-10 19:06:52 +08:00
Oriol Brufau
16b07ee456
Implement outline-offset in layout-2020
...
Tests that are now passing:
- /_mozilla/css/outline_offset_a.htm
- /css/css-ui/outline-010.html
- /css/css-ui/outline-012.html
- /css/css-ui/outline-013.html
- /css/css-ui/outline-017.html
- /css/css-ui/outline-negative-offset-composited-scroll.html
- /css/css-ui/outline-offset-001.html
- /css/css-ui/outline-offset-table-001.html
- /css/css-ui/outline-offset.html
- /css/css-ui/parsing/outline-offset-computed.html
- /css/css-ui/parsing/outline-offset-valid.html
Also improvements in:
- /_mozilla/mozilla/calc.html
- /css/css-ui/animation/outline-offset-interpolation.html
- /css/css-ui/inheritance.html
2023-05-02 17:59:48 +02:00
Oriol Brufau
d67bf49bd9
Implement outlines in layout-2020
...
This only covers the CSS2 properties: 'outline-width', 'outline-style',
'outline-color', and the shorthand 'outline'.
CSS UI 3 introduced 'outline-offset', which is left for a follow-up.
'outline-color: invert' isn't included either, but note CSS UI says that
conformant UAs may ignore the 'invert' value on platforms that do not
support color inversion of the pixels on the screen.
Tests that are now passing:
- /_mozilla/css/input_insertion_point_empty_a.html
- /_mozilla/css/outlines_simple_a.html
- /_mozilla/css/stacking_context_overflow_relative_outline_a.html
- /_mozilla/mozilla/getPropertyPriority.html
- /css/CSS2/ui/outline-color-001.xht
- /css/CSS2/ui/outline-color-002.xht
- /css/CSS2/ui/outline-color-007.xht
- /css/CSS2/ui/outline-color-008.xht
- /css/CSS2/ui/outline-color-013.xht
- /css/CSS2/ui/outline-color-018.xht
- /css/CSS2/ui/outline-color-023.xht
- /css/CSS2/ui/outline-color-024.xht
- /css/CSS2/ui/outline-color-025.xht
- /css/CSS2/ui/outline-color-031.xht
- /css/CSS2/ui/outline-color-036.xht
- /css/CSS2/ui/outline-color-041.xht
- /css/CSS2/ui/outline-color-046.xht
- /css/CSS2/ui/outline-color-047.xht
- /css/CSS2/ui/outline-color-048.xht
- /css/CSS2/ui/outline-color-049.xht
- /css/CSS2/ui/outline-color-050.xht
- /css/CSS2/ui/outline-color-051.xht
- /css/CSS2/ui/outline-color-052.xht
- /css/CSS2/ui/outline-color-053.xht
- /css/CSS2/ui/outline-color-054.xht
- /css/CSS2/ui/outline-color-058.xht
- /css/CSS2/ui/outline-color-059.xht
- /css/CSS2/ui/outline-color-061.xht
- /css/CSS2/ui/outline-color-062.xht
- /css/CSS2/ui/outline-color-069.xht
- /css/CSS2/ui/outline-color-070.xht
- /css/CSS2/ui/outline-color-071.xht
- /css/CSS2/ui/outline-color-072.xht
- /css/CSS2/ui/outline-color-073.xht
- /css/CSS2/ui/outline-color-074.xht
- /css/CSS2/ui/outline-color-075.xht
- /css/CSS2/ui/outline-color-079.xht
- /css/CSS2/ui/outline-color-081.xht
- /css/CSS2/ui/outline-color-082.xht
- /css/CSS2/ui/outline-color-089.xht
- /css/CSS2/ui/outline-color-090.xht
- /css/CSS2/ui/outline-color-091.xht
- /css/CSS2/ui/outline-color-092.xht
- /css/CSS2/ui/outline-color-093.xht
- /css/CSS2/ui/outline-color-094.xht
- /css/CSS2/ui/outline-color-095.xht
- /css/CSS2/ui/outline-color-099.xht
- /css/CSS2/ui/outline-color-101.xht
- /css/CSS2/ui/outline-color-102.xht
- /css/CSS2/ui/outline-color-109.xht
- /css/CSS2/ui/outline-color-110.xht
- /css/CSS2/ui/outline-color-111.xht
- /css/CSS2/ui/outline-color-112.xht
- /css/CSS2/ui/outline-color-113.xht
- /css/CSS2/ui/outline-color-114.xht
- /css/CSS2/ui/outline-color-115.xht
- /css/CSS2/ui/outline-color-119.xht
- /css/CSS2/ui/outline-color-121.xht
- /css/CSS2/ui/outline-color-122.xht
- /css/CSS2/ui/outline-color-130.xht
- /css/css-ui/outline-001.html
- /css/css-ui/outline-002.html
- /css/css-ui/outline-004.html
- /css/css-ui/outline-007.html
- /css/css-ui/outline-008.html
- /css/css-ui/outline-016.html
- /css/css-ui/outline-018.html
- /css/css-ui/outline-021.html
- /css/css-ui/outline-022.html
- /css/css-ui/outline-color-001.html
- /css/css-ui/outline-style-011.html
- /css/css-ui/outline-style-012.html
- /css/css-ui/outline-style-013.html
- /css/css-ui/outline-style-014.html
- /css/css-ui/parsing/outline-color-computed.html
- /css/css-ui/parsing/outline-color-valid-mandatory.html
- /css/css-ui/parsing/outline-shorthand.html
- /css/css-ui/parsing/outline-style-computed.html
- /css/css-ui/parsing/outline-style-valid.html
- /css/css-ui/parsing/outline-width-valid.html
- /css/css-ui/translucent-outline.html
Also improvements in:
- /_mozilla/mozilla/calc.html
- /css/css-ui/animation/outline-color-interpolation.html
- /css/css-ui/animation/outline-width-interpolation.html
- /css/css-ui/inheritance.html
- /css/css-ui/outline-017.html
- /css/css-ui/parsing/outline-valid-mandatory.html
- /css/css-ui/parsing/outline-width-computed.html
- /css/cssom/cssom-setProperty-shorthand.html
- /css/cssom/getComputedStyle-resolved-colors.html
- /css/cssom/serialize-values.html
- /css/cssom/shorthand-values.html
New failures:
- /css/CSS2/ui/outline-applies-to-005.xht
- /css/CSS2/ui/outline-applies-to-006.xht
- /css/CSS2/ui/outline-color-applies-to-005.xht
- /css/CSS2/ui/outline-color-applies-to-006.xht
- /css/CSS2/ui/outline-style-applies-to-005.xht
- /css/CSS2/ui/outline-style-applies-to-006.xht
- /css/CSS2/ui/outline-width-applies-to-005.xht
- /css/CSS2/ui/outline-width-applies-to-006.xht
Al of these fail because tables are not implemented yet.
- /css/css-ui/outline-offset.html
Fails because outline-offset is not implemented yet.
- /css/css-ui/outline-with-padding-001.html
Fails because the outline doesn't include overflowing contents.
I don't think this is required by the spec, Firefox fails too.
2023-05-02 02:37:10 +02:00
Oriol Brufau
c842023741
Support text-indent in layout-2020
...
Existing WPT now passing:
- _mozilla/css/text_indent_a.html
- css/CSS2/css1/c71-fwd-parsing-002.xht
- css/CSS2/css1/c71-fwd-parsing-004.xht
- css/CSS2/floats-clear/floats-138.xht
- css/CSS2/text/text-indent-007.xht
- css/CSS2/text/text-indent-008.xht
- css/CSS2/text/text-indent-010.xht
- css/CSS2/text/text-indent-019.xht
- css/CSS2/text/text-indent-020.xht
- css/CSS2/text/text-indent-031.xht
- css/CSS2/text/text-indent-032.xht
- css/CSS2/text/text-indent-043.xht
- css/CSS2/text/text-indent-044.xht
- css/CSS2/text/text-indent-055.xht
- css/CSS2/text/text-indent-056.xht
- css/CSS2/text/text-indent-067.xht
- css/CSS2/text/text-indent-068.xht
- css/CSS2/text/text-indent-079.xht
- css/CSS2/text/text-indent-080.xht
- css/CSS2/text/text-indent-091.xht
- css/CSS2/text/text-indent-092.xht
- css/CSS2/text/text-indent-103.xht
- css/CSS2/text/text-indent-104.xht
- css/CSS2/text/text-indent-112.xht
- css/CSS2/text/text-indent-113.xht
- css/CSS2/text/text-indent-115.xht
- css/CSS2/text/text-indent-applies-to-002.xht
- css/CSS2/text/text-indent-applies-to-003.xht
- css/CSS2/text/text-indent-applies-to-005.xht
- css/CSS2/text/text-indent-applies-to-006.xht
- css/CSS2/text/text-indent-applies-to-007.xht
- css/CSS2/text/text-indent-applies-to-008.xht
- css/CSS2/text/text-indent-applies-to-009.xht
- css/CSS2/text/text-indent-applies-to-010.xht
- css/CSS2/text/text-indent-applies-to-011.xht
- css/CSS2/text/text-indent-applies-to-014.xht
- css/CSS2/text/text-indent-applies-to-015.xht
- css/CSS2/text/text-indent-inherited-001.xht
- css/CSS2/text/text-indent-overflow-001.xht
- css/CSS2/text/text-indent-overflow-002.xht
- css/CSS2/text/text-indent-overflow-003.xht
- css/CSS2/text/text-indent-overflow-004.xht
- css/CSS2/text/text-indent-wrap-001.xht
- css/css-text-decor/text-shadow/textindent.html
- css/css-text/text-indent/text-indent-percentage-001.xht
- css/css-text/text-indent/text-indent-percentage-002.html
- css/css-text/text-indent/text-indent-percentage-003.html
- css/css-text/text-indent/text-indent-percentage-004.html
- css/css-values/minmax-length-percent-serialize.html
- css/css-values/minmax-length-serialize.html
Also improvements in:
- _mozilla/mozilla/calc.html
- css/css-text/animations/text-indent-interpolation.html
- css/css-text/inheritance.html
- css/css-text/parsing/text-indent-computed.html
- css/css-text/parsing/text-indent-valid.html
- css/css-transitions/properties-value-implicit-001.html
- css/css-values/animations/calc-interpolation.html
- css/css-values/minmax-percentage-serialize.html
- css/css-values/viewport-units-css2-001.html
- css/css-variables/variable-substitution-basic.html
- css/cssom/serialize-values.html
Existing WPT now failing, due to lack of direction, outside list markers,
flex and grid:
- css/CSS2/text/text-indent-rtl-001.xht
- css/CSS2/text/text-indent-rtl-002.xht
- css/css-pseudo/marker-content-023.html
- css/css-text/text-indent/anonymous-flex-item-001.html
- css/css-text/text-indent/anonymous-grid-item-001.html
New WPT tests:
- css/css-text/text-indent/text-indent-length-001.html
- css/css-text/text-indent/text-indent-length-002.html
This one fails in layout-2013.
2023-04-25 23:01:07 +02:00
Emilio Cobos Álvarez
31e8e418ea
Miscellaneous build / tidy fixes.
2021-02-26 17:53:55 +01:00
Boris Chiou
0ef2410ea0
style: Implement Animate trait and ComputeSquaredDistance trait for <ratio>.
...
I also update the wpt becasue it seems the original one lets <ratio>
support the addition. However, the spec says "Addition of <ratio>s is not
possible".
Differential Revision: https://phabricator.services.mozilla.com/D106219
2021-02-26 16:44:05 +01:00
Emily McDonough
4dc475d3a1
style: Rename alias to aliases in Longhand and Shorthand
...
Differential Revision: https://phabricator.services.mozilla.com/D105810
2021-02-26 16:44:05 +01:00
Emily McDonough
1b18b06186
style: Switch properties to use a bitfield to determine validity in rules.
...
This doesn't use a full bitmap for every single rule type, as we only expect
that keyframe, page, and style rules will be checked.
Differential Revision: https://phabricator.services.mozilla.com/D104949
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
20f5e14bf8
style: Remove the need for needs_context in the mako glue.
...
It's only used to disambiguate between the one-argument and the trait
version of Keyword::parse. Instead, just explicitly use the trait
version, so that we don't need to specify it.
Differential Revision: https://phabricator.services.mozilla.com/D104328
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
5fe702fa2b
style: Move caption-side outside of mako.
...
Make it an enum class, etc.
Differential Revision: https://phabricator.services.mozilla.com/D103978
2021-02-26 16:44:05 +01:00
longsonr
eec92977f7
style: remove svg.transform-box.enabled pref
...
It's been default true since Firefox 55 via bug 1208550
Differential Revision: https://phabricator.services.mozilla.com/D102093
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
65a06d5003
style: Support full <image> syntax in list-style-image as per spec.
...
This allows supporting image-set(), etc, and simplifies the bullet frame
code significantly, too thanks to two changes:
* Instead of manually managing the image request, use the CSS image
loader, with the `REQUEST_REQUIRES_REFLOW` flag, to handle image
loads correctly. This didn't exist when this code was initially
implemented, but we can nicely use it now.
* Instead of re-implementing another WebRender command-builder thing,
we can just reuse the nsImageRenderer code.
Differential Revision: https://phabricator.services.mozilla.com/D100774
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
5f4da63a5e
style: Remove some text-decoration prefs that are always on.
...
Differential Revision: https://phabricator.services.mozilla.com/D99675
2021-02-26 16:44:05 +01:00
Frederic Wang
4dfcf583cf
style: Rename -moz-math-script-level to math-depth.
...
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D91285
2021-02-26 16:44:05 +01:00
Frederic Wang
dab46fc958
style: Implement displaystyle attribute on all MathML elements.
...
Gecko implements the displaystyle attribute as defined by MathML 3 i.e.
only on the math, mstyle and mtable elements. This commit follows MathML
Core and instead define it as a global attribute mapped to math-style.
See https://mathml-refresh.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes
Differential Revision: https://phabricator.services.mozilla.com/D90786
2021-02-26 16:44:05 +01:00
Frederic Wang
ca03f4df6d
style: Implement the math-style property.
...
This patch renames the internal -moz-math-display to math-style and
exposes it under the layout.css.math-style.enabled preference. The
initial value becomes "normal" but that does not affect the default
MathML behavior since the UA style sheet sets the math-style property
explicitly on <math> tags. WPT tests are updated to use the syntax
approved by the CSSWG.
Intent to prototype: https://groups.google.com/forum/#!msg/mozilla.dev.platform/1hQQ7ISudGo/_yLEckEeBQAJ
Differential Revision: https://phabricator.services.mozilla.com/D90731
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
768db078ef
style: Make appearance: button behave like auto.
...
As per https://github.com/w3c/csswg-drafts/issues/5174 .
Differential Revision: https://phabricator.services.mozilla.com/D89119
2021-02-26 16:44:05 +01:00
Shinichi Morimoto
5d5d4f4429
style: Remove layout.css.offset-logical-properties.enabled.
...
Differential Revision: https://phabricator.services.mozilla.com/D87297
2021-02-26 16:44:05 +01:00
Brian Birtles
7c3d815f78
style: Make text-combine-upright not animatable.
...
Differential Revision: https://phabricator.services.mozilla.com/D84935
2021-02-26 16:44:05 +01:00
Alexander Surkov
32f92d18a8
style: implement -moz-inert CSS property.
...
-moz-inert CSS property reflects inert subtrees concept and can be used to implement HTML:dialog element and HTML:inert attribute
Differential Revision: https://phabricator.services.mozilla.com/D81701
2021-02-26 16:44:05 +01:00
Philipp Zech
cd8c07abac
style: Convert writing-modes #defines to an enum class.
...
Differential Revision: https://phabricator.services.mozilla.com/D84016
2021-02-26 16:44:05 +01:00
Cameron McCormack
862b7d1249
style: Make appearance: button
behave like auto on various elements.
...
Differential Revision: https://phabricator.services.mozilla.com/D83434
2021-02-26 16:44:05 +01:00
Cameron McCormack
8457666204
style: Change internal uses of -moz-appearance to appearance and -moz-default-appearance.
...
Uses of `-moz-appearance: none` are changed to `appearance: none`.
Uses of other values that are simply reverting the appearance back to
its default are changed to `appearance: auto`.
Uses of values in UA sheets that are defining the inherent appearance of
widgets are changed to:
appearance: auto;
-moz-default-appearance: <value>;
since those values are either no longer supported on (-moz-)appearance,
or are still supported but only in some limited form.
There are some uses of `-moz-appearance: textfield` on <input
type=number> elements that are renamed to `appearance: textfield`.
Differential Revision: https://phabricator.services.mozilla.com/D83430
2021-02-26 16:44:05 +01:00
Cameron McCormack
01efe3a459
style: Add unprefixed appearance property and make -moz-appearance and -webkit-appearance be aliases.
...
Differential Revision: https://phabricator.services.mozilla.com/D83428
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
46df06b3e2
style: Use mozilla::Length rather than nscoord to store font sizes.
...
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).
Differential Revision: https://phabricator.services.mozilla.com/D79928
2021-02-26 16:44:05 +01:00
bors-servo
6a3c3a4e18
Auto merge of #26447 - jdm:white-space-2020, r=nox
...
Layout 2020: Implement basic white-space: pre support
With these changes `<pre>` and `<br>` preserve spaces and force line breaks appropriately.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26440
- [x] There are tests for these changes
2020-07-29 10:29:30 -04:00
Manish Goregaokar
139f240baf
Enable clip property in layout 2020
2020-07-27 19:59:59 -07:00
Josh Matthews
d8b4dab4e3
Implement basic white-space: pre support for layout 2020.
2020-07-27 20:06:53 -04:00
Simon Sapin
b91e293819
Add layout support for list markers
2020-07-24 09:31:24 +02:00
Manish Goregaokar
1af5efc542
flexbox 2020: Enable align-self and align-items in CSS
2020-07-20 14:26:14 -07:00
Emilio Cobos Álvarez
33b548ae64
style: Use an enum class for LookAndFeel::FontID.
...
Differential Revision: https://phabricator.services.mozilla.com/D76696
2020-06-18 23:51:16 +02:00
neil
7b5953da95
style: Remove the layout.css.scrollbar-width.enabled and layout.css.scrollbar-color.enabled prefs.
...
Differential Revision: https://phabricator.services.mozilla.com/D78400
2020-06-18 23:51:16 +02:00
Cameron McCormack
9b980e2f49
style: Add telemetry for -moz-appearance usage.
...
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-18 23:51:15 +02:00
Philipp Zech
5af0d7ca7c
style: Remove StyleFontSize enum from nsStyleConsts.h.
...
Differential Revision: https://phabricator.services.mozilla.com/D77511
2020-06-18 23:51:14 +02:00
Matthias Deiml
b85a5dac5d
Implement visibility for layout_2020
2020-06-14 00:31:37 +02:00
Simon Sapin
dcd25a06da
Enable (behind a pref) parsing of the flex-*
properties
2020-06-10 08:38:36 +02:00