Bug 246913 - [web-animations] handle blending of layout-dependent <transform-list> values
Summary: [web-animations] handle blending of layout-dependent <transform-list> values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on: 246937
Blocks: 222096
  Show dependency treegraph
 
Reported: 2022-10-23 03:02 PDT by Antoine Quint
Modified: 2024-03-05 18:35 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2022-10-23 03:02:01 PDT
We're failing a subtest in web-animations/interfaces/Animation/commitStyles.html:

test(t => {
  const div = createDiv(t);
  div.style.width = '200px';
  div.style.height = '200px';

  const animation = div.animate({ transform: ["translate(100%, 0%)", "scale(3)"] }, 1000);
  animation.currentTime = 500;
  animation.commitStyles();
  animation.cancel();

  assert_equals(getComputedStyle(div).transform, "matrix(2, 0, 0, 2, 100, 0)",
      "Resolved transform is correct after commit.");
}, 'Commits matrix-interpolated relative transforms');

Our current result is "matrix(2, 0, 0, 2, 0, 0)" because when we blend under commitStyles() layout has not happened yet for the div and the bounds passed to resolve the 100% translation value is 0,0.
Comment 1 Antoine Quint 2022-10-23 03:08:19 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5684
Comment 2 Antoine Quint 2022-10-24 01:33:10 PDT
Performing a layout should not be required to pass this test, I wrote all the details in https://github.com/WebKit/WebKit/pull/5684#issuecomment-1288636644.
Comment 3 Antoine Quint 2022-10-24 02:42:19 PDT
We'll need mix() support, I filed https://bugs.webkit.org/show_bug.cgi?id=246937. Retitling this bug to correctly identify the issue.
Comment 4 Radar WebKit Bug Importer 2022-10-30 03:02:17 PDT
<rdar://problem/101725429>