servo/components/style
bors-servo 75cae28728 Auto merge of #18103 - birtles:drop-fill-none-interpolation, r=hiro
Don't allow interpolating 'fill:none' with 'fill:none'

From [Gecko bug 1390364](https://bugzilla.mozilla.org/show_bug.cgi?id=1390364).

In SMIL we don't expect the 'none' value of the 'fill' property to be additive and hence the following animation should have no effect:

```svg
  <rect width="100" height="100" y="100" fill="blue">
    <animate attributeName="fill" dur="3s" from="red" by="none"/>
  </rect>
```

Although SMIL doesn't make this entirely clear, [it says](https://www.w3.org/TR/smil-animation/#AnimFuncValues) that "by animation" and "from-by animation" may only be used "with attributes that support addition (e.g.  most numeric attributes)" and [SVG says](https://www.w3.org/TR/SVG11/animate.html#AnimationAttributesAndProperties) that `<paint>`s are "only additive if each value can be converted to an RGB color". As a result, the animation above should have no effect.

By extrapolation, animating from 'none' by 'none' should also have no effect:

```svg
  <rect width="100" height="100" y="100" fill="blue">
    <animate attributeName="fill" dur="3s" from="none" by="none"/>
  </rect>
```

However, in Servo's interpolation of `<paint>`s we special case the interpolation and addition of 'none' such that if both values are 'none' it is allowed.

We should disallow this in order to produce the expected behavior and in order to match Gecko's behavior.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18103)
<!-- Reviewable:end -->
2017-08-16 05:46:56 -05:00
..
counter_style Update to cssparser 0.19, count line numbers during tokenization 2017-08-09 22:37:16 +02:00
gecko Auto merge of #18087 - emilio:stylist-clear-cleanup, r=heycam 2017-08-16 02:56:13 -05:00
gecko_bindings Convert gecko's currentcolor to servo one. 2017-08-15 15:19:47 +09:00
gecko_string_cache stylo: Devirtualize nsIAtom refcounting. 2017-08-09 13:06:11 +02:00
invalidation stylo: Cleanup a bit of the Stylist clear setup. 2017-08-16 08:49:41 +02:00
properties Don't allow interpolating 'fill:none' with 'fill:none' 2017-08-16 15:01:44 +09:00
rule_tree Make emtpy rule can be inserted into rule tree 2017-08-16 11:08:49 +08:00
servo stylo: Remove some unused FFI functions. 2017-08-15 23:57:59 +02:00
sharing Introduce a new flag and use it to be more permissive about cousin sharing. 2017-08-05 01:07:02 -07:00
stylesheets stylo: Cleanup a bit of the Stylist clear setup. 2017-08-16 08:49:41 +02:00
values Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
animation.rs style: Tweak Stylist API for getting animations to avoid exposing the hash table. 2017-08-09 16:24:49 +08:00
applicable_declarations.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
attr.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
bezier.rs Don't use Point2D<f32> for cubic curves anymore 2017-07-19 10:19:41 +02:00
bloom.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
build.rs Remove testing feature from style crate 2017-08-07 14:30:31 -07:00
build_gecko.rs Better bindgen error message when files are missing. 2017-07-07 22:49:45 -07:00
cache.rs Adapt LRUCache to use ArrayDeque crate instead of VecDeque 2017-06-03 20:59:01 +02:00
Cargo.toml Update to cssparser 0.19, count line numbers during tokenization 2017-08-09 22:37:16 +02:00
cascade_info.rs Remove style::values::HasViewportPercentage reexport 2017-05-20 22:00:05 +02:00
context.rs Auto merge of #18017 - heycam:split-cascade, r=emilio 2017-08-09 19:28:07 -05:00
custom_properties.rs Auto merge of #18025 - servo:line-counting, r=jdm 2017-08-09 16:16:33 -05:00
data.rs Avoid leaving stale ANCESTOR_WAS_RECONSTRUCTED bits in the tree. 2017-08-15 14:25:50 -07:00
dom.rs Bonus fix: Be more robust about clearing descendants bits under display:none subtrees. 2017-08-15 14:25:50 -07:00
element_state.rs Bug 1348489 - stylo: Implement :-moz-window-inactive. 2017-06-30 09:31:01 -07:00
encoding_support.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
error_reporting.rs Update to cssparser 0.19, count line numbers during tokenization 2017-08-09 22:37:16 +02:00
font_face.rs Update to cssparser 0.19, count line numbers during tokenization 2017-08-09 22:37:16 +02:00
font_metrics.rs stylo: Use gecko's font metrics 2017-04-10 14:29:51 +08:00
lib.rs Drop AnimatedProperty for stylo. 2017-08-09 17:34:55 +09:00
logical_geometry.rs Untry style 2017-06-18 13:18:13 +02:00
macros.rs Derive ComputeSquaredDistance 2017-08-13 13:34:04 +02:00
matching.rs Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
media_queries.rs Rework MediaType to be an atom-based struct instead of an enum. 2017-08-09 13:25:30 -07:00
parallel.rs Hoist StyleNew{Children,Subtree} into their own paths. 2017-08-11 10:53:08 -07:00
parser.rs Update to cssparser 0.19, count line numbers during tokenization 2017-08-09 22:37:16 +02:00
README.md
scoped_tls.rs Reduce the size of top_down_dom stackframes. 2017-06-08 13:02:36 -04:00
selector_map.rs stylo: Cleanup a bit of the Stylist clear setup. 2017-08-16 08:49:41 +02:00
selector_parser.rs style: Use an enumerated array for per-pseudo maps. 2017-08-08 12:40:31 +02:00
sequential.rs Hoist StyleNew{Children,Subtree} into their own paths. 2017-08-11 10:53:08 -07:00
shared_lock.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
str.rs Rework MediaType to be an atom-based struct instead of an enum. 2017-08-09 13:25:30 -07:00
style_adjuster.rs Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
style_resolver.rs Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
stylesheet_set.rs stylo: Cleanup a bit of the Stylist clear setup. 2017-08-16 08:49:41 +02:00
stylist.rs stylo: Cleanup a bit of the Stylist clear setup. 2017-08-16 08:49:41 +02:00
thread_state.rs
timer.rs
traversal.rs Avoid recursion in clear_descendant_data. 2017-08-15 23:24:17 -07:00
traversal_flags.rs Process normal traversal for throttled animation flush as well. 2017-08-11 18:52:29 -07:00

servo-style

Style system for Servo, using rust-cssparser for parsing.