Title: [262627] trunk
- Revision
- 262627
- Author
- commit-qu...@webkit.org
- Date
- 2020-06-05 10:22:07 -0700 (Fri, 05 Jun 2020)
Log Message
CSS Variables: Color on specific `border` properties does not work.
https://bugs.webkit.org/show_bug.cgi?id=211672
Patch by Tyler Wilcock <twilc...@protonmail.com> on 2020-06-05
Reviewed by Antti Koivisto.
Source/WebCore:
Properly mark CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, and CSSPropertyBorderInlineEnd as
direction-aware properties in CSSProperty::isDirectionAwareProperty. Also reordered a few properties in this switch so it's more
alphabetically ordered. Prior to this change, CSS variables were not able to be resolved when used in these properties.
Test: fast/borders/logical-border-props-with-variables.html
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isDirectionAwareProperty):
Add CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, CSSPropertyBorderInlineEnd.
LayoutTests:
Add test verifying CSS variables work as values in the `border-block-start`, `border-block-end`, `border-inline-start`, and `border-inline-end` properties.
* fast/borders/logical-border-props-with-variables.html: Added.
* fast/borders/logical-border-props-with-variables-expected.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (262626 => 262627)
--- trunk/LayoutTests/ChangeLog 2020-06-05 17:15:47 UTC (rev 262626)
+++ trunk/LayoutTests/ChangeLog 2020-06-05 17:22:07 UTC (rev 262627)
@@ -1,3 +1,15 @@
+2020-06-05 Tyler Wilcock <twilc...@protonmail.com>
+
+ CSS Variables: Color on specific `border` properties does not work.
+ https://bugs.webkit.org/show_bug.cgi?id=211672
+
+ Reviewed by Antti Koivisto.
+
+ Add test verifying CSS variables work as values in the `border-block-start`, `border-block-end`, `border-inline-start`, and `border-inline-end` properties.
+
+ * fast/borders/logical-border-props-with-variables.html: Added.
+ * fast/borders/logical-border-props-with-variables-expected.html: Added.
+
2020-06-05 Jacob Uphoff <jacob_uph...@apple.com>
[ macOS wk1 ] http/tests/media/reload-after-dialog.html is a flaky failure
Added: trunk/LayoutTests/fast/borders/logical-border-props-with-variables-expected.html (0 => 262627)
--- trunk/LayoutTests/fast/borders/logical-border-props-with-variables-expected.html (rev 0)
+++ trunk/LayoutTests/fast/borders/logical-border-props-with-variables-expected.html 2020-06-05 17:22:07 UTC (rev 262627)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <link rel="author" title="Tyler Wilcock" href=""
+ <meta name="assert" content="There is a 50px solid green border line around all sides of the div." />
+ <style>
+ div {
+ width: 100px;
+ height: 100px;
+ border-block-start: 50px solid green;
+ border-block-end: 50px solid green;
+ border-inline-start: 50px solid green;
+ border-inline-end: 50px solid green;
+ }
+ </style>
+</head>
+<body>
+ <div>
+ </div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/borders/logical-border-props-with-variables.html (0 => 262627)
--- trunk/LayoutTests/fast/borders/logical-border-props-with-variables.html (rev 0)
+++ trunk/LayoutTests/fast/borders/logical-border-props-with-variables.html 2020-06-05 17:22:07 UTC (rev 262627)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>
+ Test for https://bugs.webkit.org/show_bug.cgi?id=211672. The intention of this test is to ensure variables are
+ usable as values in the `border-block-start`, `border-block-end`, `border-inline-start`, and `border-inline-end`
+ properties.
+ </title>
+ <link rel="author" title="Tyler Wilcock" href=""
+ <meta name="assert" content="There is a 50px solid green border line around all sides of the div." />
+ <style>
+ div {
+ width: 100px;
+ height: 100px;
+ --border-width-px: 50px;
+ --border-style: solid;
+ --border-color: green;
+ border-block-start: var(--border-width-px) var(--border-style) var(--border-color);
+ border-block-end: var(--border-width-px) var(--border-style) var(--border-color);
+ border-inline-start: var(--border-width-px) var(--border-style) var(--border-color);
+ border-inline-end: var(--border-width-px) var(--border-style) var(--border-color);
+ }
+ </style>
+</head>
+<body>
+ <div>
+ </div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (262626 => 262627)
--- trunk/Source/WebCore/ChangeLog 2020-06-05 17:15:47 UTC (rev 262626)
+++ trunk/Source/WebCore/ChangeLog 2020-06-05 17:22:07 UTC (rev 262627)
@@ -1,3 +1,20 @@
+2020-06-05 Tyler Wilcock <twilc...@protonmail.com>
+
+ CSS Variables: Color on specific `border` properties does not work.
+ https://bugs.webkit.org/show_bug.cgi?id=211672
+
+ Reviewed by Antti Koivisto.
+
+ Properly mark CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, and CSSPropertyBorderInlineEnd as
+ direction-aware properties in CSSProperty::isDirectionAwareProperty. Also reordered a few properties in this switch so it's more
+ alphabetically ordered. Prior to this change, CSS variables were not able to be resolved when used in these properties.
+
+ Test: fast/borders/logical-border-props-with-variables.html
+
+ * css/CSSProperty.cpp:
+ (WebCore::CSSProperty::isDirectionAwareProperty):
+ Add CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, CSSPropertyBorderInlineEnd.
+
2020-06-05 Andres Gonzalez <andresg...@apple.com>
AXIsolatedTree::updateChildren should not call nodeForID.
Modified: trunk/Source/WebCore/css/CSSProperty.cpp (262626 => 262627)
--- trunk/Source/WebCore/css/CSSProperty.cpp 2020-06-05 17:15:47 UTC (rev 262626)
+++ trunk/Source/WebCore/css/CSSProperty.cpp 2020-06-05 17:22:07 UTC (rev 262627)
@@ -176,18 +176,22 @@
bool CSSProperty::isDirectionAwareProperty(CSSPropertyID propertyID)
{
switch (propertyID) {
+ case CSSPropertyBorderBlockEnd:
+ case CSSPropertyBorderBlockEndColor:
+ case CSSPropertyBorderBlockEndStyle:
+ case CSSPropertyBorderBlockEndWidth:
+ case CSSPropertyBorderBlockStart:
+ case CSSPropertyBorderBlockStartColor:
+ case CSSPropertyBorderBlockStartStyle:
+ case CSSPropertyBorderBlockStartWidth:
+ case CSSPropertyBorderInlineEnd:
case CSSPropertyBorderInlineEndColor:
case CSSPropertyBorderInlineEndStyle:
case CSSPropertyBorderInlineEndWidth:
+ case CSSPropertyBorderInlineStart:
case CSSPropertyBorderInlineStartColor:
case CSSPropertyBorderInlineStartStyle:
case CSSPropertyBorderInlineStartWidth:
- case CSSPropertyBorderBlockStartColor:
- case CSSPropertyBorderBlockStartStyle:
- case CSSPropertyBorderBlockStartWidth:
- case CSSPropertyBorderBlockEndColor:
- case CSSPropertyBorderBlockEndStyle:
- case CSSPropertyBorderBlockEndWidth:
case CSSPropertyInsetInlineEnd:
case CSSPropertyInsetInlineStart:
case CSSPropertyInsetBlockStart:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes