Bug 47714

Summary: Replace some String::format() usages by StringConcatenate in WebKit
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: WebKit Misc.Assignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 30342, 18994    
Attachments:
Description Flags
Patch
none
Patch v2
none
Patch v3
none
Patch v4
none
Patch v5 krit: review+

Description Nikolas Zimmermann 2010-10-15 01:44:27 PDT
As done in patch 47664 for WebCore, do the same in WebKit.
Comment 1 Nikolas Zimmermann 2010-10-15 01:48:07 PDT
Created attachment 70839 [details]
Patch
Comment 2 WebKit Review Bot 2010-10-15 01:51:16 PDT
Attachment 70839 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKit/chromium/src/BackForwardListClientImpl.cpp:106:  url_string is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Nikolas Zimmermann 2010-10-15 01:54:26 PDT
(In reply to comment #2)
> Attachment 70839 [details] did not pass style-queue:
> 
> Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
> WebKit/chromium/src/BackForwardListClientImpl.cpp:106:  url_string is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
> Total errors found: 1 in 14 files

I'm not planing to rename existing variables in chromium code, I think it's safe to ignore this error.
Comment 4 Nikolas Zimmermann 2010-10-15 02:12:01 PDT
Created attachment 70842 [details]
Patch v2

Fix a typo s/char/UChar/ in the new StringTypeAdapter. Also changed my mind, renamed url_string to urlString, to have a green style bot result.
Comment 5 WebKit Review Bot 2010-10-15 02:28:16 PDT
Attachment 70839 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/4462042
Comment 6 Nikolas Zimmermann 2010-10-15 02:44:16 PDT
Created attachment 70845 [details]
Patch v3

Add explicit cast from WebString -> String, attempting to fix the chromium build.
Comment 7 WebKit Review Bot 2010-10-15 04:16:48 PDT
Attachment 70845 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/4455056
Comment 8 Nikolas Zimmermann 2010-10-15 04:34:16 PDT
Created attachment 70850 [details]
Patch v4

Arrgl, missed another WebString -> String conversion in WebPageSerializer. Fix and optimize it even further.
Comment 9 Nikolas Zimmermann 2010-10-15 05:12:05 PDT
Created attachment 70854 [details]
Patch v5

*sigh* Forgot to include JavaScriptCore changes. Added StringTypeAdapter<UChar> to avoid having to convert UChars, we can directly append them.
Comment 10 Dirk Schulze 2010-10-15 05:21:21 PDT
Comment on attachment 70854 [details]
Patch v5

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

LGTM. r=me

> WebKit/chromium/src/BackForwardListClientImpl.cpp:107
> +    m_pendingHistoryItem = HistoryItem::create(urlString, String(), 0.0);

Please use 0
Comment 11 Nikolas Zimmermann 2010-10-15 05:30:53 PDT
Committed r69850: <http://trac.webkit.org/changeset/69850>