Emilio Cobos Álvarez
c106fb1231
style: Remove comment that is outdated since I fixed it in bug 1483808.
2019-04-12 12:19:56 +02:00
Emilio Cobos Álvarez
39df092bce
style: fix some rust-nightly warnings about unused doc comments.
...
Differential Revision: https://phabricator.services.mozilla.com/D24287
2019-03-27 14:29:16 +01:00
Emilio Cobos Álvarez
e723a5b7d6
style: Make the pres context optional in the style system.
...
Differential Revision: https://phabricator.services.mozilla.com/D21239
2019-03-13 15:08:32 +01:00
Emilio Cobos Álvarez
dcfe30ff18
style: Remove a couple trivial dependencies on nsPresContext.
...
Differential Revision: https://phabricator.services.mozilla.com/D20141
2019-02-23 21:04:19 -08:00
Jonathan Kingston
d6750de0c3
style: Add support for CSS prefers-color-scheme media feature.
...
Bug: 1494034
Reviewed-by: emilio
2019-02-23 21:03:07 -08:00
Martin Stransky
e27c15e2f9
Honour system titlebar button left/right placement.
...
Differential Revision: https://phabricator.services.mozilla.com/D16466
2019-01-20 14:32:58 +01:00
Martin Stransky
424eb94c7f
Enable hidden system titlebar by default on Gnome.
...
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).
It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.
It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.
Differential Revision: https://phabricator.services.mozilla.com/D16036
2019-01-20 14:32:01 +01:00
Emilio Cobos Álvarez
5f173c463e
style: Rustfmt recent changes.
2019-01-07 00:32:54 +01:00
quasicomputational
274845fc14
style: Implement the 'overflow-inline' media query.
...
Bug: 1422235
Reviewed-by: emilio
2019-01-07 00:32:51 +01:00
quasicomputational
81a07b4351
style: Implement the 'overflow-block' media query.
...
Bug: 1422235
Reviewed-by: emilio
2019-01-07 00:32:51 +01:00
Simon Sapin
be69f9c3e6
Rustfmt has changed its default style :/
2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Simon Sapin
b1822a39fa
cargo fix --edition --features gecko
2018-11-10 17:47:28 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
Boris Chiou
cb2533d61a
style: Use alias for StyleDisplay and StyleDisplayMode.
...
Map these two types to their original rust type in rust-bindgen.
Differential Revision: https://phabricator.services.mozilla.com/D10141
2018-11-05 12:30:38 +01:00
Martin Stransky
6a1078c551
style: [CSD] Enable round corners by default by -moz-gtk-csd-transparent-background media query.
...
Replace mozilla.widget.use-argb-visuals pref by
-moz-gtk-csd-transparent-background media query at browser.css to draw
transparent background. The media query is set by toolkit code and enabled when
compatible window manager is detected.
Differential Revision: https://phabricator.services.mozilla.com/D6658
2018-10-09 19:43:50 +02:00
Emilio Cobos Álvarez
da5283d066
style: Fix Gecko build.
2018-09-15 19:19:18 +02:00
Hiroyuki Ikezoe
3d909132ba
style: Implement any-hover and any-pointer media queries features.
...
Differential Revision: https://phabricator.services.mozilla.com/D3609
2018-09-15 17:57:29 +02:00
Hiroyuki Ikezoe
9354a42fc1
style: Add media feature keys for hover and pointer.
...
https://drafts.csswg.org/mediaqueries-4/#hover
https://drafts.csswg.org/mediaqueries-4/#pointer
In this patch series, we don't introduce any-hover and any-pointer media
features yet, but functionalities for them on each platform backends will be
introduced in this patch series, so eIntID_AllPointerCapabilities and relevant
stuff is added in this patch for the convenience that each platform backends
can be reviewed at once.
Differential Revision: https://phabricator.services.mozilla.com/D3296
2018-09-15 17:57:18 +02:00
chansuke
8dab4d659a
Format style component.
2018-09-09 16:24:45 +02:00
Emilio Cobos Álvarez
38a00745e2
Appease tidy.
2018-08-18 18:41:40 +02:00
Emilio Cobos Álvarez
935b5393a9
Port servo to the new media query system.
...
Port `width`, and also add the `scan` media feature so I don't need to add
ugliness just to workaround the unused keyword_evaluator macro.
2018-08-18 18:23:26 +02:00
Emilio Cobos Álvarez
67f2185f54
style: Make webkit device-pixel-ratio media queries a proper alias to resolution.
...
According to the spec:
https://compat.spec.whatwg.org/#css-media-queries-webkit-device-pixel-ratio
And to the Chromium implementation:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/media_query_evaluator.cc?l=366&rcl=1d7328865bcf06a687aafc18ff95d55317030672
They're no different than resolution.
In our implementation `resolution` does slightly different stuff. Given we
still haven't shipped -webkit-device-pixel-ratio, making this match resolution
looks better than the opposite.
Differential Revision: https://phabricator.services.mozilla.com/D3588
2018-08-18 17:54:54 +02:00
Xidorn Quan
c9c5e56079
style: Use AspectRatio directly for RangeOrOperator::evaluate.
...
Differential Revision: https://phabricator.services.mozilla.com/D3587
2018-08-18 17:54:54 +02:00
Emilio Cobos Álvarez
d63ce552f7
style: Deduplicate system metric atoms.
...
Now that :-moz-system-metric is gone, there's no real reason for the atoms to
be separate.
Differential Revision: https://phabricator.services.mozilla.com/D3497
2018-08-18 17:54:54 +02:00
Emilio Cobos Álvarez
fe05c8ecad
style: Add some spec links to media queries.
...
Differential Revision: https://phabricator.services.mozilla.com/D3489
2018-08-18 17:54:54 +02:00
Emilio Cobos Álvarez
dc0f937224
style: Rewrite media queries so that they work on an evaluator function.
...
This moves most of the code to be Rust, except potentially some evaluator
functions, and allows to unblock the use case from any-hover / any-pointer and
remove nsMediaFeatures.
Differential Revision: https://phabricator.services.mozilla.com/D2976
2018-08-18 17:54:54 +02:00