Bug 78220

Summary: Avoid unnecessary work when evaluating style sharing candidates.
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: jchaffraix, koivisto, macpherson, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 78274, 80245    
Bug Blocks: 78070    
Attachments:
Description Flags
Proposed patch koivisto: review+

Description Andreas Kling 2012-02-09 03:51:06 PST
CSSStyleSelector::canShareStyleWithElement() has gathered a fair bit of cruft, we can reorder parts of it, and avoid some bits altogether.
Comment 1 Andreas Kling 2012-02-09 04:25:10 PST
Created attachment 126277 [details]
Proposed patch
Comment 2 Andreas Kling 2012-02-09 10:56:52 PST
Committed r107261: <http://trac.webkit.org/changeset/107261>
Comment 3 Julien Chaffraix 2012-02-09 13:05:07 PST
Reopening as I rolled the change out in r107279.

This test started failing after the change:

svg/W3C-SVG-1.1/styling-css-05-b.svg

Visually, it looked like the wrong lang() selector was applied: the test assumes we apply the lang(fr) one but we were applying lang(en) after the change.
Comment 4 Andreas Kling 2012-02-13 02:24:06 PST
Relanded in <http://trac.webkit.org/changeset/107551> without breaking the lang() selector.