Changeset 271367 in webkit
- Timestamp:
- Jan 11, 2021, 10:12:19 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/positional-selector-style-sharing-expected.html (added)
-
LayoutTests/fast/css/positional-selector-style-sharing.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/StyleRelations.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271362 r271367 1 2021-01-11 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r258321): CSS rules using :first-of-type are applied to any/all siblings in a group under certain circumstances 4 https://bugs.webkit.org/show_bug.cgi?id=218256 5 <rdar://problem/70749584> 6 7 Reviewed by Simon Fraser. 8 9 * fast/css/positional-selector-style-sharing-expected.html: Added. 10 * fast/css/positional-selector-style-sharing.html: Added. 11 1 12 2021-01-11 Sam Weinig <weinig@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r271364 r271367 1 2021-01-11 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r258321): CSS rules using :first-of-type are applied to any/all siblings in a group under certain circumstances 4 https://bugs.webkit.org/show_bug.cgi?id=218256 5 <rdar://problem/70749584> 6 7 Reviewed by Simon Fraser. 8 9 More accurate invalidation for :hover resulted in smaller style updates that revealed a bug in the way we 10 mark style non-shareable. We reset style relation bits when resolving the parent but may fail to set them again if we 11 don't re-resolve all children. 12 13 Test case by Eben Packwood. 14 15 Test: fast/css/positional-selector-style-sharing.html 16 17 * style/StyleRelations.cpp: 18 (WebCore::Style::commitRelationsToRenderStyle): 19 20 Just mark all styles affected by relations non-shareable. This is achieved via various bit tests but there 21 is no reason not to set the simplest no-sharing bit. Since this forces real style resolution the parent 22 bits will also get properly reset. 23 1 24 2021-01-11 Antti Koivisto <antti@apple.com> 2 25 -
trunk/Source/WebCore/style/StyleRelations.cpp
r258416 r271367 37 37 std::unique_ptr<Relations> commitRelationsToRenderStyle(RenderStyle& style, const Element& element, const Relations& relations) 38 38 { 39 if (!relations.isEmpty()) 40 style.setUnique(); 41 39 42 std::unique_ptr<Relations> remainingRelations; 40 43 … … 62 65 break; 63 66 case Relation::Unique: 64 style.setUnique();65 67 break; 66 68 case Relation::AffectedByPreviousSibling:
Note:
See TracChangeset
for help on using the changeset viewer.