Skip to content

Commit

Permalink
Bug 1442142 [wpt PR 9731] - [css-typed-om] Fix computed value of an i…
Browse files Browse the repository at this point in the history
…nterpolated transform., a=testonly

Automatic update from web-platform-tests[css-typed-om] Fix computed value of an interpolated transform.

Previously we did not handle the case of computing the value of an
interpolated transform, which occurs when we interpolate between
two different transform types containing percentages.

The correct result is currently not spec'd [1], so this patch fixes this
by just returning "none" in this case.

[1] w3c/css-houdini-drafts#425

Bug: 816803
Change-Id: I97c8f6b71f651a8d547fb4cb307121eba7dabdb6
Reviewed-on: https://chromium-review.googlesource.com/942595
Reviewed-by: nainar <nainarchromium.org>
Commit-Queue: Darren Shen <shendchromium.org>
Cr-Commit-Position: refs/heads/master{#540258}

wpt-commits: a77669c83cc75fcec4df6e46f6a07edf8c20d1a4
wpt-pr: 9731
wpt-commits: a77669c83cc75fcec4df6e46f6a07edf8c20d1a4
wpt-pr: 9731

UltraBlame original commit: 945ce59d8db798c3a827709f0069b54735ab7349
  • Loading branch information
marco-c committed Oct 2, 2019
1 parent 5590bcf commit 315effe
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -316852,6 +316852,12 @@
{}
]
],
"css/css-typed-om/the-stylepropertymap/properties/transform-interpolated.html": [
[
"/css/css-typed-om/the-stylepropertymap/properties/transform-interpolated.html",
{}
]
],
"css/css-typed-om/the-stylepropertymap/properties/transform.html": [
[
"/css/css-typed-om/the-stylepropertymap/properties/transform.html",
Expand Down Expand Up @@ -521213,6 +521219,10 @@
"218b50f6b7d8209514bca8d0a8121263b07ab1e2",
"testharness"
],
"css/css-typed-om/the-stylepropertymap/properties/transform-interpolated.html": [
"85cbf6daa2686a518566e4ccbfc2ba39197b190e",
"testharness"
],
"css/css-typed-om/the-stylepropertymap/properties/transform.html": [
"2723b6d3e9a213a1b33e9ecfafd5fd42eb8bca33",
"testharness"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<meta charset="utf-8">
<title>'transform' property with an interpolated value</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/testhelper.js"></script>
<body>
<div id="log"></div>
<script>
'use strict';

// TODO: Try to support this sort of test with testsuite.js
test(t => {
let elem = createDivWithStyle(t);
elem.animate({
transform: ['translate(1px, 1%)', 'rotate(45deg)']
}, {
fill: 'forwards',
iterationStart: 0.5,
});

// TODO: The computed value in this case is not fully spec'd
// See https://github.com/w3c/css-houdini-drafts/issues/425
const result = elem.computedStyleMap().get('transform');
assert_not_equals(result, null);
}, 'Computed value for interpolated transforms is not null');

</script>

0 comments on commit 315effe

Please sign in to comment.