servo/components
Emilio Cobos Álvarez 1bc30a6732
style: Move unboxing to style, and handle display: contents before other suppressions.
This also adopts the resolution of [1] while at it, and switches XUL to not
support display: contents until a use case appears.

This makes our behavior consistent both with the spec and also in terms of
handling dynamic changes to stuff that would otherwise get suppressed.

Also makes us consistent with both Blink and WebKit in terms of computed style.
We were the only ones respecting "behaves as display: none" without actually
computing to display: none. Will file a spec issue to get that changed.

It also makes us match Blink and WebKit in terms of respecting display: contents
before other suppressions, see the reftest which I didn't write as a WPT
(because there's no spec supporting neither that or the opposite of what we do),
where a <g> element respects display: contents even though if it had any other
kind of display value we'd suppress the frame for it and all the descendants
since it's an SVG element in a non-SVG subtree.

Also, this removes the page-break bit from the display: contents loop, which I
think is harmless.

As long as the tests under style are based in namespace id / node name /
traversal parent, this should not make style sharing go wrong in any way, since
that's the first style sharing check we do at [2].

The general idea under this change is making all nodes with computed style of
display: contents actually honor it. Otherwise there's no way of making the
setup sound except re-introducing something similar to all the state tracking
removed in bug 1303605.

[1]: https://github.com/w3c/csswg-drafts/issues/2167
[2]: https://searchfox.org/mozilla-central/rev/fca4426325624fecbd493c31389721513fc49fef/servo/components/style/sharing/mod.rs#700

Bug: 1453702
Reviewed-by: mats, xidorn
MozReview-Commit-ID: JoCKnGYEleD
2018-04-17 20:01:46 +02:00
..
allocator Fork the jemallocator crate, fix for nightly-2018-04-15 2018-04-16 08:56:08 +02:00
atoms Implement history state 2018-04-16 10:21:15 -05:00
bluetooth Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
bluetooth_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
canvas Properly clamp arguments to WebGLRenderingContext.depthRange 2018-04-05 09:31:09 +02:00
canvas_traits Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
compositing Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
config Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
constellation Implement history state 2018-04-16 10:21:15 -05:00
debugger Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
deny_public_fields Bump syn/quote in deny_public_fields 2018-02-12 15:05:18 +01:00
devtools Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
devtools_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
dom_struct Upgrade to rustc 1.27.0-nightly (056f589fb 2018-04-07) 2018-04-09 21:43:25 +02:00
domobject_derive Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00
fallible Update smallvec to 0.6 2017-12-05 12:03:20 +01:00
geometry alias some euclid types 2018-03-16 14:34:29 +08:00
gfx Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
gfx_traits Update WebRender 2018-02-06 15:10:35 +01:00
hashglobe Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
jstraceable_derive Bump syn/quote in jstraceable_derive 2018-02-12 17:07:58 +01:00
layout Add support for percentages in column-gap. 2018-04-05 21:04:29 -03:00
layout_thread Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
layout_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
malloc_size_of Hide non-Servo heap measurement. 2018-04-02 10:21:18 -04:00
malloc_size_of_derive Bump syn/quote in malloc_size_of_derive 2018-02-12 17:08:19 +01:00
metrics added spec comments 2018-04-11 21:29:03 +01:00
msg Implement history state 2018-04-16 10:21:15 -05:00
net Implement history state 2018-04-16 10:21:15 -05:00
net_traits Implement history state 2018-04-16 10:21:15 -05:00
nonzero Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
profile Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
profile_traits Measure cache memory usage (#19251): 2018-04-01 13:30:57 -04:00
rand Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
range
remutex Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
script Auto merge of #20646 - servo:webgl, r=emilio 2018-04-16 12:43:33 -04:00
script_layout_interface Add unique canvas IDs to all canvas operations. 2018-04-02 22:02:22 -04:00
script_plugins Make the unrooted_must_root conditional on a default Cargo feature. 2017-11-02 15:08:04 +01:00
script_traits Implement history state 2018-04-16 10:21:15 -05:00
selectors Run rustfmt on selectors, servo_arc, and style. 2018-04-10 17:35:15 -07:00
servo Fix the env_logger update 2018-04-03 12:03:41 +02:00
servo_arc Run rustfmt on selectors, servo_arc, and style. 2018-04-10 17:35:15 -07:00
size_of_test
style style: Move unboxing to style, and handle display: contents before other suppressions. 2018-04-17 20:01:46 +02:00
style_derive Share a single #[animation(no_bound(…))] for the animation traits 2018-03-12 09:48:25 +01:00
style_traits Remove useless AsciiExt imports. 2018-03-27 10:30:02 +02:00
url Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
webdriver_server Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
webvr Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
webvr_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00