Bug 138227 - Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
Summary: Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-30 13:37 PDT by Chris Dumez
Modified: 2014-10-31 14:43 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.17 KB, patch)
2014-10-30 14:24 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (8.20 KB, patch)
2014-10-30 14:38 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-10-30 13:37:36 PDT
CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() currently does a lot of if checks, even though some of them are mutually exclusive. We can reduce the amount of checks by using "else ifs" instead of ifs where appropriate.
Comment 1 Chris Dumez 2014-10-30 14:24:14 PDT
Created attachment 240699 [details]
Patch
Comment 2 Chris Dumez 2014-10-30 14:38:58 PDT
Created attachment 240703 [details]
Patch
Comment 3 WebKit Commit Bot 2014-10-31 14:43:30 PDT
Comment on attachment 240703 [details]
Patch

Clearing flags on attachment: 240703

Committed r175427: <http://trac.webkit.org/changeset/175427>
Comment 4 WebKit Commit Bot 2014-10-31 14:43:34 PDT
All reviewed patches have been landed.  Closing bug.