Reduce the number of treeScope queries when matching rules.
Created attachment 163202 [details] Patch
Comment on attachment 163202 [details] Patch I assume this is a perf change. :) Do we have any benchmarks which notice this? It looks fine though.
I am still trying to get the benchmark set up running on my machine, but I'll be watching the perf results when this lands. Do you think it's worth promoting treeScope to a member of StyleResolver that's initialized once for styleForElement?
The treeScope is part of the per-element state, which eventually needs to be ripped out of StyleResolver into a separate object. :) But yes, it could be a member on that state, or on StyleResolver directly until then if you have benchmarks to show that it's important.
(In reply to comment #4) > The treeScope is part of the per-element state, which eventually needs to be ripped out of StyleResolver into a separate object. :) Did you not have a bug on this somewhere?
https://bugs.webkit.org/show_bug.cgi?id=89879 is a meta bug I created. I didn't create on specifically about splitting out the per-element state.
Comment on attachment 163202 [details] Patch Clearing flags on attachment: 163202 Committed r128128: <http://trac.webkit.org/changeset/128128>
All reviewed patches have been landed. Closing bug.