Title: [287638] branches/safari-613.1.12.1-branch
- Revision
- 287638
- Author
- repst...@apple.com
- Date
- 2022-01-05 11:19:25 -0800 (Wed, 05 Jan 2022)
Log Message
Cherry-pick r285827. rdar://problem/85917218
Revert r285235
https://bugs.webkit.org/show_bug.cgi?id=233142
Unreviewed.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt:
Source/WebCore:
Causes crash with simple repro
<div id=t style="border-radius: unset"></div>
<script>
t.style.borderRadius;
</script>
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderRadiusValue const): Deleted.
* css/StyleProperties.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613.1.12.1-branch/LayoutTests/imported/w3c/ChangeLog (287637 => 287638)
--- branches/safari-613.1.12.1-branch/LayoutTests/imported/w3c/ChangeLog 2022-01-05 19:09:40 UTC (rev 287637)
+++ branches/safari-613.1.12.1-branch/LayoutTests/imported/w3c/ChangeLog 2022-01-05 19:19:25 UTC (rev 287638)
@@ -1,3 +1,41 @@
+2022-01-05 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r285827. rdar://problem/85917218
+
+ Revert r285235
+ https://bugs.webkit.org/show_bug.cgi?id=233142
+
+ Unreviewed.
+
+ LayoutTests/imported/w3c:
+
+ * web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt:
+
+ Source/WebCore:
+
+ Causes crash with simple repro
+
+ <div id=t style="border-radius: unset"></div>
+ <script>
+ t.style.borderRadius;
+ </script>
+
+ * css/StyleProperties.cpp:
+ (WebCore::StyleProperties::getPropertyValue const):
+ (WebCore::StyleProperties::borderRadiusValue const): Deleted.
+ * css/StyleProperties.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-11-15 Antti Koivisto <an...@apple.com>
+
+ Revert r285235
+ https://bugs.webkit.org/show_bug.cgi?id=233142
+
+ Unreviewed.
+
+ * web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt:
+
2021-12-13 Youenn Fablet <you...@apple.com>
Implement step 17 of main fetch algorithm
Modified: branches/safari-613.1.12.1-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt (287637 => 287638)
--- branches/safari-613.1.12.1-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt 2022-01-05 19:09:40 UTC (rev 287637)
+++ branches/safari-613.1.12.1-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt 2022-01-05 19:19:25 UTC (rev 287638)
@@ -7,17 +7,17 @@
PASS e.style['border-radius'] = "1px 5%" should set the property value
PASS e.style['border-radius'] = "1px 2% 3px" should set the property value
PASS e.style['border-radius'] = "1px 2% 3px 4%" should set the property value
-PASS e.style['border-radius'] = "1px / 2px" should set the property value
-PASS e.style['border-radius'] = "5em / 1px 2% 3px 4%" should set the property value
-PASS e.style['border-radius'] = "1px 2% / 3px 4px" should set the property value
-PASS e.style['border-radius'] = "1px 2px 3em / 1px 2px 3%" should set the property value
-PASS e.style['border-radius'] = "1px 2% / 2px 3em 4px 5em" should set the property value
-PASS e.style['border-radius'] = "1px 2% 3px 4% / 5em" should set the property value
-PASS e.style['border-radius'] = "1px 1px 1px 2% / 1px 2% 1px 2%" should set the property value
-PASS e.style['border-radius'] = "1px 1px 1px 1px / 1px 1px 2% 1px" should set the property value
+FAIL e.style['border-radius'] = "1px / 2px" should set the property value assert_equals: serialization should be canonical expected "1px / 2px" but got "1px 2px"
+FAIL e.style['border-radius'] = "5em / 1px 2% 3px 4%" should set the property value assert_equals: serialization should be canonical expected "5em / 1px 2% 3px 4%" but got "5em 1px 5em 2% 5em 3px 5em 4%"
+FAIL e.style['border-radius'] = "1px 2% / 3px 4px" should set the property value assert_equals: serialization should be canonical expected "1px 2% / 3px 4px" but got "1px 3px 2% 4px"
+FAIL e.style['border-radius'] = "1px 2px 3em / 1px 2px 3%" should set the property value assert_equals: serialization should be canonical expected "1px 2px 3em / 1px 2px 3%" but got "1px 2px 3em 3%"
+FAIL e.style['border-radius'] = "1px 2% / 2px 3em 4px 5em" should set the property value assert_equals: serialization should be canonical expected "1px 2% / 2px 3em 4px 5em" but got "1px 2px 2% 3em 1px 4px 2% 5em"
+FAIL e.style['border-radius'] = "1px 2% 3px 4% / 5em" should set the property value assert_equals: serialization should be canonical expected "1px 2% 3px 4% / 5em" but got "1px 5em 2% 5em 3px 5em 4% 5em"
+FAIL e.style['border-radius'] = "1px 1px 1px 2% / 1px 2% 1px 2%" should set the property value assert_equals: serialization should be canonical expected "1px 1px 1px 2% / 1px 2%" but got "1px 1px 2% 1px 2%"
+FAIL e.style['border-radius'] = "1px 1px 1px 1px / 1px 1px 2% 1px" should set the property value assert_equals: serialization should be canonical expected "1px / 1px 1px 2%" but got "1px 1px 1px 2%"
PASS e.style['border-radius'] = "1px 1px 2% 2%" should set the property value
PASS e.style['border-radius'] = "1px 2% 1px 1px" should set the property value
-PASS e.style['border-radius'] = "1px 2% 2% 2% / 1px 2% 3px 2%" should set the property value
+FAIL e.style['border-radius'] = "1px 2% 2% 2% / 1px 2% 3px 2%" should set the property value assert_equals: serialization should be canonical expected "1px 2% 2% / 1px 2% 3px" but got "1px 2% 2% 3px"
PASS e.style['border-top-left-radius'] = "10px" should set the property value
PASS e.style['border-top-right-radius'] = "20%" should set the property value
PASS e.style['border-bottom-right-radius'] = "30px 40%" should set the property value
Modified: branches/safari-613.1.12.1-branch/Source/WebCore/ChangeLog (287637 => 287638)
--- branches/safari-613.1.12.1-branch/Source/WebCore/ChangeLog 2022-01-05 19:09:40 UTC (rev 287637)
+++ branches/safari-613.1.12.1-branch/Source/WebCore/ChangeLog 2022-01-05 19:19:25 UTC (rev 287638)
@@ -1,3 +1,51 @@
+2022-01-05 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r285827. rdar://problem/85917218
+
+ Revert r285235
+ https://bugs.webkit.org/show_bug.cgi?id=233142
+
+ Unreviewed.
+
+ LayoutTests/imported/w3c:
+
+ * web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt:
+
+ Source/WebCore:
+
+ Causes crash with simple repro
+
+ <div id=t style="border-radius: unset"></div>
+ <script>
+ t.style.borderRadius;
+ </script>
+
+ * css/StyleProperties.cpp:
+ (WebCore::StyleProperties::getPropertyValue const):
+ (WebCore::StyleProperties::borderRadiusValue const): Deleted.
+ * css/StyleProperties.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-11-15 Antti Koivisto <an...@apple.com>
+
+ Revert r285235
+ https://bugs.webkit.org/show_bug.cgi?id=233142
+
+ Unreviewed.
+
+ Causes crash with simple repro
+
+ <div id=t style="border-radius: unset"></div>
+ <script>
+ t.style.borderRadius;
+ </script>
+
+ * css/StyleProperties.cpp:
+ (WebCore::StyleProperties::getPropertyValue const):
+ (WebCore::StyleProperties::borderRadiusValue const): Deleted.
+ * css/StyleProperties.h:
+
2022-01-04 Alan Coon <alanc...@apple.com>
Cherry-pick r287574. rdar://problem/86855896
Modified: branches/safari-613.1.12.1-branch/Source/WebCore/css/StyleProperties.cpp (287637 => 287638)
--- branches/safari-613.1.12.1-branch/Source/WebCore/css/StyleProperties.cpp 2022-01-05 19:09:40 UTC (rev 287637)
+++ branches/safari-613.1.12.1-branch/Source/WebCore/css/StyleProperties.cpp 2022-01-05 19:19:25 UTC (rev 287638)
@@ -35,7 +35,6 @@
#include "CSSValuePool.h"
#include "Color.h"
#include "Document.h"
-#include "Pair.h"
#include "PropertySetCSSStyleDeclaration.h"
#include "StylePropertyShorthand.h"
#include "StylePropertyShorthandFunctions.h"
@@ -323,7 +322,7 @@
return value->cssText();
return String();
case CSSPropertyBorderRadius:
- return borderRadiusValue(borderRadiusShorthand());
+ return get4Values(borderRadiusShorthand());
case CSSPropertyGap:
return get2Values(gapShorthand());
case CSSPropertyScrollMargin:
@@ -367,61 +366,6 @@
return String();
}
-String StyleProperties::borderRadiusValue(const StylePropertyShorthand& shorthand) const
-{
- auto serialize = [](const CSSValue* topLeft, const CSSValue* topRight, const CSSValue* bottomRight, const CSSValue* bottomLeft) -> String {
- bool showBottomLeft = !(*topRight == *bottomLeft);
- bool showBottomRight = !(*topLeft == *bottomRight) || showBottomLeft;
- bool showTopRight = !(*topLeft == *topRight) || showBottomRight;
-
- return makeString(topLeft->cssText(), showTopRight ? " " : "", showTopRight ? topRight->cssText() : "", showBottomRight ? " " : "", showBottomRight ? bottomRight->cssText() : "", showBottomLeft ? " " : "", showBottomLeft ? bottomLeft->cssText() : "");
- };
-
- int topLeftValueIndex = findPropertyIndex(shorthand.properties()[0]);
- int topRightValueIndex = findPropertyIndex(shorthand.properties()[1]);
- int bottomRightValueIndex = findPropertyIndex(shorthand.properties()[2]);
- int bottomLeftValueIndex = findPropertyIndex(shorthand.properties()[3]);
-
- if (topLeftValueIndex == -1 || topRightValueIndex == -1 || bottomRightValueIndex == -1 || bottomLeftValueIndex == -1)
- return String();
-
- PropertyReference topLeft = propertyAt(topLeftValueIndex);
- PropertyReference topRight = propertyAt(topRightValueIndex);
- PropertyReference bottomRight = propertyAt(bottomRightValueIndex);
- PropertyReference bottomLeft = propertyAt(bottomLeftValueIndex);
-
- auto* topLeftValue = topLeft.value();
- if (!topLeftValue)
- return String();
- if (topLeftValue->isCSSWideKeyword())
- return topLeftValue->cssText();
-
- auto* topRightValue = topRight.value();
- auto* bottomRightValue = bottomRight.value();
- auto* bottomLeftValue = bottomLeft.value();
-
- // All 4 properties must be specified and the remaining ones other than topLeftValue are checked here.
- if (!topRightValue || !bottomRightValue || !bottomLeftValue)
- return String();
-
- // Important flags must be the same
- bool isImportant = topLeft.isImportant();
- if (topRight.isImportant() != isImportant || bottomRight.isImportant() != isImportant || bottomLeft.isImportant() != isImportant)
- return String();
-
- auto& topLeftPair = *downcast<CSSPrimitiveValue>(*topLeftValue).pairValue();
- auto& topRightPair = *downcast<CSSPrimitiveValue>(*topRightValue).pairValue();
- auto& bottomRightPair = *downcast<CSSPrimitiveValue>(*bottomRightValue).pairValue();
- auto& bottomLeftPair = *downcast<CSSPrimitiveValue>(*bottomLeftValue).pairValue();
-
- auto first = serialize(topLeftPair.first(), topRightPair.first(), bottomRightPair.first(), bottomLeftPair.first());
- auto second = serialize(topLeftPair.second(), topRightPair.second(), bottomRightPair.second(), bottomLeftPair.second());
- if (first == second)
- return first;
-
- return makeString(first, " / ", second);
-}
-
String StyleProperties::borderSpacingValue(const StylePropertyShorthand& shorthand) const
{
auto horizontalValue = getPropertyCSSValue(shorthand.properties()[0]);
Modified: branches/safari-613.1.12.1-branch/Source/WebCore/css/StyleProperties.h (287637 => 287638)
--- branches/safari-613.1.12.1-branch/Source/WebCore/css/StyleProperties.h 2022-01-05 19:09:40 UTC (rev 287637)
+++ branches/safari-613.1.12.1-branch/Source/WebCore/css/StyleProperties.h 2022-01-05 19:19:25 UTC (rev 287638)
@@ -170,7 +170,6 @@
String getLayeredShorthandValue(const StylePropertyShorthand&) const;
String get2Values(const StylePropertyShorthand&) const;
String get4Values(const StylePropertyShorthand&) const;
- String borderRadiusValue(const StylePropertyShorthand&) const;
String borderSpacingValue(const StylePropertyShorthand&) const;
String fontValue() const;
String fontVariantValue() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes