Bug 57995 - Unnecessary string allocation in CSSStyleDeclaration::setProperty
Summary: Unnecessary string allocation in CSSStyleDeclaration::setProperty
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 15:53 PDT by Ian Henderson
Modified: 2011-04-06 16:19 PDT (History)
1 user (show)

See Also:


Attachments
proposed patch (1.64 KB, patch)
2011-04-06 16:02 PDT, Ian Henderson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.