[webkit-reviews] review denied: [Bug 216997] Add non-animated support for the CSS translate property : [Attachment 410132] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 30 10:21:46 PDT 2020


Simon Fraser (smfr) <simon.fraser at apple.com> has denied Antoine Quint
<graouts at apple.com>'s request for review:
Bug 216997: Add non-animated support for the CSS translate property
https://bugs.webkit.org/show_bug.cgi?id=216997

Attachment 410132: Patch

https://bugs.webkit.org/attachment.cgi?id=410132&action=review




--- Comment #9 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 410132
  --> https://bugs.webkit.org/attachment.cgi?id=410132
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410132&action=review

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:621
> +    TransformationMatrix transform;
> +    style.translate()->apply(transform, pixelSnappedRect.size());

Why do you have to go via TransformationMatrix? Translate isn't affected by
transform origin, so can't you just serialize the x, y and z values?

> Source/WebCore/css/TransformFunctions.cpp:364
> +    for (unsigned i = 0; i < valueList.length(); ++i) {

Seems weird to use a loop here. Just access the elements by index.

> Source/WebCore/css/parser/CSSPropertyParser.cpp:2047
> +    if (!y)
> +	   return list;

What about "10px junk"? Should that be a valid 1-value transform, or an invalid
value?

> Source/WebCore/css/parser/CSSPropertyParser.cpp:2049
> +    // If we have a calc() or non-zero y value, we can directly add it to
the list. We only

Is the calc() case tested?

> Source/WebCore/css/parser/CSSPropertyParser.cpp:2063
> +	   if (!zPrimitiveValue.isCalculated() && *zPrimitiveValue.isZero())

Is the calc() case tested?

> Source/WebCore/rendering/RenderObject.h:437
> +    bool hasTransform() const { return hasTransformRelatedProperty() &&
(style().hasTransform() || style().translate()); }

Change hasTransformRelatedProperty(), rather than checking style().translate().


More information about the webkit-reviews mailing list