Changeset 286063 in webkit
- Timestamp:
- Nov 19, 2021, 8:53:01 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/selectors/hover-descendant-shadow-tree-expected.html (added)
-
LayoutTests/fast/selectors/hover-descendant-shadow-tree.html (added)
-
LayoutTests/platform/ios/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286052 r286063 1 2021-11-19 Antti Koivisto <antti@apple.com> 2 3 :hover with descendant selector not invalidated correctly in shadow tree 4 https://bugs.webkit.org/show_bug.cgi?id=233354 5 6 Reviewed by Antoine Quint. 7 8 * fast/selectors/hover-descendant-shadow-tree-expected.html: Added. 9 * fast/selectors/hover-descendant-shadow-tree.html: Added. 10 * platform/ios/TestExpectations: 11 1 12 2021-11-19 Arcady Goldmints-Orlov <agoldmints@igalia.com> 2 13 -
trunk/LayoutTests/platform/ios/TestExpectations
r285945 r286063 711 711 fast/selectors/active-quirks.html [ Skip ] 712 712 fast/selectors/active-strict.html [ Skip ] 713 fast/selectors/hover-descendant-shadow-tree.html [ Skip ] 713 714 fast/selectors/hover-invalidation-descendant-clear.html [ Skip ] 714 715 fast/selectors/hover-invalidation-descendant-dynamic.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r286061 r286063 1 2021-11-19 Antti Koivisto <antti@apple.com> 2 3 :hover with descendant selector not invalidated correctly in shadow tree 4 https://bugs.webkit.org/show_bug.cgi?id=233354 5 6 Reviewed by Antoine Quint. 7 8 We optimize :hover and :active by only invalidating for descendant selectors with a single tree walk. 9 This doesn't work correctly for shadow trees as their scoped style may differ and the invalidation 10 is limited to a single scope anyway. 11 12 Fix by doing descendant invalidation for each affected scope. 13 14 Test: fast/selectors/hover-descendant-shadow-tree.html 15 16 * dom/Document.cpp: 17 (WebCore::Document::updateHoverActiveState): 18 19 We need to perform scoped descendant invalidation for elements that are parented to ShadowRoot. 20 1 21 2021-11-19 Matt Woodrow <matt.woodrow@gmail.com> 2 22 -
trunk/Source/WebCore/dom/Document.cpp
r286061 r286063 7481 7481 if (elements.isEmpty()) 7482 7482 return; 7483 7483 7484 Style::PseudoClassChangeInvalidation styleInvalidation { *elements.last(), pseudoClassType, Style::InvalidationScope::Descendants }; 7485 7486 // We need to do descendant invalidation for each shadow tree separately as the style is per-scope. 7487 Vector<Style::PseudoClassChangeInvalidation> shadowDescendantStyleInvalidations; 7488 for (auto& element : elements) { 7489 if (hasShadowRootParent(*element)) 7490 shadowDescendantStyleInvalidations.append({ *element, pseudoClassType, Style::InvalidationScope::Descendants }); 7491 } 7492 7484 7493 for (auto& element : elements) 7485 7494 setter(*element);
Note:
See TracChangeset
for help on using the changeset viewer.