Skip to content

Commit f5a77d7

Browse files
committed
Bug 1950076 [wpt PR 50903] - [functions] Parameters with defaults need not be trailing (WPT), a=testonly
Automatic update from web-platform-tests [functions] Parameters with defaults need not be trailing (WPT) It's syntactically valid to define a function where a parameter without a default appears after a parameter with a default, for example: function --foo(--x:1px, --y, --z:2px) { ... } There is currently no way to actually invoke such a function while making use of the non-trailing defaults, but apparently this may change in the future if we rework how IACVT works for arguments. Invoking --foo(var(--unknown), 42px) would make the containing declaration invalid at computed-value time, but in the future the argument may "capture" this invalid state, and instead trigger the default. Bug: 389974127 Change-Id: I8d7c41bde2401ac89ec0a011f098e6051772f7b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6281007 Commit-Queue: Anders Hartvoll Ruud <andruudchromium.org> Reviewed-by: Steinar H Gunderson <sessechromium.org> Cr-Commit-Position: refs/heads/main{#1423827} -- wpt-commits: f2615dc6260757b8eb634d19383184031c6e7022 wpt-pr: 50903 UltraBlame original commit: 1fd66911aa07c7e6cbb708fc169e84919364c079
1 parent 7e573f3 commit f5a77d7

File tree

2 files changed

+175
-0
lines changed

2 files changed

+175
-0
lines changed

testing/web-platform/tests/css/css-mixins/at-function-parsing.html

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,71 @@
909909
;
910910
/
911911
/
912+
A
913+
parameter
914+
without
915+
a
916+
default
917+
may
918+
appear
919+
after
920+
a
921+
parameter
922+
with
923+
/
924+
/
925+
a
926+
default
927+
even
928+
though
929+
there
930+
'
931+
s
932+
no
933+
way
934+
to
935+
actually
936+
call
937+
-
938+
-
939+
foo
940+
(
941+
)
942+
/
943+
/
944+
with
945+
just
946+
-
947+
-
948+
y
949+
:
950+
test_valid_prelude
951+
(
952+
'
953+
function
954+
-
955+
-
956+
foo
957+
(
958+
-
959+
-
960+
x
961+
:
962+
1px
963+
-
964+
-
965+
y
966+
-
967+
-
968+
z
969+
:
970+
2px
971+
)
972+
'
973+
)
974+
;
975+
/
976+
/
912977
The
913978
value
914979
does

testing/web-platform/tests/css/css-mixins/dashed-function-eval.html

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3985,6 +3985,116 @@
39853985
template
39863986
>
39873987
<
3988+
template
3989+
data
3990+
-
3991+
name
3992+
=
3993+
"
3994+
Unknown
3995+
var
3996+
(
3997+
)
3998+
in
3999+
argument
4000+
makes
4001+
declaration
4002+
IACVT
4003+
"
4004+
>
4005+
<
4006+
!
4007+
-
4008+
-
4009+
Note
4010+
:
4011+
In
4012+
the
4013+
future
4014+
this
4015+
may
4016+
be
4017+
changed
4018+
to
4019+
instead
4020+
trigger
4021+
the
4022+
default
4023+
for
4024+
-
4025+
-
4026+
x
4027+
.
4028+
-
4029+
-
4030+
>
4031+
<
4032+
style
4033+
>
4034+
function
4035+
-
4036+
-
4037+
f
4038+
(
4039+
-
4040+
-
4041+
x
4042+
:
4043+
1px
4044+
)
4045+
{
4046+
result
4047+
:
4048+
var
4049+
(
4050+
-
4051+
-
4052+
x
4053+
)
4054+
;
4055+
}
4056+
#
4057+
target
4058+
{
4059+
-
4060+
-
4061+
actual
4062+
:
4063+
-
4064+
-
4065+
f
4066+
(
4067+
var
4068+
(
4069+
-
4070+
-
4071+
unknown
4072+
)
4073+
)
4074+
;
4075+
/
4076+
*
4077+
-
4078+
-
4079+
expected
4080+
:
4081+
<
4082+
guaranteed
4083+
-
4084+
invalid
4085+
>
4086+
*
4087+
/
4088+
}
4089+
<
4090+
/
4091+
style
4092+
>
4093+
<
4094+
/
4095+
template
4096+
>
4097+
<
39884098
!
39894099
-
39904100
-

0 commit comments

Comments
 (0)