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

Ian Henderson
Reported 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.
Attachments
proposed patch (1.64 KB, patch)
2011-04-06 16:02 PDT, Ian Henderson
no flags
Ian Henderson
Comment 1 2011-04-06 16:02:22 PDT
Created attachment 88537 [details] proposed patch
Simon Fraser (smfr)
Comment 2 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>
Simon Fraser (smfr)
Comment 3 2011-04-06 16:19:34 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.