Bug 65760

Summary: CSSSelector::selectorText should use StringBuilder instead of +=
Product: WebKit Reporter: Oliver Varga <voliver>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, darin, morrita, rhodovan.u-szeged, shinyak, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch morrita: review-

Comment 1 Shinya Kawanaka 2011-08-29 23:09:36 PDT
Created attachment 105583 [details]
Patch
Comment 2 Hajime Morrita 2011-10-02 22:25:04 PDT
Comment on attachment 105583 [details]
Patch

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

> Source/WebCore/css/CSSSelector.cpp:629
>      if (CSSSelector* tagHistory = cs->tagHistory()) {

How about just to return and eliminate temporal "str" ?
Also, you can do early return by checking tagHistory != NULL.
Comment 3 Hajime Morrita 2011-10-02 22:27:13 PDT
Anyway, is it possible to eliminate whole "+" by moving the last block to the head of the function?
Comment 4 Renata Hodovan 2012-11-18 02:09:05 PST
It's already fixed in r126967;