Bug 83547 - Clean up CSSParser::parseFillRepeat().
: Clean up CSSParser::parseFillRepeat().
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: CSS
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Luke Macpherson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-09 21:52 PDT by Luke Macpherson
Modified: 2012-04-17 15:17 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.90 KB, patch)
2012-04-09 21:54 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff
Patch (2.95 KB, patch)
2012-04-10 16:14 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Macpherson 2012-04-09 21:52:04 PDT
Clean up CSSParser::parseFillRepeat().
Comment 1 Luke Macpherson 2012-04-09 21:54:30 PDT
Created attachment 136395 [details]
Patch
Comment 2 Kentaro Hara 2012-04-10 03:10:51 PDT
Comment on attachment 136395 [details]
Patch

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

> Source/WebCore/css/CSSParser.cpp:3306
> +
> +    // If only one value was specified, value2 is the same as value1.
> +    m_implicitShorthand = true;
> +    value2 = cssValuePool().createIdentifierValue(static_cast<CSSPrimitiveValue*>(value1.get())->getIdent());

Shouldn't this code be inside the else block of 'if (id == CSSValueRepeat || ...) { .... } else { /* here! */ }'?
Comment 3 Luke Macpherson 2012-04-10 16:13:13 PDT
Comment on attachment 136395 [details]
Patch

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

>> Source/WebCore/css/CSSParser.cpp:3306
>> +    value2 = cssValuePool().createIdentifierValue(static_cast<CSSPrimitiveValue*>(value1.get())->getIdent());
> 
> Shouldn't this code be inside the else block of 'if (id == CSSValueRepeat || ...) { .... } else { /* here! */ }'?

You're basically right - I missed the early return statement there.
Comment 4 Luke Macpherson 2012-04-10 16:14:04 PDT
Created attachment 136566 [details]
Patch
Comment 5 Kentaro Hara 2012-04-17 13:51:16 PDT
Comment on attachment 136566 [details]
Patch

Looks OK.
Comment 6 WebKit Review Bot 2012-04-17 15:17:12 PDT
Comment on attachment 136566 [details]
Patch

Clearing flags on attachment: 136566

Committed r114444: <http://trac.webkit.org/changeset/114444>
Comment 7 WebKit Review Bot 2012-04-17 15:17:21 PDT
All reviewed patches have been landed.  Closing bug.