Clean up ContentData operator overloads
Created attachment 169109 [details] Patch
Comment on attachment 169109 [details] Patch Seems OK... I worry if this will slow down canShareStyleWithElement (which can be really hot when adding siblings).
I think that if style sharing is already disabled for elements with content: then this should have no perf impact.
(In reply to comment #2) > (From update of attachment 169109 [details]) > Seems OK... I worry if this will slow down canShareStyleWithElement (which can be really hot when adding siblings). It shouldn't, type() is virtual and the old operator== called it 3 times and then did a switch. With this patch we only make 2 virtual calls and doesn't do a jump for the switch. If anything I feel like this should be (marginally) faster.
It looks like styles with content actually can be shared in many cases: http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp#L2925 Note that only one case sets unique. That said, I'm still not sure when this comparison is used, so this may still be fine?
Comment on attachment 169109 [details] Patch OK. I'll buy that. Thanks.
(In reply to comment #5) > It looks like styles with content actually can be shared in many cases: > http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp#L2925 > > Note that only one case sets unique. > > That said, I'm still not sure when this comparison is used, so this may still be fine? It gets used in Node::diff through StyleRareNonInheritedData::contentDataEquivalent. Your comment made me think to look at where this is used and then I realized our usage is broken: https://bugs.webkit.org/show_bug.cgi?id=99560 :(
Comment on attachment 169109 [details] Patch Clearing flags on attachment: 169109 Committed r131565: <http://trac.webkit.org/changeset/131565>
All reviewed patches have been landed. Closing bug.