[webkit-reviews] review denied: [Bug 70707] CSS Aspect Ratio Property Parsing Stage : [Attachment 112148] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 24 10:04:30 PDT 2011


Ojan Vafai <ojan at chromium.org> has denied Fady Samuel <fsamuel at chromium.org>'s
request for review:
Bug 70707: CSS Aspect Ratio Property Parsing Stage
https://bugs.webkit.org/show_bug.cgi?id=70707

Attachment 112148: Patch
https://bugs.webkit.org/attachment.cgi?id=112148&action=review

------- Additional Comments from Ojan Vafai <ojan at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=112148&action=review


Please add tests. You should be able to write tests the verify parsing happens
correctly and that non-positive numbers are considered invalid. See the
-webkit-calc tests for examples.

> Source/WebCore/css/CSSParser.cpp:1513
> +	     return parseAspectRatio(important);

indent is off

> Source/WebCore/css/CSSParser.cpp:5651
> +    if (!validUnit(lvalue, FLength, m_strict) || !validUnit(rvalue, FLength,
m_strict))

Does this exclude negative values? If not, we should make sure to return false
for negative values as per the spec.

> Source/WebCore/css/CSSParser.cpp:5654
> +    if (!rvalue->fValue)

Do you not need to check lvalue->fValue here? Is this to deal with divide by 0?
It also seems non-sensical to have a 0 lvalue and the spec says both numbers
should be non-zero.


More information about the webkit-reviews mailing list