[webkit-reviews] review granted: [Bug 198471] Finish cleanup of String::number for floating point : [Attachment 371173] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 3 04:03:58 PDT 2019


Yusuke Suzuki <ysuzuki at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 198471: Finish cleanup of String::number for floating point
https://bugs.webkit.org/show_bug.cgi?id=198471

Attachment 371173: Patch

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




--- Comment #6 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 371173
  --> https://bugs.webkit.org/attachment.cgi?id=371173
Patch

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

r=me

> Source/WebCore/rendering/RenderListMarker.cpp:139
> +    // The asterisks list-style-type is the worst case; we show |number|
asterisks.
> +    CharacterType symbol = symbols[(number - 1) % symbolsSize];
> +    unsigned count = (number - 1) / symbolsSize + 1;
> +
> +    CharacterType* characters;
> +    String result = String::createUninitialized(count, characters);
> +    for (unsigned i = 0; i < count; ++i)
> +	   characters[i] = symbol;
> +    return result;

Nice! The code becomes much cleaner.


More information about the webkit-reviews mailing list