Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-overscroll-behavior] Parsing, serialization #13873

Merged

Conversation

ewilligers
Copy link
Contributor

Spec:
https://drafts.csswg.org/css-overscroll-behavior/#property-index

Blink currently fails the proposed serialization
tests for the overscroll-behavior shorthand, as it
is not following the following guideline:

https://drafts.csswg.org/cssom/#serializing-css-values
If component values can be omitted or replaced with a shorter
representation without changing the meaning of the value,
omit/replace them.

Spec:
https://drafts.csswg.org/css-overscroll-behavior/#property-index

Blink currently fails the proposed serialization
tests for the overscroll-behavior shorthand, as it
is not following the following guideline:

https://drafts.csswg.org/cssom/#serializing-css-values
If component values can be omitted or replaced with a shorter
representation without changing the meaning of the value,
omit/replace them.
</head>
<body>
<script>
test_invalid_value("overscroll-behavior-y", "normal");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I feel these can be merged with "-x" version. e.g.,

for (let property of ["overscroll-behavior-x", "overscroll-behavior-y"]) {
test_invalid_value(property, "normal");
// ...
}

The required control flow is a simple loop which is IMHO quite acceptable to enable parametrized test logic.
We are going to add {inline, block} version of these and I think it will be easier to maintain these tests if we just have one version for all for properties.

Again this is just a nit and I am not an expert in css parsing tests so feel free to ignore my advice if you have strong opinion for the more verbose style.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved the longhand tests into overscroll-behavior-valid.html and overscroll-behavior-invalid.html.

<meta charset="utf-8">
<title>CSS Overscroll Behavior: parsing overscroll-behavior-x with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-x/#propdef-overscroll-behavior-x">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace: drafts.csswg.org/css-overscroll-behavior-x with drafts.csswg.org/css-overscroll-behavior in the spec url.

<meta charset="utf-8">
<title>CSS Overscroll Behavior: parsing overscroll-behavior-x with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-x/#propdef-overscroll-behavior-x">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace: drafts.csswg.org/css-overscroll-behavior-x with drafts.csswg.org/css-overscroll-behavior in the spec url.

Copy link
Member

@majido majido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these tests. These look great!

looks good to me % a few nits.

<meta charset="utf-8">
<title>CSS Overscroll Behavior: parsing overscroll-behavior-y with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-y/#propdef-overscroll-behavior-y">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace: drafts.csswg.org/css-overscroll-behavior-y with drafts.csswg.org/css-overscroll-behavior in the spec url.

<meta charset="utf-8">
<title>CSS Overscroll Behavior: parsing overscroll-behavior-y with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-y/#propdef-overscroll-behavior-y">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace: drafts.csswg.org/css-overscroll-behavior-y with drafts.csswg.org/css-overscroll-behavior in the spec url.

@majido
Copy link
Member

majido commented Feb 8, 2019

Once these land I am happy to fix the Blink side of this.

@ewilligers ewilligers force-pushed the overscroll-behavior-parsing branch from d2aba1c to 3a874ed Compare February 8, 2019 01:45
@ewilligers ewilligers merged commit 7d971ce into web-platform-tests:master Feb 8, 2019
@ewilligers ewilligers deleted the overscroll-behavior-parsing branch February 8, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants