Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (290688 => 290689)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-01 23:49:11 UTC (rev 290688)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-01 23:49:16 UTC (rev 290689)
@@ -1,5 +1,48 @@
2022-02-28 Russell Epstein <repst...@apple.com>
+ Cherry-pick r289526. rdar://problem/87061239
+
+ [:has() pseudo-class] Nullptr crash with non-function :has
+ https://bugs.webkit.org/show_bug.cgi?id=236431
+ rdar://87061239
+
+ Reviewed by Cameron McCormack.
+
+ LayoutTests/imported/w3c:
+
+ * web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
+ * web-platform-tests/css/selectors/parsing/parse-has.html:
+
+ Source/WebCore:
+
+ Test: fast/selectors/malformed-has.html
+
+ * css/parser/CSSSelectorParser.cpp:
+ (WebCore::isOnlyPseudoClassFunction):
+
+ :has() is legal, plain :has is not.
+
+ LayoutTests:
+
+ * fast/selectors/malformed-has-expected.txt: Added.
+ * fast/selectors/malformed-has.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-10 Antti Koivisto <an...@apple.com>
+
+ [:has() pseudo-class] Nullptr crash with non-function :has
+ https://bugs.webkit.org/show_bug.cgi?id=236431
+ rdar://87061239
+
+ Reviewed by Cameron McCormack.
+
+ * fast/selectors/malformed-has-expected.txt: Added.
+ * fast/selectors/malformed-has.html: Added.
+
+2022-02-28 Russell Epstein <repst...@apple.com>
+
Cherry-pick r289462. rdar://problem/88580935
Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
Added: branches/safari-613-branch/LayoutTests/fast/selectors/malformed-has-expected.txt (0 => 290689)
--- branches/safari-613-branch/LayoutTests/fast/selectors/malformed-has-expected.txt (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/selectors/malformed-has-expected.txt 2022-03-01 23:49:16 UTC (rev 290689)
@@ -0,0 +1 @@
+This test passes if it doesn't crash.
Added: branches/safari-613-branch/LayoutTests/fast/selectors/malformed-has.html (0 => 290689)
--- branches/safari-613-branch/LayoutTests/fast/selectors/malformed-has.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/selectors/malformed-has.html 2022-03-01 23:49:16 UTC (rev 290689)
@@ -0,0 +1,9 @@
+<style>
+div:has { color: red; }
+</style>
+<div>This test passes if it doesn't crash.</div>
+
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (290688 => 290689)
--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog 2022-03-01 23:49:11 UTC (rev 290688)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog 2022-03-01 23:49:16 UTC (rev 290689)
@@ -1,5 +1,48 @@
2022-02-28 Russell Epstein <repst...@apple.com>
+ Cherry-pick r289526. rdar://problem/87061239
+
+ [:has() pseudo-class] Nullptr crash with non-function :has
+ https://bugs.webkit.org/show_bug.cgi?id=236431
+ rdar://87061239
+
+ Reviewed by Cameron McCormack.
+
+ LayoutTests/imported/w3c:
+
+ * web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
+ * web-platform-tests/css/selectors/parsing/parse-has.html:
+
+ Source/WebCore:
+
+ Test: fast/selectors/malformed-has.html
+
+ * css/parser/CSSSelectorParser.cpp:
+ (WebCore::isOnlyPseudoClassFunction):
+
+ :has() is legal, plain :has is not.
+
+ LayoutTests:
+
+ * fast/selectors/malformed-has-expected.txt: Added.
+ * fast/selectors/malformed-has.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-10 Antti Koivisto <an...@apple.com>
+
+ [:has() pseudo-class] Nullptr crash with non-function :has
+ https://bugs.webkit.org/show_bug.cgi?id=236431
+ rdar://87061239
+
+ Reviewed by Cameron McCormack.
+
+ * web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
+ * web-platform-tests/css/selectors/parsing/parse-has.html:
+
+2022-02-28 Russell Epstein <repst...@apple.com>
+
Cherry-pick r289443. rdar://problem/88593617
REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-expected.txt (290688 => 290689)
--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-expected.txt 2022-03-01 23:49:11 UTC (rev 290688)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-expected.txt 2022-03-01 23:49:16 UTC (rev 290689)
@@ -25,4 +25,7 @@
PASS "*|*:has(*)" should be a valid selector
PASS ":has(*|*)" should be a valid selector
PASS ".a:has()" should be an invalid selector
+PASS ":has" should be an invalid selector
+PASS ".a:has" should be an invalid selector
+PASS ".a:has b" should be an invalid selector
Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has.html (290688 => 290689)
--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has.html 2022-03-01 23:49:11 UTC (rev 290688)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has.html 2022-03-01 23:49:16 UTC (rev 290689)
@@ -33,4 +33,7 @@
test_valid_selector('*|*:has(*)', ':has(*)');
test_valid_selector(':has(*|*)', ':has(*)');
test_invalid_selector('.a:has()');
-</script>
\ No newline at end of file
+ test_invalid_selector(':has');
+ test_invalid_selector('.a:has');
+ test_invalid_selector('.a:has b');
+</script>
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (290688 => 290689)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-01 23:49:11 UTC (rev 290688)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-01 23:49:16 UTC (rev 290689)
@@ -1,5 +1,52 @@
2022-02-28 Russell Epstein <repst...@apple.com>
+ Cherry-pick r289526. rdar://problem/87061239
+
+ [:has() pseudo-class] Nullptr crash with non-function :has
+ https://bugs.webkit.org/show_bug.cgi?id=236431
+ rdar://87061239
+
+ Reviewed by Cameron McCormack.
+
+ LayoutTests/imported/w3c:
+
+ * web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
+ * web-platform-tests/css/selectors/parsing/parse-has.html:
+
+ Source/WebCore:
+
+ Test: fast/selectors/malformed-has.html
+
+ * css/parser/CSSSelectorParser.cpp:
+ (WebCore::isOnlyPseudoClassFunction):
+
+ :has() is legal, plain :has is not.
+
+ LayoutTests:
+
+ * fast/selectors/malformed-has-expected.txt: Added.
+ * fast/selectors/malformed-has.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-10 Antti Koivisto <an...@apple.com>
+
+ [:has() pseudo-class] Nullptr crash with non-function :has
+ https://bugs.webkit.org/show_bug.cgi?id=236431
+ rdar://87061239
+
+ Reviewed by Cameron McCormack.
+
+ Test: fast/selectors/malformed-has.html
+
+ * css/parser/CSSSelectorParser.cpp:
+ (WebCore::isOnlyPseudoClassFunction):
+
+ :has() is legal, plain :has is not.
+
+2022-02-28 Russell Epstein <repst...@apple.com>
+
Cherry-pick r289502. rdar://problem/88528286
WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header
Modified: branches/safari-613-branch/Source/WebCore/css/parser/CSSSelectorParser.cpp (290688 => 290689)
--- branches/safari-613-branch/Source/WebCore/css/parser/CSSSelectorParser.cpp 2022-03-01 23:49:11 UTC (rev 290688)
+++ branches/safari-613-branch/Source/WebCore/css/parser/CSSSelectorParser.cpp 2022-03-01 23:49:16 UTC (rev 290689)
@@ -590,6 +590,7 @@
case CSSSelector::PseudoClassIs:
case CSSSelector::PseudoClassMatches:
case CSSSelector::PseudoClassWhere:
+ case CSSSelector::PseudoClassHas:
case CSSSelector::PseudoClassNthChild:
case CSSSelector::PseudoClassNthLastChild:
case CSSSelector::PseudoClassNthOfType: