Bug 57840

Summary: Switch from Vector<UChar> to StringBuilder in css/
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: WebCore Misc.Assignee: Nikolas Zimmermann <zimmermann>
Status: NEW ---    
Severity: Normal CC: kling, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 58420    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch v2 none

Description Nikolas Zimmermann 2011-04-05 06:28:31 PDT
As discussed in bug 56099, we should deploy StringBuilder usage in WebCore where possible.
This bug addresses Source/WebCore/css.
Comment 1 Nikolas Zimmermann 2011-04-05 06:30:56 PDT
Created attachment 88218 [details]
Patch
Comment 2 WebKit Review Bot 2011-04-05 06:33:00 PDT
Attachment 88218 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style']" exit_code: 1

Source/WebCore/css/CSSOMUtils.h:42:  The parameter name "string" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Nikolas Zimmermann 2011-04-05 07:03:26 PDT
Created attachment 88222 [details]
Patch v2

Fix style isssue.
Comment 4 Nikolas Zimmermann 2011-04-08 23:31:28 PDT
Comment on attachment 88222 [details]
Patch v2

Removing r?. As discussed with Maciej, he prefers to optimize operator+ instead of having to change all callsites that append just 2 strings. I'll look into that.
Comment 5 Nikolas Zimmermann 2011-05-12 07:58:48 PDT
I'll rework the patch to avoid using makeString, it's not needed anymore, as operator+ is fast now.