[webkit-reviews] review granted: [Bug 94633] CSSStyleDeclaration.cssText should not contain extraneous whitespace in final delimiter : [Attachment 160070] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 23 20:57:34 PDT 2012
Simon Fraser (smfr) <simon.fraser at apple.com> 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 160070: Patch
https://bugs.webkit.org/attachment.cgi?id=160070&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=160070&action=review
> Source/WebCore/css/CSSStyleSheet.cpp:305
> + String text = selector;
> + text += " { ";
> + text += style;
> + if (!style.isEmpty())
> + text += " ";
> + text += "}";
> + insertRule(text, index, ec);
Although the existing code uses it a lot, using String += is very inefficient.
For new code we try to use StringBuilder.
More information about the webkit-reviews
mailing list