From 1d2e717a18a2643b67b8d6a36685811344241d6f Mon Sep 17 00:00:00 2001 From: Andrew Fryer Date: Thu, 22 Aug 2024 17:56:05 -0700 Subject: [PATCH] Accept `cursor` in `::marker` https://bugs.webkit.org/show_bug.cgi?id=277662 rdar://problem/133256523 Reviewed by Tim Nguyen. Add CSSPropertyCursor to the list of ValidMarkerStyleProperties because the CSS Working Group agreed that "cursor property applies to ::marker pseudo" https://github.com/w3c/csswg-drafts/issues/6203#issuecomment-2221026768 * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt: * Source/WebCore/style/PropertyAllowlist.cpp: (WebCore::Style::isValidMarkerStyleProperty): Canonical link: https://commits.webkit.org/282642@main --- .../marker-hit-testing-expected.txt | 31 +++++++++---------- .../marker-supported-properties-expected.txt | 2 +- ...orted-properties-in-animation-expected.txt | 4 +-- Source/WebCore/style/PropertyAllowlist.cpp | 1 + 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt index 8e3e99527a5fc..2419b9822b893 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt @@ -1,31 +1,28 @@ -FAIL outside image ::marker's content assert_equals: event.target expected Element node
  • but got Element node
      +PASS outside image ::marker's content +FAIL outside image ::marker assert_equals: event.target expected Element node
    1. but got Element node
      1. but got Element node -CSS Pseudo-Elem... -FAIL outside string ::marker's content assert_equals: event.target expected Element node <li class="string"></li> but got Element node <ol class="outside" data-x="-65"> - <li class="image"></l... -FAIL outside string ::marker assert_equals: event.target expected Element node <li class="string"></li> but got Element node <li class="image"></li> -FAIL outside marker ::marker's content assert_equals: event.target expected Element node <li class="marker"></li> but got Element node <ol class="outside" data-x="-65"> +PASS outside string ::marker's content +FAIL outside string ::marker assert_equals: event.target expected Element node <li class="string"></li> but got Element node <ol class="outside" data-x="-65"> <li class="image"></l... +PASS outside marker ::marker's content FAIL outside marker ::marker assert_equals: event.target expected Element node <li class="marker"></li> but got Element node <ol class="outside" data-x="-65"> <li class="image"></l... -FAIL outside nested image ::marker's content assert_equals: event.target expected Element node <li class="nested image"></li> but got Element node <ol class="outside" data-x="-65"> +PASS outside nested image ::marker's content +FAIL outside nested image ::marker assert_equals: event.target expected Element node <li class="nested image"></li> but got Element node <ol class="outside" data-x="-65"> <li class="image"></l... -FAIL outside nested image ::marker assert_equals: event.target expected Element node <li class="nested image"></li> but got Element node <li class="marker"></li> -FAIL outside nested string ::marker's content assert_equals: event.target expected Element node <li class="nested string"></li> but got Element node <ol class="outside" data-x="-65"> +PASS outside nested string ::marker's content +FAIL outside nested string ::marker assert_equals: event.target expected Element node <li class="nested string"></li> but got Element node <ol class="outside" data-x="-65"> <li class="image"></l... -FAIL outside nested string ::marker assert_equals: event.target expected Element node <li class="nested string"></li> but got Element node <li class="nested image"></li> PASS inside image ::marker's content -FAIL inside image ::marker assert_equals: event.target expected Element node <li class="image"></li> but got Element node <html><head><meta charset="utf-8"> -<title>CSS Pseudo-Elem... +PASS inside image ::marker PASS inside string ::marker's content -FAIL inside string ::marker assert_equals: event.target expected Element node <li class="string"></li> but got Element node <li class="image"></li> +PASS inside string ::marker PASS inside marker ::marker's content -FAIL inside marker ::marker assert_equals: event.target expected Element node <li class="marker"></li> but got Element node <li class="string"></li> +PASS inside marker ::marker PASS inside nested image ::marker's content -FAIL inside nested image ::marker assert_equals: event.target expected Element node <li class="nested image"></li> but got Element node <li class="marker"></li> +PASS inside nested image ::marker PASS inside nested string ::marker's content -FAIL inside nested string ::marker assert_equals: event.target expected Element node <li class="nested string"></li> but got Element node <li class="nested image"></li> +PASS inside nested string ::marker 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 7588656da72f6..575db79f0f51e 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 @@ -54,7 +54,7 @@ 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 PASS Property text-shadow value 'rgb(0, 255, 0) 1px 2px 3px' in ::marker -FAIL Property cursor value 'move' in ::marker assert_equals: expected "move" but got "auto" +PASS Property cursor value 'move' in ::marker PASS Property display value 'none' in ::marker PASS Property position value 'absolute' in ::marker PASS Property float value 'right' 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 5f26a88dd62f5..50dc719170dc9 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 @@ -39,7 +39,7 @@ PASS Animation of text-emphasis-color in ::marker PASS Animation of text-emphasis-position in ::marker PASS Animation of text-emphasis-style in ::marker PASS Animation of text-shadow in ::marker -FAIL Animation of cursor in ::marker assert_equals: expected "move" but got "auto" +PASS Animation of cursor in ::marker PASS Animation of display in ::marker PASS Animation of position in ::marker PASS Animation of float in ::marker @@ -87,7 +87,7 @@ PASS Transition of text-emphasis-color in ::marker PASS Transition of text-emphasis-position in ::marker PASS Transition of text-emphasis-style in ::marker PASS Transition of text-shadow in ::marker -FAIL Transition of cursor in ::marker assert_equals: expected "move" but got "auto" +PASS Transition of cursor in ::marker PASS Transition of display in ::marker PASS Transition of position in ::marker PASS Transition of float in ::marker diff --git a/Source/WebCore/style/PropertyAllowlist.cpp b/Source/WebCore/style/PropertyAllowlist.cpp index f04643b9fb132..4f26725e68327 100644 --- a/Source/WebCore/style/PropertyAllowlist.cpp +++ b/Source/WebCore/style/PropertyAllowlist.cpp @@ -44,6 +44,7 @@ bool isValidMarkerStyleProperty(CSSPropertyID id) case CSSPropertyColor: case CSSPropertyContent: case CSSPropertyCustom: + case CSSPropertyCursor: case CSSPropertyDirection: case CSSPropertyFont: case CSSPropertyFontFamily: