Skip to content

Truly independent web browser

LibWeb: Alias -webkit-clip-path and -webkit-font-feature-settings

sideshowbarker68ce7221cf17
diff --git a/Libraries/LibWeb/CSS/Properties.json b/Libraries/LibWeb/CSS/Properties.json
index 4bb06e5ec73..a762db08577 100644
--- a/Libraries/LibWeb/CSS/Properties.json
+++ b/Libraries/LibWeb/CSS/Properties.json
@@ -97,6 +97,9 @@
"-webkit-box-sizing": {
"legacy-alias-for": "box-sizing"
},
+ "-webkit-clip-path": {
+ "legacy-alias-for": "clip-path"
+ },
"-webkit-filter": {
"legacy-alias-for": "filter"
},
@@ -121,6 +124,9 @@
"-webkit-flex-wrap": {
"legacy-alias-for": "flex-wrap"
},
+ "-webkit-font-feature-settings": {
+ "legacy-alias-for": "font-feature-settings"
+ },
"-webkit-font-smoothing": {
"style-group": "InheritedTextValues",
"affects-layout": false,
diff --git a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt
index f8fd9515853..ca3f0d0d128 100644
--- a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt
+++ b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt
@@ -89,6 +89,9 @@ All supported properties and their default values exposed from CSSStylePropertie
'WebkitBoxSizing': 'content-box'
'webkitBoxSizing': 'content-box'
'-webkit-box-sizing': 'content-box'
+'WebkitClipPath': 'none'
+'webkitClipPath': 'none'
+'-webkit-clip-path': 'none'
'WebkitFilter': 'none'
'webkitFilter': 'none'
'-webkit-filter': 'none'
@@ -113,6 +116,9 @@ All supported properties and their default values exposed from CSSStylePropertie
'WebkitFlexWrap': 'nowrap'
'webkitFlexWrap': 'nowrap'
'-webkit-flex-wrap': 'nowrap'
+'WebkitFontFeatureSettings': 'normal'
+'webkitFontFeatureSettings': 'normal'
+'-webkit-font-feature-settings': 'normal'
'WebkitFontSmoothing': 'auto'
'webkitFontSmoothing': 'auto'
'-webkit-font-smoothing': 'auto'
diff --git a/Tests/LibWeb/Text/expected/css/webkit-clip-path-and-font-feature-settings-aliases.txt b/Tests/LibWeb/Text/expected/css/webkit-clip-path-and-font-feature-settings-aliases.txt
new file mode 100644
index 00000000000..cee65239750
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/css/webkit-clip-path-and-font-feature-settings-aliases.txt
@@ -0,0 +1,6 @@
+CSS.supports("-webkit-font-feature-settings", '"tnum"'): true
+CSS.supports("-webkit-clip-path", "none"): true
+font-feature-settings: "tnum"
+-webkit-font-feature-settings: "tnum"
+clip-path: polygon(0px 0px, 100% 0px, 50% 100%)
+-webkit-clip-path: polygon(0px 0px, 100% 0px, 50% 100%)
diff --git a/Tests/LibWeb/Text/input/css/webkit-clip-path-and-font-feature-settings-aliases.html b/Tests/LibWeb/Text/input/css/webkit-clip-path-and-font-feature-settings-aliases.html
new file mode 100644
index 00000000000..42665aee085
--- /dev/null
+++ b/Tests/LibWeb/Text/input/css/webkit-clip-path-and-font-feature-settings-aliases.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>
+ #a {
+ -webkit-font-feature-settings: "tnum";
+ }
+ #b {
+ -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
+ }
+</style>
+<span id="a">0123</span>
+<div id="b">b</div>
+<script src="../include.js"></script>
+<script>
+ test(() => {
+ const a = getComputedStyle(document.getElementById("a"));
+ const b = getComputedStyle(document.getElementById("b"));
+ println(`CSS.supports("-webkit-font-feature-settings", '"tnum"'): ${CSS.supports("-webkit-font-feature-settings", '"tnum"')}`);
+ println(`CSS.supports("-webkit-clip-path", "none"): ${CSS.supports("-webkit-clip-path", "none")}`);
+ println(`font-feature-settings: ${a.fontFeatureSettings}`);
+ println(`-webkit-font-feature-settings: ${a.getPropertyValue("-webkit-font-feature-settings")}`);
+ println(`clip-path: ${b.clipPath}`);
+ println(`-webkit-clip-path: ${b.getPropertyValue("-webkit-clip-path")}`);
+ });
+</script>