WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch for landing
bug-237529-20220307165430.patch (text/plain), 9.09 KB, created by
Antoine Quint
on 2022-03-07 07:54:31 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2022-03-07 07:54:31 PST
Size:
9.09 KB
patch
obsolete
>Subversion Revision: 290888 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0f0f47130f8b2fdf70cbc71e7bd4256b6b5b8386..689dc7540c97ab7d591cb0ea6cbbc0a75334fdd9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2022-03-07 Antoine Quint <graouts@webkit.org> >+ >+ [web-animations] text-emphasis shorthand should be animatable >+ https://bugs.webkit.org/show_bug.cgi?id=237529 >+ >+ Reviewed by Antti Koivisto. >+ >+ * animation/CSSPropertyAnimation.cpp: >+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::valueForTextEmphasisStyle): >+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): >+ > 2022-03-07 Antoine Quint <graouts@webkit.org> > > [web-animations] text-emphasis-style should support discrete animations >diff --git a/Source/WebCore/animation/CSSPropertyAnimation.cpp b/Source/WebCore/animation/CSSPropertyAnimation.cpp >index 815ffa08a38cffda476662a3d9bce8b258ab0446..d389b1790fdc7b7a3596affc306730f2f8c9b793 100644 >--- a/Source/WebCore/animation/CSSPropertyAnimation.cpp >+++ b/Source/WebCore/animation/CSSPropertyAnimation.cpp >@@ -2836,7 +2836,8 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap() > CSSPropertyWebkitBorderRadius, > CSSPropertyTransformOrigin, > CSSPropertyPerspectiveOrigin, >- CSSPropertyOffset >+ CSSPropertyOffset, >+ CSSPropertyTextEmphasis > }; > const unsigned animatableShorthandPropertiesCount = WTF_ARRAY_LENGTH(animatableShorthandProperties); > >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index d7ac7b83bec848945ad8907e6fcfb8e595a59634..e945177136e611fd8b6b0006272eaf106bc049e6 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -1922,6 +1922,33 @@ static Ref<CSSValue> renderEmphasisPositionFlagsToCSSValue(OptionSet<TextEmphasi > return list; > } > >+static Ref<CSSValue> valueForTextEmphasisStyle(const RenderStyle& style) >+{ >+ auto& cssValuePool = CSSValuePool::singleton(); >+ switch (style.textEmphasisMark()) { >+ case TextEmphasisMark::None: >+ return cssValuePool.createIdentifierValue(CSSValueNone); >+ case TextEmphasisMark::Custom: >+ return cssValuePool.createValue(style.textEmphasisCustomMark(), CSSUnitType::CSS_STRING); >+ case TextEmphasisMark::Auto: >+ ASSERT_NOT_REACHED(); >+#if !ASSERT_ENABLED >+ FALLTHROUGH; >+#endif >+ case TextEmphasisMark::Dot: >+ case TextEmphasisMark::Circle: >+ case TextEmphasisMark::DoubleCircle: >+ case TextEmphasisMark::Triangle: >+ case TextEmphasisMark::Sesame: >+ auto list = CSSValueList::createSpaceSeparated(); >+ if (style.textEmphasisFill() != TextEmphasisFill::Filled) >+ list->append(cssValuePool.createValue(style.textEmphasisFill())); >+ list->append(cssValuePool.createValue(style.textEmphasisMark())); >+ return list; >+ } >+ RELEASE_ASSERT_NOT_REACHED(); >+} >+ > static Ref<CSSValue> speakAsToCSSValue(OptionSet<SpeakAs> speakAs) > { > auto& cssValuePool = CSSValuePool::singleton(); >@@ -3554,28 +3581,13 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyInStyle(const RenderSty > case CSSPropertyTextEmphasisPosition: > return renderEmphasisPositionFlagsToCSSValue(style.textEmphasisPosition()); > case CSSPropertyTextEmphasisStyle: >- switch (style.textEmphasisMark()) { >- case TextEmphasisMark::None: >- return cssValuePool.createIdentifierValue(CSSValueNone); >- case TextEmphasisMark::Custom: >- return cssValuePool.createValue(style.textEmphasisCustomMark(), CSSUnitType::CSS_STRING); >- case TextEmphasisMark::Auto: >- ASSERT_NOT_REACHED(); >-#if !ASSERT_ENABLED >- FALLTHROUGH; >-#endif >- case TextEmphasisMark::Dot: >- case TextEmphasisMark::Circle: >- case TextEmphasisMark::DoubleCircle: >- case TextEmphasisMark::Triangle: >- case TextEmphasisMark::Sesame: >- auto list = CSSValueList::createSpaceSeparated(); >- if (style.textEmphasisFill() != TextEmphasisFill::Filled) >- list->append(cssValuePool.createValue(style.textEmphasisFill())); >- list->append(cssValuePool.createValue(style.textEmphasisMark())); >- return list; >- } >- RELEASE_ASSERT_NOT_REACHED(); >+ return valueForTextEmphasisStyle(style); >+ case CSSPropertyTextEmphasis: { >+ auto list = CSSValueList::createSpaceSeparated(); >+ list->append(valueForTextEmphasisStyle(style)); >+ list->append(currentColorOrValidColor(&style, style.textEmphasisColor())); >+ return list; >+ } > case CSSPropertyTextIndent: { > auto textIndent = zoomAdjustedPixelValueForLength(style.textIndent(), style); > if (style.textIndentLine() == TextIndentLine::EachLine || style.textIndentType() == TextIndentType::Hanging) { >@@ -4179,7 +4191,6 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyInStyle(const RenderSty > > /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */ > case CSSPropertyAll: >- case CSSPropertyTextEmphasis: > break; > > /* Directional properties are resolved by resolveDirectionAwareProperty() before the switch. */ >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index ab1ca9e7fcc82d18bd59b44d839581e8780e5e03..be08d1815ea1336aa20b903bf623d0295902177f 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,13 @@ >+2022-03-07 Antoine Quint <graouts@webkit.org> >+ >+ [web-animations] text-emphasis shorthand should be animatable >+ https://bugs.webkit.org/show_bug.cgi?id=237529 >+ >+ Reviewed by Antti Koivisto. >+ >+ * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt: >+ * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt: >+ > 2022-03-07 Antoine Quint <graouts@webkit.org> > > [web-animations] text-emphasis-style should support discrete animations >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt >index 8f507a3075782d94983b4dbbb5524c0ef884bea4..ef0021fc8e8f8bf5586e07847422163cdde54833 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt >@@ -49,7 +49,7 @@ PASS Property text-transform value 'uppercase' in ::marker > PASS Property word-break value 'break-word' in ::marker > PASS Property word-spacing value '10px' in ::marker > PASS Property text-decoration-skip-ink value 'none' in ::marker >-FAIL Property text-emphasis value 'dot rgb(0, 255, 0)' in ::marker assert_equals: expected "dot rgb(0, 255, 0)" but got "" >+PASS Property text-emphasis value 'dot rgb(0, 255, 0)' in ::marker > PASS Property text-emphasis-color value 'rgb(0, 255, 0)' in ::marker > PASS Property text-emphasis-position value 'under left' in ::marker > PASS Property text-emphasis-style value 'dot' in ::marker >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt >index e320ffdf98e0dd735a1dd34b9e1e5cf5bd971fa1..abd26d7160806bed181d103d55b79ded31af5a25 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt >@@ -34,7 +34,7 @@ PASS Animation of text-transform in ::marker > PASS Animation of word-break in ::marker > PASS Animation of word-spacing in ::marker > PASS Animation of text-decoration-skip-ink in ::marker >-FAIL Animation of text-emphasis in ::marker assert_equals: expected "triangle rgb(50, 100, 100)" but got "" >+PASS Animation of text-emphasis in ::marker > PASS Animation of text-emphasis-color in ::marker > PASS Animation of text-emphasis-position in ::marker > PASS Animation of text-emphasis-style in ::marker >@@ -81,7 +81,7 @@ PASS Transition of text-transform in ::marker > PASS Transition of word-break in ::marker > PASS Transition of word-spacing in ::marker > PASS Transition of text-decoration-skip-ink in ::marker >-FAIL Transition of text-emphasis in ::marker assert_equals: expected "triangle rgb(50, 100, 100)" but got "" >+PASS Transition of text-emphasis in ::marker > PASS Transition of text-emphasis-color in ::marker > PASS Transition of text-emphasis-position in ::marker > PASS Transition of text-emphasis-style in ::marker
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 237529
:
453977
| 453984