CSSStyleSelector::canShareStyleWithElement() has gathered a fair bit of cruft, we can reorder parts of it, and avoid some bits altogether.
Created attachment 126277 [details]
Committed r107261: <http://trac.webkit.org/changeset/107261>
Reopening as I rolled the change out in r107279.
This test started failing after the change:
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.
Relanded in <http://trac.webkit.org/changeset/107551> without breaking the lang() selector.