Commit graph

156 commits

Author SHA1 Message Date
Oriol Brufau
d564f200aa Further changes required by Servo 2023-05-24 18:32:41 +02:00
Emilio Cobos Álvarez
5530f7e90c style: Support break-inside: avoid-{page,column}
break-before/after: page|column seem harder because you need to deal
with nested breaks, I think, but this should be straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D121206
2023-05-24 18:32:41 +02:00
Emilio Cobos Álvarez
6d6ea6cfe4 style: Remove support for unused gtk infobar widget and colors
Presumably they were for notifications and now we use native notifications?

Differential Revision: https://phabricator.services.mozilla.com/D114874
2023-05-24 18:32:29 +02:00
Oriol Brufau
aea14a2470 Further changes required by Servo 2023-05-19 19:06:09 +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
cbf2a91ec8 style: Remove unused -moz-default-appearance values -moz-mac-vibrancy-light/dark, and the system colors of the same name
Starting with macOS 10.14, the generic light/dark vibrancy is deprecated, and semantic vibrancy names are preferred.
If we ever need more vibrancy, we can add new values with semantic names.

Depends on D107910

Differential Revision: https://phabricator.services.mozilla.com/D108152
2023-05-16 13:02:17 +02:00
s-maurice
83daac57fd add custom debug formatting for display
Signed-off-by: s-maurice <51819025+s-maurice@users.noreply.github.com>
2022-03-23 12:20:05 +01:00
Markus Stange
e6aaafdda5 style: Remove -moz-mac-fullscreen-button value.
Depends on D105379

Differential Revision: https://phabricator.services.mozilla.com/D105380
2021-02-26 16:44:05 +01:00
Mats Palmgren
84cabf2416 style: Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset.
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
4d8f55a7cb style: Add a more sensible scrollbar size API to nsITheme, and use it to replace ScrollbarNonDisappearing.
There's no reason we should need an scrollbar box to query the size of a
scrollbar. I plan to use this in the following patch to make the size of a
resizer not vary depending on whether the container has scrollbars or not,
which is what ultimately causes the reftest failure.

Differential Revision: https://phabricator.services.mozilla.com/D103302
2021-02-26 16:44:05 +01:00
Sunita Sen
9f20a24e4c style: Add support for touch-action:pinch-zoom - Add pinch-zoom support to touchAction.
Differential Revision: https://phabricator.services.mozilla.com/D97815
2021-02-26 16:44:05 +01:00
Sunita Sen
85b45cd615 style: Add support for touch-action:pinch-zoom - Rewrite to_css and parse for touchAction
Differential Revision: https://phabricator.services.mozilla.com/D97650
2021-02-26 16:44:05 +01:00
Tim Nguyen
4ea378a6ae style: Remove support for XUL grid display values.
Differential Revision: https://phabricator.services.mozilla.com/D53297
2021-02-26 16:44:05 +01:00
Markus Stange
e2545ee95d style: Use the -moz-default-appearance values "scrollbar-horizontal" and "scrollbar-vertical" on macOS and remove the now-unused value "scrollbar".
Other platforms were already converted to scrollbar-horizontal and scrollbar-vertical in bug 1205643.

Differential Revision: https://phabricator.services.mozilla.com/D94674
2021-02-26 16:44:05 +01:00
Markus Stange
d246b9e4c3 style: Remove "scrollbar-small" -moz-default-appearance value and replace its single use with scrollbar-width: thin.
Differential Revision: https://phabricator.services.mozilla.com/D94673
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
Jeremy Ir
9bfcb3d741 style: Rename overflow:-moz-hidden-unscrollable to overflow:clip.
Differential Revision: https://phabricator.services.mozilla.com/D73716
2021-02-26 16:44:05 +01:00
Cameron McCormack
a2b016157e style: Hide range and number-input appearance values from content.
Forgot to follow up on these two remaining non-standard values that may have
been being used to reset a <meter> or <input type=number> back to its
original appearance, but which telemetry showed no usage of.

Differential Revision: https://phabricator.services.mozilla.com/D83598
2021-02-26 16:44:05 +01:00
Cameron McCormack
da503c4b48 style: Re-order Appearance values.
Differential Revision: https://phabricator.services.mozilla.com/D83437
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
f03883774b style: Avoid exposing appearance: range-thumb to content.
Differential Revision: https://phabricator.services.mozilla.com/D83433
2021-02-26 16:44:05 +01:00
Cameron McCormack
ab3791234e style: Mark appearance values that are only used internally as chrome-only.
Differential Revision: https://phabricator.services.mozilla.com/D83432
2021-02-26 16:44:05 +01:00
Cameron McCormack
21b6c69322 style: Remove appearance values not used by the browser or Web content.
Differential Revision: https://phabricator.services.mozilla.com/D83431
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
Cameron McCormack
1f9d6ad5ef style: Remove unused function on Appearance.
Differential Revision: https://phabricator.services.mozilla.com/D82124
2021-02-26 16:44:05 +01:00
Cameron McCormack
87612b65c5 style: Remove unused StyleAppearance values.
The parsing of these values was disabled in bug 1554150.

Differential Revision: https://phabricator.services.mozilla.com/D82122
2021-02-26 16:44:05 +01:00
Simon Sapin
82e274aec9 Make a bool for display: list-item available to flow box construction 2020-07-23 16:43:57 +02:00
Emilio Cobos Álvarez
a7d740331d
style: Fix a warning in layout-2020 2020-06-18 23:51:19 +02:00
Emilio Cobos Álvarez
bb8c3ee8ba
style: fix formatting. 2020-06-18 23:51:18 +02:00
Emilio Cobos Álvarez
97f29c893f
style: Fix gecko build. 2020-06-18 23:51:18 +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
Simon Sapin
64124f7a5e Layout 2020 skeleton for display: flex, behind a pref 2020-06-04 13:09:57 +02:00
Simon Sapin
09dbf91e7b display: contents computes to block on the root element 2020-05-15 13:25:35 +02:00
Martin Robinson
9c7b1ae715 layout_2020: Add initial support for getComputedStyle
This implementation is more-or-less on par with the one from layout_2013
and in some cases better. There are still some cases where we don't
return the correct "resolved value," but this is enough to test
animations and transitions.
2020-05-11 20:14:01 +02:00
Emilio Cobos Álvarez
414edb5a4a style: Simplify the implementation of HasAuthorSpecifiedRules.
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

Differential Revision: https://phabricator.services.mozilla.com/D67722
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
4a19074664 style: Rename -moz-menulist-button to -moz-menulist-arrow-button.
This should be less confusing. This is not supported outside of chrome:// or
user-agent stylesheets so we can name this however we want.

Differential Revision: https://phabricator.services.mozilla.com/D65605
2020-04-16 16:35:07 +02:00
Tim Nguyen
fc88e908d5 style: Re-introduce display: -moz-stack; as <legacy-stack>.
Differential Revision: https://phabricator.services.mozilla.com/D62758
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
071ce6f345
style: Rustfmt recent changes. 2020-02-12 02:43:23 +01:00
Tim Nguyen
127755551d
style: Remove nsGroupBoxFrame (display: -moz-groupbox).
Differential Revision: https://phabricator.services.mozilla.com/D61422
2020-02-12 02:43:19 +01:00
Emilio Cobos Álvarez
718a9b1f05
style: Make display: -moz-box more similar to other display types for block layout.
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

Differential Revision: https://phabricator.services.mozilla.com/D58726
2020-02-12 02:43:09 +01:00
Emilio Cobos Álvarez
2b499e4850
style: Do not use synthetic display-inside values.
This matches the new servo layout engine too, and thus removes some #[cfg]
gunk.  Just use `flow` since it doesn't simplify the layout code as much.

Differential Revision: https://phabricator.services.mozilla.com/D45973
2020-02-12 02:43:07 +01:00
Emilio Cobos Álvarez
ef16c5844f Rustfmt recent changes. 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
Simon Sapin
d717382c0c Disable in Layout 2020 an assertion that does not apply there 2019-12-10 18:41:14 +01:00
Emilio Cobos Álvarez
006417e40a
style: Rustfmt recent changes. 2019-11-30 20:45:07 +01:00
Boris Chiou
45c64a7224
style: Set WillChangeBits::TRANSFORM for offset-path and add tests for it.
Differential Revision: https://phabricator.services.mozilla.com/D53109
2019-11-30 20:45:00 +01:00
Tim Nguyen
c04a37982c
style: Remove nsStackFrame platform code.
Differential Revision: https://phabricator.services.mozilla.com/D49487
2019-11-30 20:44:56 +01:00
Simon Sapin
8f89f59329 2020: parse display: contents 2019-10-24 10:44:31 +02:00
Emilio Cobos Álvarez
031cb05c67 style: Fix servo build. 2019-10-09 13:21:35 +02:00
Emilio Cobos Álvarez
33d39d37a2 style: Rustfmt recent changes. 2019-10-09 13:21:35 +02:00