[webkit-reviews] review granted: [Bug 238102] [cssom] border-image not serialized at specified-value time : [Attachment 455150] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 19 17:58:06 PDT 2022


Darin Adler <darin at apple.com> has granted Oriol Brufau <obrufau at igalia.com>'s
request for review:
Bug 238102: [cssom] border-image not serialized at specified-value time
https://bugs.webkit.org/show_bug.cgi?id=238102

Attachment 455150: Patch

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




--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 455150
  --> https://bugs.webkit.org/attachment.cgi?id=455150
Patch

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

> Source/WebCore/css/StyleProperties.cpp:952
> +	       result.append(" / ");

It’s more efficient to append multiple strings in a single append call, less
string buffer growing computation. So the separator could go into a local
variable, and then:

    result.append(separator, valueText);

Just make sure to set separator to “” when one is not needed. In fact if we use
a variable outside the loop, we can also avoid the result.isEmpty check.

    auto separator = “”;
    for … {
	…
	result.append(separator, valueText);
	separator = “ “;
    }


More information about the webkit-reviews mailing list