[webkit-reviews] review granted: [Bug 194893] Finish removing String::format : [Attachment 362610] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 21 23:19:43 PST 2019
Daniel Bates <dbates at webkit.org> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 194893: Finish removing String::format
https://bugs.webkit.org/show_bug.cgi?id=194893
Attachment 362610: Patch
https://bugs.webkit.org/attachment.cgi?id=362610&action=review
--- Comment #7 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 362610
--> https://bugs.webkit.org/attachment.cgi?id=362610
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=362610&action=review
> Source/WebCore/ChangeLog:16
> + (WebCore::cpuUsageString): Use makeString, FormatttedNumber, and
pad.
FormatttedNumber => FormattedNumber (remove one of the t's)
> Source/WTF/wtf/Assertions.cpp:109
> + return String();
Ok as-is. return { }?
> Source/WTF/wtf/Assertions.cpp:113
> + unsigned len = result;
OK as-is. length?
> Source/WebCore/rendering/RenderLayerCompositor.cpp:1327
> + logString.append(makeString(pad(' ', 12 + depth * 2,
hex(reinterpret_cast<uintptr_t>(&layer))), " id ",
backing->graphicsLayer()->primaryLayerID(), " (",
FormattedNumber::fixedWidth(absoluteBounds.x().toFloat(), 3), ',',
FormattedNumber::fixedWidth(absoluteBounds.y().toFloat(), 3), '-',
FormattedNumber::fixedWidth(absoluteBounds.maxX().toFloat(), 3), ',',
FormattedNumber::fixedWidth(absoluteBounds.maxY().toFloat(), 3), ") ",
FormattedNumber::fixedWidth(backing->backingStoreMemoryEstimate() / 1024, 2),
"KB"));
I'm starting to remember why I like String::format() more :| Hoping this will
grow on me.
> Source/WebCore/rendering/RenderTheme.cpp:579
> + return makeString((time < 0 ? "-" : ""), hours, ':', pad('0', 2,
minutes), ':', pad('0', 2, seconds));
> + return makeString((time < 0 ? "-" : ""), pad('0', 2, minutes), ':',
pad('0', 2, seconds));
:|
More information about the webkit-reviews
mailing list