https://vuldb.com/?cvssv3.2012 takes long time to load.
https://bugs.webkit.org/show_bug.cgi?id=162994
<rdar://problem/28593746>
Reviewed by Darin Adler.
Source/WebCore:
Stop visiting cousins when we hit the style sharing search threshold.
In addition to mistakenly ignoring the threshold at SharingResolver::findSibling(), we
continued on searching for cousin elements.
Test: fast/selectors/slow-style-sharing-with-long-cousin-list.html
* style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::resolve):
(WebCore::Style::SharingResolver::findSibling):
(WebCore::Style::SharingResolver::locateCousinList):
LayoutTests:
It takes ~100 seconds to run this test case without the fix (300ms with the fix).
Surely it will timeout if it gets regressed.
* fast/selectors/slow-style-sharing-with-long-cousin-list-expected.txt: Added.
* fast/selectors/slow-style-sharing-with-long-cousin-list.html: Added.
* platform/mac/TestExpectations: Skip perf test in debug.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed