Skip to content
Permalink
Browse files
Don't index shorthands in computed styles
https://bugs.webkit.org/show_bug.cgi?id=240356

Reviewed by Tim Nguyen.

Most shorthands were already not indexed, but legacy shorthands with a
single longhand were indexed. This didn't make much sense, since they
are like aliases with a different syntax, and aliases are not indexed.

Tests: fast/css/getComputedStyle/computed-style.html
       fast/css/getComputedStyle/computed-style-without-renderer.html
       imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
       imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html
       imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html
       svg/css/getComputedStyle-basic.xhtml

Canonical link: https://commits.webkit.org/250955@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Loirooriol committed May 25, 2022
1 parent c3876a1 commit f6f23c0f9bd5a33a8bd441fea8644abe136e8910
Showing 14 changed files with 47 additions and 110 deletions.
@@ -38,6 +38,9 @@ border-top-width: 0px;
bottom: auto;
box-shadow: none;
box-sizing: content-box;
break-after: auto;
break-before: auto;
break-inside: auto;
buffered-rendering: auto;
caption-side: top;
clear: none;
@@ -144,9 +147,6 @@ padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
page-break-after: auto;
page-break-before: auto;
page-break-inside: auto;
paint-order: normal;
perspective: none;
perspective-origin: 392px 288px;
@@ -182,6 +182,7 @@ text-emphasis-color: rgb(0, 0, 0);
text-emphasis-position: over right;
text-emphasis-style: none;
text-indent: 0px;
text-orientation: mixed;
text-overflow: clip;
text-rendering: auto;
text-shadow: none;
@@ -225,9 +226,6 @@ zoom: 1;
-webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-column-axis: auto;
-webkit-column-break-after: auto;
-webkit-column-break-before: auto;
-webkit-column-break-inside: auto;
-webkit-font-smoothing: auto;
-webkit-hyphenate-character: auto;
-webkit-hyphenate-limit-after: auto;
@@ -251,7 +249,6 @@ zoom: 1;
-webkit-nbsp-mode: normal;
-webkit-rtl-ordering: logical;
-webkit-text-fill-color: rgb(0, 0, 0);
-webkit-text-orientation: mixed;
-webkit-text-security: none;
-webkit-text-stroke-color: rgb(0, 0, 0);
-webkit-text-stroke-width: 0px;
@@ -37,6 +37,9 @@ border-top-width: 16px
bottom: auto
box-shadow: none
box-sizing: content-box
break-after: auto
break-before: auto
break-inside: auto
buffered-rendering: auto
caption-side: top
clear: none
@@ -143,9 +146,6 @@ padding-bottom: 0px
padding-left: 0px
padding-right: 0px
padding-top: 0px
page-break-after: auto
page-break-before: auto
page-break-inside: auto
paint-order: normal
perspective: none
perspective-origin: 50% 50%
@@ -181,6 +181,7 @@ text-emphasis-color: rgb(0, 0, 0)
text-emphasis-position: over right
text-emphasis-style: none
text-indent: 0px
text-orientation: mixed
text-overflow: clip
text-rendering: auto
text-shadow: none
@@ -224,9 +225,6 @@ zoom: 1
-webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-column-axis: auto
-webkit-column-break-after: auto
-webkit-column-break-before: auto
-webkit-column-break-inside: auto
-webkit-font-smoothing: auto
-webkit-hyphenate-character: auto
-webkit-hyphenate-limit-after: auto
@@ -250,7 +248,6 @@ zoom: 1
-webkit-nbsp-mode: normal
-webkit-rtl-ordering: logical
-webkit-text-fill-color: rgb(0, 0, 0)
-webkit-text-orientation: mixed
-webkit-text-security: none
-webkit-text-stroke-color: rgb(0, 0, 0)
-webkit-text-stroke-width: 0px
@@ -29,10 +29,10 @@ var propertiesToTest = {
"-webkit-box-pack": true,
"-webkit-box-reflect": true,
"-webkit-box-shadow": true,
"break-after": true,
"break-before": true,
"break-inside": true,
"-webkit-column-axis": true,
"-webkit-column-break-after": true,
"-webkit-column-break-before": true,
"-webkit-column-break-inside": true,
"column-count": true,
"column-fill": true,
"column-gap": true,
@@ -102,7 +102,7 @@ var propertiesToTest = {
"text-emphasis-position": true,
"text-emphasis-style": true,
"-webkit-text-fill-color": true,
"-webkit-text-orientation": true,
"text-orientation": true,
"-webkit-text-security": true,
"-webkit-text-stroke-color": true,
"-webkit-text-stroke-width": true,
@@ -228,9 +228,6 @@ var propertiesToTest = {
"padding-left": true,
"padding-right": true,
"padding-top": true,
"page-break-after": true,
"page-break-before": true,
"page-break-inside": true,
"paint-order": true,
"pointer-events": true,
"position": true,
@@ -234,9 +234,6 @@ PASS padding-inline-start
PASS padding-left
PASS padding-right
PASS padding-top
PASS page-break-after
PASS page-break-before
PASS page-break-inside
PASS paint-order
PASS perspective
PASS perspective-origin
@@ -294,10 +291,8 @@ PASS table-layout
PASS text-align
PASS text-anchor
PASS text-combine-upright
PASS text-decoration
PASS text-decoration-color
PASS text-decoration-line
PASS text-decoration-skip
PASS text-decoration-skip-ink
PASS text-decoration-style
PASS text-decoration-thickness
@@ -360,9 +355,6 @@ PASS -webkit-box-pack
PASS -webkit-box-reflect
PASS -webkit-box-shadow
PASS -webkit-column-axis
PASS -webkit-column-break-after
PASS -webkit-column-break-before
PASS -webkit-column-break-inside
PASS -webkit-column-progression
PASS -webkit-cursor-visibility
PASS -webkit-font-smoothing
@@ -390,12 +382,10 @@ PASS -webkit-mask-position-x
PASS -webkit-mask-position-y
PASS -webkit-mask-source-type
PASS -webkit-nbsp-mode
PASS -webkit-perspective
PASS -webkit-rtl-ordering
PASS -webkit-ruby-position
PASS -webkit-text-combine
PASS -webkit-text-fill-color
PASS -webkit-text-orientation
PASS -webkit-text-security
PASS -webkit-text-size-adjust
PASS -webkit-text-stroke-color
@@ -231,9 +231,6 @@ PASS padding-inline-start
PASS padding-left
PASS padding-right
PASS padding-top
PASS page-break-after
PASS page-break-before
PASS page-break-inside
PASS paint-order
PASS perspective
PASS perspective-origin
@@ -290,10 +287,8 @@ PASS table-layout
PASS text-align
PASS text-anchor
PASS text-combine-upright
PASS text-decoration
PASS text-decoration-color
PASS text-decoration-line
PASS text-decoration-skip
PASS text-decoration-skip-ink
PASS text-decoration-style
PASS text-decoration-thickness
@@ -1,8 +1,8 @@

PASS getComputedStyle returns no style for detached element
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 401
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 401
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 401
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 401
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 391
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 391
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 391
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 391
PASS getComputedStyle returns no style for shadow tree outside of flattened tree

@@ -234,9 +234,6 @@ PASS padding-inline-start
PASS padding-left
PASS padding-right
PASS padding-top
PASS page-break-after
PASS page-break-before
PASS page-break-inside
PASS paint-order
PASS perspective
PASS perspective-origin
@@ -294,10 +291,8 @@ PASS table-layout
PASS text-align
PASS text-anchor
PASS text-combine-upright
PASS text-decoration
PASS text-decoration-color
PASS text-decoration-line
PASS text-decoration-skip
PASS text-decoration-skip-ink
PASS text-decoration-style
PASS text-decoration-thickness
@@ -358,9 +353,6 @@ PASS -webkit-box-pack
PASS -webkit-box-reflect
PASS -webkit-box-shadow
PASS -webkit-column-axis
PASS -webkit-column-break-after
PASS -webkit-column-break-before
PASS -webkit-column-break-inside
PASS -webkit-column-progression
PASS -webkit-cursor-visibility
PASS -webkit-font-smoothing
@@ -388,13 +380,11 @@ PASS -webkit-mask-position-x
PASS -webkit-mask-position-y
PASS -webkit-mask-source-type
PASS -webkit-nbsp-mode
PASS -webkit-perspective
PASS -webkit-rtl-ordering
PASS -webkit-ruby-position
PASS -webkit-tap-highlight-color
PASS -webkit-text-combine
PASS -webkit-text-fill-color
PASS -webkit-text-orientation
PASS -webkit-text-security
PASS -webkit-text-stroke-color
PASS -webkit-text-stroke-width
@@ -1,8 +1,8 @@

PASS getComputedStyle returns no style for detached element
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 399
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 399
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 399
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 399
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 389
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 389
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 389
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 389
PASS getComputedStyle returns no style for shadow tree outside of flattened tree

@@ -1,8 +1,8 @@

PASS getComputedStyle returns no style for detached element
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 403
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 403
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 403
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 403
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 393
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 393
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 393
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 393
PASS getComputedStyle returns no style for shadow tree outside of flattened tree

@@ -231,9 +231,6 @@ PASS padding-inline-start
PASS padding-left
PASS padding-right
PASS padding-top
PASS page-break-after
PASS page-break-before
PASS page-break-inside
PASS paint-order
PASS perspective
PASS perspective-origin
@@ -289,10 +286,8 @@ PASS table-layout
PASS text-align
PASS text-anchor
PASS text-combine-upright
PASS text-decoration
PASS text-decoration-color
PASS text-decoration-line
PASS text-decoration-skip
PASS text-decoration-skip-ink
PASS text-decoration-style
PASS text-decoration-thickness
@@ -234,9 +234,6 @@ PASS padding-inline-start
PASS padding-left
PASS padding-right
PASS padding-top
PASS page-break-after
PASS page-break-before
PASS page-break-inside
PASS paint-order
PASS perspective
PASS perspective-origin
@@ -294,10 +291,8 @@ PASS table-layout
PASS text-align
PASS text-anchor
PASS text-combine-upright
PASS text-decoration
PASS text-decoration-color
PASS text-decoration-line
PASS text-decoration-skip
PASS text-decoration-skip-ink
PASS text-decoration-style
PASS text-decoration-thickness
@@ -358,9 +353,6 @@ PASS -webkit-box-pack
PASS -webkit-box-reflect
PASS -webkit-box-shadow
PASS -webkit-column-axis
PASS -webkit-column-break-after
PASS -webkit-column-break-before
PASS -webkit-column-break-inside
PASS -webkit-column-progression
PASS -webkit-font-smoothing
PASS -webkit-hyphenate-character
@@ -387,13 +379,11 @@ PASS -webkit-mask-position-x
PASS -webkit-mask-position-y
PASS -webkit-mask-source-type
PASS -webkit-nbsp-mode
PASS -webkit-perspective
PASS -webkit-rtl-ordering
PASS -webkit-ruby-position
PASS -webkit-tap-highlight-color
PASS -webkit-text-combine
PASS -webkit-text-fill-color
PASS -webkit-text-orientation
PASS -webkit-text-security
PASS -webkit-text-stroke-color
PASS -webkit-text-stroke-width
@@ -1,8 +1,8 @@

PASS getComputedStyle returns no style for detached element
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 398
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 398
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 398
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 398
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 388
FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 388
FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 388
FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 388
PASS getComputedStyle returns no style for shadow tree outside of flattened tree

0 comments on commit f6f23c0

Please sign in to comment.