-
Federico Mena Quintero authored
The spec mandates that values for stop offsets are only plain numbers or percentages. We used to handle this more or less implicitly by calling _rsvg_css_hand_normalize_length(), using the resulting value, and dropping the units. Now we actually ensure that we get plain numbers or percentages, and eliminate this one use of _rsvg_css_hand_normalize_length(). Now, RsvgGradientStop has an is_valid field that says whether the stop has valid units. At rendering time, we can decide what to do about gradients with invalid stops: currently we don't add invalid stops to the gradient, but we still render it up to the last valid stop - hopefully to make it easier to debug SVG files. Also, we now ensure that stop offsets are actually in nondecreasing order, per the spec. (I really want to get rid of _rsvg_css_hand_normalize_length(), but found these things along the way...)
4006aff6