[webkit-reviews] review granted: [Bug 94633] CSSStyleDeclaration.cssText should not contain extraneous whitespace in final delimiter : [Attachment 160368] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 24 16:44:06 PDT 2012
Benjamin Poulain <benjamin at webkit.org> has granted Glenn Adams
<glenn at skynav.com>'s request for review:
Bug 94633: CSSStyleDeclaration.cssText should not contain extraneous whitespace
in final delimiter
https://bugs.webkit.org/show_bug.cgi?id=94633
Attachment 160368: Patch
https://bugs.webkit.org/attachment.cgi?id=160368&action=review
------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=160368&action=review
Simon had already reviewed this. The strings fix looks good to me, so let's r+
again.
Thank you for updating the patch for my comments after Simon's review.
> Source/WebCore/css/CSSProperty.cpp:65
> - return cssName() + ": " + m_value->cssText() + (isImportant() ? "
!important" : "") + "; ";
> + StringBuilder result;
> + result.append(cssName());
> + result.appendLiteral(": ");
> + result.append(m_value->cssText());
> + if (isImportant())
> + result.appendLiteral(" !important");
> + result.append(';');
> + return result.toString();
Using "operator+" was actually ok here. The StringOperators do a pretty good
job.
Just a note though, no problem with using StringBuilder here.
More information about the webkit-reviews
mailing list