servo/components
Michael Nelson a0998d30d4 Update PropertyDeclarationBlock::to_css so that the iteration of
possible shorthands matches the linked spec.

Previously substep 5 attempted to serialize the complete shorthand
declaration and substep 6 skipped to the next shorthand only if the
current shorthand was not serialized, but this did not catch empty
serializations. The spec on the other hand specifically says that the
*value* should be evaluated first and if the value is empty substep 6
should skip to the next shorthand - which is what happens now.

To do this required some refactoring which mostly simplifies the code.
Specifically:
 - append_declaration_value was refactored so that importance is not
   required as a arg (by moving it to the end of append_serialization)
   and is_overflow_with_name was removed as an arg also (initially I
   refactored it elsewhere, but it turns out it's no longer required at
   all - more below). With these changes, append_declaration_value can
   be used within the algorithm for to_css to obtain just the value for
   substep 5.
 - Substeps 7 and 8 of the algorithm become explicit (they were implicit
   before) by passing the value, shorthand and importance to
   append_serialization.
 - serialize_shorthand_to_buffer is no longer required (as the algorithm
   serializes the value first instead, as per the spec.

A surprising result of this was that I could also remove a lot of code
handling the special case of the overflow properties serialization. This
is because the overflow's LonghandToCss implementation of
to_css_declared already does the right thing according to the spec - it
writes the single value if both overflow-x and -y are equal, and
writes nothing otherwise - so that the algorithm now skips that shorthand
instead rendering the longhands.
2017-02-23 17:26:59 +11:00
..
atoms Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
bluetooth Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
bluetooth_traits Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
canvas Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
canvas_traits Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
compositing Rename ScreenPx to DeviceIndependentPixel. 2017-02-22 14:37:24 +10:00
config Rename ScreenPx to DeviceIndependentPixel. 2017-02-22 14:37:24 +10:00
constellation Auto merge of #15670 - nox:die-plugins-die, r=Manishearth 2017-02-21 05:15:15 -08:00
debugger Removed util. 2016-12-14 18:04:37 -06:00
deny_public_fields Change #[privatize] into #[derive(DenyPublicFields)] 2017-02-15 10:24:01 +01:00
devtools Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
devtools_traits Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
domobject_derive Replace inheritance_integrity by trait shenanigans 2017-02-15 22:11:20 +01:00
geometry Rename ScreenPx to DeviceIndependentPixel. 2017-02-22 14:37:24 +10:00
gfx Auto merge of #15670 - nox:die-plugins-die, r=Manishearth 2017-02-21 05:15:15 -08:00
gfx_traits Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
jstraceable_derive Remove a useless cfg attribute 2017-02-21 11:10:30 +01:00
layout Auto merge of #14962 - jdm:image_script_load, r=Ms2ger,glennw,emilio 2017-02-22 17:50:48 -08:00
layout_thread Avoid dropping image requests on the ground from non-script-initiated reflow. 2017-02-22 14:19:35 -05:00
layout_traits Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
msg Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
net Add useful debug information to image cache. 2017-02-22 14:19:35 -05:00
net_traits Send response for image requests progressively to image cache. 2017-02-22 14:19:35 -05:00
profile Auto merge of #15458 - connorimes:hbs-0.4, r=emilio 2017-02-22 09:05:37 -08:00
profile_traits Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
rand squash: convert less interesting debug! logs to traces 2017-01-18 22:21:41 -07:00
range Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
remutex squash: convert less interesting debug! logs to traces 2017-01-18 22:21:41 -07:00
script Split HTMLImageElement's loading code into smaller pieces with fewer runnables. 2017-02-22 14:19:35 -05:00
script_layout_interface Make script thread initiate requests for images needed by layout. 2017-02-22 14:19:35 -05:00
script_plugins Make script thread initiate requests for images needed by layout. 2017-02-22 14:19:35 -05:00
script_traits Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
selectors Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
servo Make script thread initiate requests for images needed by layout. 2017-02-22 14:19:35 -05:00
style Update PropertyDeclarationBlock::to_css so that the iteration of 2017-02-23 17:26:59 +11:00
style_traits Rename ScreenPx to DeviceIndependentPixel. 2017-02-22 14:37:24 +10:00
url Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
webdriver_server Kill the plugins crate and its clippy support 2017-02-21 11:50:36 +01:00
webvr Remove unused features from webvr traits 2017-02-21 11:00:03 +01:00
webvr_traits Remove unused features from webvr traits 2017-02-21 11:00:03 +01:00