[Webkit-unassigned] [Bug 251911] [web-animations] line-height should not transition from default value to a number

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 8 02:33:24 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=251911

--- Comment #2 from Antoine Quint <graouts at webkit.org> ---
The problem is that BuilderConverter::convertLineHeight() loses the `<number>` type here:

    if (primitiveValue.isNumber())
        return Length(primitiveValue.doubleValue() * 100.0, LengthType::Percent);

Additionally, the `normal` value is also converted to a percent value here:

    if (valueID == CSSValueNormal)
        return RenderStyle::initialLineHeight();

Where RenderStyle::initialLineHeight() builds this value:

    // Returning -100% percent here means the line-height is not set.
    static Length initialLineHeight() { return Length(-100.0f, LengthType::Percent); }

This means that when we get to deciding whether it's OK to interpolate between `normal` and `0`, which is what the original Stack Overflow example does, we consider two percent values and decide it's OK to interpolate.

We are going to need to:

1. identify the `normal` value with special logic
2. preserve the `number` type somehow

Finally, looking at the spec for `line-height` I see it takes in `<length-percentage>` as a value and yet the animation wrapper does not specify this. So there's likely another bug here where we would fail to yield a transition between "line-height: 10px" and "line-height: 10%" I expect.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230208/5bf96cb5/attachment.htm>


More information about the webkit-unassigned mailing list