An adaption of {@link com.volantis.styling.Styles} which is suitable foroutput processing.
This differs from {@link com.volantis.styling.Styles} in the following ways:
- It contains {@link com.volantis.mcs.themes.MutableStyleProperties} rather than{@link com.volantis.styling.values.PropertyValues}. This can be done because the property values have already been normalized down to the properties by the normalization process. This allows us to define a sensible implementation of equals and hashcode for the entire styles hierarchy which is required during stylesheet generation.
- It models the nested style entities as a list of {@link PseudoStylePath}s through the hiearachy rather than an actual tree. This is more suitable for iteration which is the primary use of the content during output.
Note that the way that the topmost properties (i.e. that associated with the element rather than any contained pseudo class or element) is accessed is slightly unusual. It is stored along with the other properties associated with pseudo classes and elements, keyed by an empty {@link PseudoStylePath}.
Note that the order of the path entries is defined externally, but users of this class rely on the ordering. In particular, they require that the empty path properties are provided as the initial object in an iteration, if present. For this reason, this class currently requires that the empty path is added as the first entry, if at all, as a first step to dealing with ordering overall. Currently {@link com.volantis.mcs.dom2theme.impl.optimizer.StylesOptimizer}provides the ordering correctly. However, it would be nice if we could ensure correct ordering for the entire iteration in here so we could specify exactly what that ordering would be to the clients of this class.
@mock.generate