[webkit-reviews] review granted: [Bug 47749] serializeNodesWithNamespaces should be in MarkupAccumulator : [Attachment 70925] cleanup
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 15 17:11:07 PDT 2010
Adam Barth <abarth at webkit.org> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 47749: serializeNodesWithNamespaces should be in MarkupAccumulator
https://bugs.webkit.org/show_bug.cgi?id=47749
Attachment 70925: cleanup
https://bugs.webkit.org/attachment.cgi?id=70925&action=review
------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=70925&action=review
I think there are more webkit data structures we can use here to help, but this
is clearly an improvement.
> WebCore/editing/MarkupAccumulator.cpp:133
> + size_t vectorSize = strings.size();
> + for (size_t i = 0; i < vectorSize; ++i)
No need to make a temporary for strings.size()
> WebCore/editing/MarkupAccumulator.cpp:141
> -String MarkupAccumulator::takeResults()
> +void MarkupAccumulator::concatenateMarkups(Vector<UChar>& out)
concatenateMarkups => concatenateMarkup ?
> WebCore/editing/MarkupAccumulator.h:78
> + out.reserveInitialCapacity(length());
> + concatenateMarkups(out);
> + return String::adopt(out);
Why not String::createUninitialized?
More information about the webkit-reviews
mailing list