Bug 57995

Summary: Unnecessary string allocation in CSSStyleDeclaration::setProperty
Product: WebKit Reporter: Ian Henderson <ian>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Attachments:
Description Flags
proposed patch none

Description Ian Henderson 2011-04-06 15:53:55 PDT
In CSSStyleDeclaration::setProperty(const String&, const String&, ExceptionCode&), we construct a string, either "" or "important", depending on the priority of the property.  We then pass this value to CSSStyleDeclaration::setProperty(const String&, const String&, const String&, ExceptionCode&), which parses the value out of the string again.  We should just pass the bool directly, without going through an intermediate string.
Comment 1 Ian Henderson 2011-04-06 16:02:22 PDT
Created attachment 88537 [details]
proposed patch
Comment 2 Simon Fraser (smfr) 2011-04-06 16:19:28 PDT
Comment on attachment 88537 [details]
proposed patch

Clearing flags on attachment: 88537

Committed r83118: <http://trac.webkit.org/changeset/83118>
Comment 3 Simon Fraser (smfr) 2011-04-06 16:19:34 PDT
All reviewed patches have been landed.  Closing bug.