Changeset 269774 in webkit
- Timestamp:
- Nov 13, 2020 6:32:15 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r269745 r269774 1 2020-11-13 Antoine Quint <graouts@webkit.org> 2 3 Support more properties on ::marker 4 https://bugs.webkit.org/show_bug.cgi?id=218894 5 <rdar://problem/71368343> 6 7 Reviewed by Antti Koivisto. 8 9 Mark some WPT progressions. 10 11 * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt: 12 1 13 2020-11-12 Zalan Bujtas <zalan@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt
r267650 r269774 23 23 FAIL Property content value '"foo"' in ::marker assert_equals: expected "\"foo\"" but got "" 24 24 FAIL Property animation value '1s linear 2s infinite alternate forwards paused anim' in ::marker assert_equals: expected "1s linear 2s infinite alternate forwards paused anim" but got "" 25 FAIL Property animation-delay value '1s' in ::marker assert_equals: expected "1s" but got "0s" 26 FAIL Property animation-direction value 'alternate' in ::marker assert_equals: expected "alternate" but got "normal" 27 FAIL Property animation-duration value '2s' in ::marker assert_equals: expected "2s" but got "0s" 28 FAIL Property animation-fill-mode value 'forwards' in ::marker assert_equals: expected "forwards" but got "none" 29 FAIL Property animation-iteration-count value 'infinite' in ::marker assert_equals: expected "infinite" but got "1" 30 FAIL Property animation-name value 'anim' in ::marker assert_equals: expected "anim" but got "none" 31 FAIL Property animation-play-state value 'paused' in ::marker assert_equals: expected "paused" but got "running" 32 FAIL Property animation-timing-function value 'linear' in ::marker assert_equals: expected "linear" but got "ease" 33 FAIL Property transition value 'display 1s linear 2s' in ::marker assert_equals: expected "display 1s linear 2s" but got "all 0s ease 0s" 34 FAIL Property transition-delay value '1s' in ::marker assert_equals: expected "1s" but got "0s" 35 FAIL Property transition-duration value '2s' in ::marker assert_equals: expected "2s" but got "0s" 36 FAIL Property transition-property value 'display' in ::marker assert_equals: expected "display" but got "all" 37 FAIL Property transition-timing-function value 'linear' in ::marker assert_equals: expected "linear" but got "ease" 25 PASS Property animation-delay value '1s' in ::marker 26 PASS Property animation-direction value 'alternate' in ::marker 27 PASS Property animation-duration value '2s' in ::marker 28 PASS Property animation-fill-mode value 'forwards' in ::marker 29 PASS Property animation-iteration-count value 'infinite' in ::marker 30 PASS Property animation-name value 'anim' in ::marker 31 PASS Property animation-play-state value 'paused' in ::marker 32 PASS Property animation-timing-function value 'linear' in ::marker 33 PASS Property transition value 'display 1s linear 2s' in ::marker 34 PASS Property transition-delay value '1s' in ::marker 35 PASS Property transition-duration value '2s' in ::marker 36 PASS Property transition-property value 'display' in ::marker 37 PASS Property transition-timing-function value 'linear' in ::marker 38 38 PASS Property display value 'none' in ::marker 39 39 PASS Property position value 'absolute' in ::marker -
trunk/Source/WebCore/ChangeLog
r269773 r269774 1 2020-11-13 Antoine Quint <graouts@webkit.org> 2 3 Support more properties on ::marker 4 https://bugs.webkit.org/show_bug.cgi?id=218894 5 <rdar://problem/71368343> 6 7 Reviewed by Antti Koivisto. 8 9 In preparation for the support of animations on ::marker and other pseudo-elements, we add support for animation and transition 10 properties and add more rules to the user-agent stylesheet as defined by https://drafts.csswg.org/css-lists-3/#marker-properties. 11 12 * css/html.css: 13 (::marker): 14 * rendering/RenderListItem.cpp: 15 (WebCore::RenderListItem::computeMarkerStyle const): 16 * style/PropertyCascade.cpp: 17 (WebCore::Style::isValidMarkerStyleProperty): 18 1 19 2020-11-13 Zalan Bujtas <zalan@apple.com> 2 20 -
trunk/Source/WebCore/css/html.css
r267701 r269774 303 303 } 304 304 305 /* FIXME: this should also match ::before::marker and ::after::marker but we don't support 306 this yet. When we do, we can remove the code specific to ::before and ::after in 307 RenderListItem::computeMarkerStyle(), see bugs.webkit.org/b/218897. */ 305 308 ::marker { 309 unicode-bidi: isolate; 310 font-variant-numeric: tabular-nums; 311 white-space: pre; 306 312 text-transform: none; 307 313 } -
trunk/Source/WebCore/rendering/RenderListItem.cpp
r258680 r269774 32 32 #include "InlineElementBox.h" 33 33 #include "PseudoElement.h" 34 #include "RenderStyleConstants.h" 34 35 #include "RenderTreeBuilder.h" 35 36 #include "RenderView.h" 36 37 #include "StyleInheritedData.h" 38 #include "UnicodeBidi.h" 37 39 #include <wtf/IsoMallocInlines.h> 38 40 #include <wtf/StackStats.h> … … 59 61 RenderStyle RenderListItem::computeMarkerStyle() const 60 62 { 63 if (!is<PseudoElement>(element())) { 64 auto markerStyle = getCachedPseudoStyle(PseudoId::Marker, &style()); 65 ASSERT(markerStyle); 66 return RenderStyle::clone(*markerStyle); 67 } 68 61 69 // The marker always inherits from the list item, regardless of where it might end 62 70 // up (e.g., in some deeply nested line box). See CSS3 spec. 63 // FIXME: The marker should only inherit all font properties and the color property 64 // according to the CSS Pseudo-Elements Module Level 4 spec. 65 // 66 // Although the CSS Pseudo-Elements Module Level 4 spec. saids to add ::marker to the UA sheet 67 // we apply it here as an optimization because it only applies to markers. That is, it does not 68 // apply to all elements. 69 RenderStyle parentStyle = RenderStyle::clone(style()); 71 auto markerStyle = RenderStyle::create(); 72 markerStyle.inheritFrom(style()); 73 74 // In the case of a ::before or ::after pseudo-element, we manually apply the properties 75 // otherwise set in the user-agent stylesheet since we don't support ::before::marker or 76 // ::after::marker. See bugs.webkit.org/b/218897. 70 77 auto fontDescription = style().fontDescription(); 71 78 fontDescription.setVariantNumericSpacing(FontVariantNumericSpacing::TabularNumbers); 72 parentStyle.setFontDescription(WTFMove(fontDescription)); 73 parentStyle.fontCascade().update(&document().fontSelector()); 74 if (auto markerStyle = getCachedPseudoStyle(PseudoId::Marker, &parentStyle)) 75 return RenderStyle::clone(*markerStyle); 76 auto markerStyle = RenderStyle::create(); 77 markerStyle.inheritFrom(parentStyle); 79 markerStyle.setFontDescription(WTFMove(fontDescription)); 80 markerStyle.fontCascade().update(&document().fontSelector()); 81 markerStyle.setUnicodeBidi(EUnicodeBidi::Isolate); 82 markerStyle.setWhiteSpace(WhiteSpace::Pre); 83 markerStyle.setTextTransform(TextTransform::None); 78 84 return markerStyle; 79 85 } -
trunk/Source/WebCore/style/PropertyCascade.cpp
r266689 r269774 71 71 72 72 // https://www.w3.org/TR/css-pseudo-4/#marker-pseudo (Editor's Draft, 25 July 2017) 73 // FIXME: this is outdated, see https://bugs.webkit.org/show_bug.cgi?id=218791. 73 74 static inline bool isValidMarkerStyleProperty(CSSPropertyID id) 74 75 { … … 92 93 case CSSPropertyFontVariationSettings: 93 94 #endif 95 case CSSPropertyAnimationDuration: 96 case CSSPropertyAnimationTimingFunction: 97 case CSSPropertyAnimationDelay: 98 case CSSPropertyAnimationIterationCount: 99 case CSSPropertyAnimationDirection: 100 case CSSPropertyAnimationFillMode: 101 case CSSPropertyAnimationPlayState: 102 case CSSPropertyAnimationName: 103 case CSSPropertyTransitionDuration: 104 case CSSPropertyTransitionTimingFunction: 105 case CSSPropertyTransitionDelay: 106 case CSSPropertyTransitionProperty: 94 107 return true; 95 108 default:
Note: See TracChangeset
for help on using the changeset viewer.