servo/components/style/properties/longhands
alwu c00045b0c9
style: set CSS properties directly on '::cue'.
According to the spec [1], we have to set those CSS properties on the root node,
and then this root node would have a child node, background box [2], which would
contain all other child nodes.

In our case, the background box is `cueDiv` [3].

In theory, all those properties set on the root node should be inherited by the
background box. However, when the background box is a pseudo element `::cue`,
they won't be directly inherit from the the background box's parent, inherited
styles would acutally come from video instead.

Therefore, we have to directly set these properties on the pseudo element and
mark them as `!important` to avoid being overrided by user style script.

[1] https://www.w3.org/TR/webvtt1/#ref-for-list-of-webvtt-node-objects-9
[2] https://www.w3.org/TR/webvtt1/#webvtt-cue-background-box
[3] https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/dom/media/webvtt/vtt.jsm#533-534

Differential Revision: https://phabricator.services.mozilla.com/D35694
2019-07-23 22:53:58 +02:00
..
background.mako.rs style: restrict CSS properties for '::cue'. 2019-07-08 12:42:46 +02:00
border.mako.rs style: Use cbindgen for gradients. 2019-06-25 13:11:27 +02:00
box.mako.rs style: Implement overflow-block and overflow-inline properties 2019-06-25 13:11:30 +02:00
column.mako.rs style: Derive more stuff for clip rects. 2019-03-13 15:08:32 +01:00
counters.mako.rs style: Restrict properties that apply to ::marker for now. 2019-07-08 12:45:06 +02:00
effects.mako.rs style: Servo doesn't support backdrop-filter yet. 2019-07-08 14:59:16 +02:00
font.mako.rs style: Apply text-only zoom to system fonts. 2019-07-08 12:46:22 +02:00
inherited_box.mako.rs style: set CSS properties directly on '::cue'. 2019-07-23 22:53:58 +02:00
inherited_svg.mako.rs style: Share computed and specified value representation of -moz-context-properties. 2019-05-29 16:14:10 +02:00
inherited_table.mako.rs style: Convert NS_STYLE_BORDER to an enum class in nsStyleConsts.h. 2019-05-07 12:55:56 +02:00
inherited_text.mako.rs style: set CSS properties directly on '::cue'. 2019-07-23 22:53:58 +02:00
inherited_ui.mako.rs style: Expose colors via cbindgen. 2019-04-12 12:19:59 +02:00
list.mako.rs style: Add an inherited internal UA sheet property (-moz-list-reversed:true|false) to propagate <ol reversed> to its relevant descendants. 2019-03-27 14:29:22 +01:00
margin.mako.rs style: Support AllowQuirks::Always option in helpers.mako.rs 2019-05-29 16:14:21 +02:00
outline.mako.rs style: restrict CSS properties for '::cue'. 2019-07-08 12:42:46 +02:00
padding.mako.rs style: Support AllowQuirks::Always option in helpers.mako.rs 2019-05-29 16:14:21 +02:00
position.mako.rs style: Add an internal aspect-ratio CSS property. 2019-07-08 12:43:58 +02:00
svg.mako.rs style: Use cbindgen for gradients. 2019-06-25 13:11:27 +02:00
table.mako.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
text.mako.rs style: Restrict properties that apply to ::marker for now. 2019-07-08 12:45:06 +02:00
ui.mako.rs style: Unprefix user-select. 2019-05-29 16:14:17 +02:00
xul.mako.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00