Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9010531b7cdcfd824b5429729e1047a41e05d93f
https://github.com/WebKit/WebKit/commit/9010531b7cdcfd824b5429729e1047a41e05d93f
Author: Yusuke Suzuki <[email protected]>
Date: 2024-04-30 (Tue, 30 Apr 2024)
Changed paths:
M Source/WebCore/style/StyleScopeRuleSets.cpp
Log Message:
-----------
[WebCore] Do not add the same StyleSheetContents repeatedly
https://bugs.webkit.org/show_bug.cgi?id=273455
rdar://127263420
Reviewed by Antti Koivisto.
This is derived from [1]. In some cases, we are repeatedly having <style> with
exact same content.
But fortunately, we are already deduping them via StyleSheetContents. This
patch avoids adding the
same content <style> repeatedly in RuleSetBuilder.
Because this is very pathological pattern and putting a bit more cost on
StyleScopeRuleSets etc.
caused rather regression, this patch just checks the one previous <style> and
only handles the cases
where mediaQueries is empty. This one-previous-style-sheet pattern is also
taken in [1].
[1]: https://chromium-review.googlesource.com/c/chromium/src/+/5385787
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):
Canonical link: https://commits.webkit.org/278184@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes