Skip to content
Permalink
Browse files
CSSStyleDeclaration.getPropertyPriority() should return the empty str…
…ing for invalid CSS properties

https://bugs.webkit.org/show_bug.cgi?id=227257
<rdar://problem/79622278>

Reviewed by Darin Adler.

Follow-up to r279125 to improve test coverage for usage of USVString in CSSStyleDeclaration.

* fast/css/CSSStyleDeclaration-setProperty-unicode-expected.txt: Added.
* fast/css/CSSStyleDeclaration-setProperty-unicode.html: Added.


Canonical link: https://commits.webkit.org/239072@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Jun 23, 2021
1 parent 0620b4a commit 468c933e7591f8d42335d4cc47f707ce8faebd08
Showing 3 changed files with 43 additions and 0 deletions.
@@ -1,3 +1,16 @@
2021-06-23 Chris Dumez <cdumez@apple.com>

CSSStyleDeclaration.getPropertyPriority() should return the empty string for invalid CSS properties
https://bugs.webkit.org/show_bug.cgi?id=227257
<rdar://problem/79622278>

Reviewed by Darin Adler.

Follow-up to r279125 to improve test coverage for usage of USVString in CSSStyleDeclaration.

* fast/css/CSSStyleDeclaration-setProperty-unicode-expected.txt: Added.
* fast/css/CSSStyleDeclaration-setProperty-unicode.html: Added.

2021-06-23 Amir Mark Jr <amir_mark@apple.com>

[macOS WK1] imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html is a flaky failure.
@@ -0,0 +1,12 @@
Tests use of USVString in CSSStyleDeclaration.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS declaration.getPropertyValue('animation-name') is "abc�def�ghi"
PASS declaration.cssText.includes(REPLACED) is true
PASS declaration.removeProperty('animation-name') is "abc�def�ghi"
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
const CONTAINS_UNPAIRED_SURROGATES = 'abc\uDC00def\uD800ghi';
const REPLACED = 'abc\uFFFDdef\uFFFDghi';

description("Tests use of USVString in CSSStyleDeclaration.");

var declaration = document.styleSheets[0].cssRules[0].style;
declaration.setProperty("animation-name", CONTAINS_UNPAIRED_SURROGATES);
shouldBeEqualToString("declaration.getPropertyValue('animation-name')", REPLACED);
shouldBeTrue("declaration.cssText.includes(REPLACED)");
shouldBeEqualToString("declaration.removeProperty('animation-name')", REPLACED);
</script>
</body>
</html>

0 comments on commit 468c933

Please sign in to comment.