Bug 194487 - Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
Summary: Replace more uses of String::format with StringConcatenate (mostly non-Apple ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks: 30342
  Show dependency treegraph
 
Reported: 2019-02-10 16:53 PST by Darin Adler
Modified: 2019-02-15 08:20 PST (History)
3 users (show)

See Also:


Attachments
Patch (40.08 KB, patch)
2019-02-10 17:03 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (40.73 KB, patch)
2019-02-10 19:24 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (41.22 KB, patch)
2019-02-10 21:45 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (41.51 KB, patch)
2019-02-12 19:16 PST, Darin Adler
dbates: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-highsierra (2.07 MB, application/zip)
2019-02-13 00:40 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2019-02-10 16:53:40 PST
Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
Comment 1 Darin Adler 2019-02-10 17:03:44 PST Comment hidden (obsolete)
Comment 2 Darin Adler 2019-02-10 19:24:36 PST Comment hidden (obsolete)
Comment 3 Darin Adler 2019-02-10 21:45:24 PST Comment hidden (obsolete)
Comment 4 Darin Adler 2019-02-12 19:16:16 PST
Created attachment 361889 [details]
Patch
Comment 5 EWS Watchlist 2019-02-13 00:40:31 PST
Comment on attachment 361889 [details]
Patch

Attachment 361889 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/11132151

New failing tests:
http/tests/inspector/network/resource-initiatorNode.html
Comment 6 EWS Watchlist 2019-02-13 00:40:33 PST
Created attachment 361902 [details]
Archive of layout-test-results from ews114 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 7 Darin Adler 2019-02-13 08:58:41 PST
These crashes in PixelBufferConformerCV::convert are ones that I saw on another patch of mine as well, and have nothing to do with this patch.
Comment 8 Daniel Bates 2019-02-13 09:42:53 PST
Comment on attachment 361889 [details]
Patch

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

> Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp:54
> -    String filename = String::format("..\\..\\..\\Tools\\TestWebKitAPI\\Tests\\WebKit\\%s.%s", resource, extension);
> +    String filename = makeString("..\\..\\..\\Tools\\TestWebKitAPI\\Tests\\WebKit\\", resource, '.', extension);

My eyes! Raw strings will save us. No change necessary.

> Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:618
> +        if (parentName && parentName[0]) {

Nice!

> Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:631
> +    builder.appendNumber(element->x(), 6, KeepTrailingZeros);

No chance necessary. Not so nice in my eyes :/
Comment 9 Darin Adler 2019-02-13 13:07:58 PST
Comment on attachment 361889 [details]
Patch

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

>> Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:631
>> +    builder.appendNumber(element->x(), 6, KeepTrailingZeros);
> 
> No chance necessary. Not so nice in my eyes :/

The long term is that we want more people to use the default formatting for doubles rather than choosing the strange "6 digit precision with trailing zeros" format. We’ll come through later to simplify that.
Comment 10 Darin Adler 2019-02-15 08:19:23 PST
Committed r241587: <https://trac.webkit.org/changeset/241587>
Comment 11 Radar WebKit Bug Importer 2019-02-15 08:20:38 PST
<rdar://problem/48111181>