servo/components/style
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
..
binding_tools Avoid write atoms files when not necessary 2016-12-28 17:49:34 +11:00
gecko Simplify defining arc ffi types 2017-02-23 10:22:39 +11:00
gecko_bindings Auto merge of #15675 - Manishearth:resync, r=mbrubeck 2017-02-21 10:05:01 -08:00
gecko_string_cache Update atoms for gecko binding 2017-02-18 13:26:42 +11:00
properties Update PropertyDeclarationBlock::to_css so that the iteration of 2017-02-23 17:26:59 +11:00
rule_tree Switch from error! and println! to warn!, and set the default log level to warn on debug builds. 2017-02-14 17:19:01 -08:00
servo Implement "handled for descendants" tracking for RestyleDamage. 2017-02-17 10:15:53 -08:00
values Auto merge of #15662 - canaltinova:column, r=Manishearth 2017-02-20 10:28:03 -08:00
animation.rs Convert animation-iteration-count longhand into vector_longhand 2017-01-08 17:19:09 +03:00
attr.rs style: Unbox a bunch of color properties. 2017-02-14 20:18:31 +01:00
bezier.rs More docs in style. 2017-01-02 10:40:20 +01:00
bloom.rs Bug 1336646 - Use the bloom filter for manual style resolves and pass a mutable StyleContext into match_element. r=emilio 2017-02-08 17:09:35 -08:00
build.rs Bindgenup. 2017-01-25 10:42:44 +01:00
build_gecko.rs Auto merge of #15669 - upsuper:bindgen-arc-type, r=heycam 2017-02-21 18:56:41 -08:00
cache.rs style: Document and remove dead code from cache.rs 2016-12-31 04:53:37 +01:00
Cargo.toml Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
cascade_info.rs style: Document cascade_info. 2016-12-31 23:24:19 +01:00
context.rs Dump traversal time with other style statistics. 2017-02-14 17:17:45 -08:00
custom_properties.rs Box DeclaredValue::WithVariables 2017-02-09 11:10:10 +01:00
data.rs Implement "handled for descendants" tracking for RestyleDamage. 2017-02-17 10:15:53 -08:00
dom.rs Clean up and simplify the accumulation of restyle damage. 2017-02-10 10:34:28 -08:00
element_state.rs Change order of element state bits 2017-01-06 10:04:49 +11:00
error_reporting.rs style: Document the error_reporting module. 2016-12-31 23:24:19 +01:00
font_face.rs Update cssparser to 0.9 2017-02-15 12:42:14 +01:00
font_metrics.rs style: Document the font_metrics module. 2016-12-31 23:24:19 +01:00
keyframes.rs Get all animated properties in *all* keyframes. 2017-02-22 19:04:49 +09:00
lib.rs changed quickersort with pdqsort 2017-01-27 18:42:22 +00:00
logical_geometry.rs Convert text-orientation to a Gecko-only property 2017-01-27 21:12:38 -08:00
matching.rs Implement "handled for descendants" tracking for RestyleDamage. 2017-02-17 10:15:53 -08:00
media_queries.rs Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam 2017-01-17 14:05:23 +01:00
owning_handle.rs style: Document the owning_handle module. 2017-01-02 12:57:53 +01:00
parallel.rs Dump traversal time with other style statistics. 2017-02-14 17:17:45 -08:00
parser.rs stylo: Support stroke-dasharray and stroke-dashoffset 2017-02-18 02:43:36 -08:00
README.md docs: Add style overview. 2016-05-04 00:34:03 +02:00
restyle_hints.rs Switch from error! and println! to warn!, and set the default log level to warn on debug builds. 2017-02-14 17:19:01 -08:00
scoped_tls.rs Bug 1331856 - Add style performance statistics to Servo. r=emilio 2017-01-19 15:05:19 -08:00
selector_parser.rs style: Document the restyle hints code, and make it operate on TElement. 2017-01-02 12:57:52 +01:00
sequential.rs Dump traversal time with other style statistics. 2017-02-14 17:17:45 -08:00
sink.rs style: document the sink module. 2017-01-02 12:57:49 +01:00
str.rs Auto merge of #14796 - jlevesy:jl-match-to-if-let, r=Wafflespeanut 2016-12-31 21:28:41 -08:00
stylesheets.rs Update cssparser to 0.9 2017-02-15 12:42:14 +01:00
stylist.rs Allow the ComputedValues in ComputedStyle to be null. 2017-02-10 10:34:27 -08:00
supports.rs Fix too many parens in @supports serialization. 2017-01-09 19:35:00 +01:00
thread_state.rs Tidy up rust code with regard to new rule (no = in beginning of line) 2017-01-06 20:57:16 +01:00
timer.rs style: Document the timer module. 2016-12-31 12:17:04 +01:00
traversal.rs Implement "handled for descendants" tracking for RestyleDamage. 2017-02-17 10:15:53 -08:00
viewport.rs Change LengthOrPercentageOrAuto to make use of NoCalcLength 2017-01-29 02:30:34 +05:30

servo-style

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