Currently StyleInvalidator traverses all descendants if there is something to potentially invalidate, even if we know only element itself or direct children can be affected.
Created attachment 331218 [details] wip
Created attachment 331283 [details] patch
<rdar://problem/37028606>
Comment on attachment 331283 [details] patch Clearing flags on attachment: 331283 Committed r227787: <https://trac.webkit.org/changeset/227787>
All reviewed patches have been landed. Closing bug.