Changeset 287362 in webkit
- Timestamp:
- Dec 22, 2021 10:33:49 AM (7 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/selectors/has-style-sharing-expected.html (added)
-
LayoutTests/fast/selectors/has-style-sharing.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/StyleSharingResolver.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287358 r287362 1 2021-12-22 Antti Koivisto <antti@apple.com> 2 3 [:has() pseudo-class] :has() selector does not render on first pass? 4 https://bugs.webkit.org/show_bug.cgi?id=234531 5 6 Reviewed by Simon Fraser. 7 8 Test case by Alex Riviere. 9 10 * fast/selectors/has-style-sharing-expected.html: Added. 11 * fast/selectors/has-style-sharing.html: Added. 12 1 13 2021-12-22 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r287361 r287362 1 2021-12-22 Antti Koivisto <antti@apple.com> 2 3 [:has() pseudo-class] :has() selector does not render on first pass? 4 https://bugs.webkit.org/show_bug.cgi?id=234531 5 6 Reviewed by Simon Fraser. 7 8 With :has() identical sibling elements can have different style which breaks the current 9 assumptions of the style sharing optimization. 10 11 Test: fast/selectors/has-style-sharing.html 12 13 * style/StyleSharingResolver.cpp: 14 (WebCore::Style::SharingResolver::resolve): 15 16 Disable style sharing in presence of :has() rules for now. 17 18 For a less heavy-handed approach we need to start testing for :has() rules similar to what is already done 19 for sibling and attribute rules. 20 1 21 2021-12-22 Michael Saboff <msaboff@apple.com> 2 22 -
trunk/Source/WebCore/style/StyleSharingResolver.cpp
r285630 r287362 108 108 return nullptr; 109 109 } 110 // FIXME: Do something smarter here, for example RuleSet based matching like with attribute/sibling selectors. 111 if (Scope::forNode(element).usesHasPseudoClass()) 112 return nullptr; 110 113 111 114 Context context {
Note: See TracChangeset
for help on using the changeset viewer.