-
Notifications
You must be signed in to change notification settings - Fork 676
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-transforms] Smarter interpolation of truncated transform lists #927
Comments
This seems to be the key suggestion from the linked thread.
My interpretation of this is that |
Propose moving to level 2. |
The CSS Working Group just discussed Smarter interpolation of truncated lists, and agreed to the following resolutions:
The full IRC log of that discussion
|
That resolution wording is obtuse, but I think means that we resolved to make the behavior change in transforms-1. |
We started implementing this in Firefox but I'm a little unclear about the intention of this change. In the IRC log I see the comment:
but in the spec change we seem to only handle mismatched lists where the functions of the shorter one match primitives of the longer. i.e. it seemed like we were initially looking at allowing It may well be that the spec change deliberately doesn't allow the "common prefix" behavior due to compatibility concerns but I'd like to confirm we've understood the intention here since it's not clear to me from the IRC log what the outcome was. |
@birtles From the proposal and the discussion, the spec change does not fully support the requested "smoosh". According to the discussion above this could either be by:
Both do not sound ideal to me. The latter mostly because we need to define an algorithm where and when to add neutral transformations. At the first glance this might sound intuitive but really isn't. I wasn't in the discussion but what @smfr added seems to be logical and matching the behavior of other CSS properties:
|
Yeah, it seems to be reasonable. I just wanted to check if the spec change was intentionally different from what the discussion seemed to conclude. |
My interpretation of the discussion was that both of Dirk's suggestions should be used:
So @birtles' example should work as they expect - |
@tabatkins Yes, phrased it wrong. I am just suspicious about
Where should missing/differing functions be added? Simple example:
Potentially both algorithms would replace matrix decomposition for the majority of cases. The complex algorithm needs to get implemented in an interoperable way in all UAs as well. Given how long even smaller changes in the spec took, it might be a while and I expect that we will see some additional feedback from UAs after implementing. |
Like I just outlined, you fix length mismatches by adding neutral transforms to the end of the shorter list. In your example, no fixup is possible. They're the same length, and have no common prefix, so you still just go straight to matrix interpolation. |
@tabatkins Oh got it. The common transform function primitive is there already and adding neutral transform functions at the end of the list was added recently. The proposal in #927 (comment) and the question from @birtles #927 (comment) goes adds an additional step: If there is a mismatch between 2 transform function pairs (no common primitive): Instead of multiplying all transform functions into one matrix before decomposing the suggestion is to do the matrix interpolation part only between not matching transform function pairs. An additional question I have for that proposal:
|
I think the simplest thing is to collapse the rest once you have a mismatch. That's also the minimal change from the current behavior for things that differ early; they can't accidentally get "back on track" and change behavior. |
The Working Group just discussed The full IRC log of that discussion<dael> Topic: Smarter interpolation of truncated transform lists<dael> github: https://github.com//issues/927 <dael> krit: There's one issue on smart interpolation for transform functions. You have to interpolate when there's an animation. Usually they have to have same paremeters to map. Every time those functions do not match tehre is matrix interpolation <dael> krit: Previous we allowed the transforms to be of differnet size. As long as they map to same size we do the interpolation per transform function. Concern was this wasn't good enough <dael> krit: In this issue request is interpolation per transform function as long as they match with each other. If they do not match we do matrix intrp but just for the ones that come after the non-mathcing <dael> krit: Support from TabAtkins , request from smfr to defer to L2. I think we keep what we have b/c it's interop. <dael> krit: I don't think we can defer because it would change animation in certain situations. Doesn't happen too often that you don't have 2 matching and an animation. <dael> krit: So do we agree to this proposal? Or do we keep the current spec text where everything multiplied to a matrix. <dael> krit: Complex, but important for animations <dael> krit: Questions on what hte request is? <dael> fantasai: I agree with making the animations do closer to what authors expect and making them more powerful in terms of accurate representation. In favor of the change. <dael> fantasai: Only question I have is we're using the prefix and padding the end with additional ID transforms. Do we want to allow...if the end of the transform list matches rather then the beginning. You don't interopalte ones you don't have, but if one sequenence is a subset allow padding on either side? <dael> krit: There are requests to make it smarter, but it's complicated. YOu have to find the pattern and there might be multiple ptterns so you have to decide. <dael> fantasai: I'm suggesting it has to be exact match. If you have multiple we pick a rule like match against the first one. <dael> krit: I'm a bit confused. You want them to match on start or end and only if same length? <dael> fantasai: Different, but only if one is an exact subset of the other. <dael> krit: List 1 is a subset of list 2 <dael> fantasai: Yes <dael> krit: And only beginning or end or also middle? <dael> fantasai: Both. Middle or end. <dael> dbaron: I worry matching in middle will be harder to understand. We want behavior to be good and understandable and expected. Matching in the middle feels...oh, it'llrandomly search, but only if you have an exact match of seq. I think there's value in doing something simple and explainable. <dael> fantasai: Okay. That's fine. I wanted to know if it was thought through <dael> krit: Does the issue in question have support? everything matches at the beginning but not end so we do matrix for the things that do not match at end? <dael> fantasai: Seems fine <dael> krit: Looking for browser impl feedback as that's not impl <dael> krit: If people need time it's fine, but input at some point would be great. <dael> Rossen_: smfr isn't on the call. We are going to make this change as a part of transforms L1, right? <dael> krit: Yes, need to for L1 because if we do L2 there will be unexpected repercussions for Animations <dael> Rossen_: Do people feel they need more time? Can we resolve now and reopen if needed? Preference? <dael> Rossen_: Objections to...krit? <dael> krit: I'm not proposing. I'm in favor of not changing text <dael> Rossen_: Proposal: No change to the current specification <dael> krit: Only b/c it's impl currently <dael> Rossen_: Objections to stay with current impl behavior and not change transforms L1? <dael> fantasai: We've talked about if we make this change it should be L1. <dael> krit: Correct <dael> Rossen_: Yes if we make the change it should be L1. <dael> fantasai: So asking to not change ever? <dael> Rossen_: No, we can defer this to L2 but for L1 we can stay with current impl solution in the spec. <dael> fantasai: If you want to eventually make this change, why not put it in L1? <dael> krit: Depends on impl interest. If there isn't doesn't make sense to put it in. <dael> fantasai: I don't think it makes sense to decide if we're putting in L1. If we do it it should go in L1. We can put it in L1 and mark as at-risk. This is a WD still. <dael> fantasai: The longer that we don't impl, content...this is a change in an existing deployed feature. If we want a change we should do it sooner rather than later. Waiting doesn't seem should do <dael> Rossen_: But I'm not hearing impl step up. <dael> florian: Then we shouldn't have it at all rather than have it in L2 <dael> Rossen_: And that's the no change resolution. Don't impl it. <dael> Rossen_: Any interest in working on this feature? If not we can resolve on rejecting it. <dael> fantasai: Note that birtles and TabAtkins aren't here. Can anyone represent their positions? <dael> Rossen_: People from Mozilla or Chrome on? <dael> Rossen_: none to represent this issue <dael> fantasai: I recommend that given they're not here and critical we resolve on if we do it this is how and then the question of do we do it waits until next week. <dael> Rossen_: We can try and get to this in F2F <dael> fantasai: You can resolve on how interpolation happens <dael> Rossen_: Prefer not to in absense of the people you mentioned. If will discuss at F2F let's do it at that time. <fantasai> s/absense/absence/ |
The Working Group just discussed
The full IRC log of that discussion<Rossen> Topic: [css-transforms] Smarter interpolation of truncated transform lists<Rossen> github: https://github.com//issues/927 <ericwilligers_> Brian: (summarizing) There was a proposal for when we have mismatched transform lists to do something smarter than matrix interpolation <ericwilligers_> Brian: We resolved on some behavior (April 2017) but when implementing, spec text did not match what was discussed in WG. <ericwilligers_> Brian: We implemented what is in spec text but we want to do something smarter: interpolate common denominator and use matrix interpolation for the remainder <ericwilligers_> s/denominator/prefix/ <ericwilligers_> dirk: do other implementers also want to change? <ericwilligers_> dino: we should do this: go as far as you can, smoosh the rest <ericwilligers_> ian: will have to check with Waterloo team <ericwilligers_> rossen: no objection <ericwilligers_> pad the shorter one with identity functions, find the common prefix. <ericwilligers_> interpolate common prefix pairwise, interpolate the rest matrix-wise <ericwilligers_> dirk: proposal from fantasai to do the same from the right if they have a common suffix. <ericwilligers_> tab: don't like it - common to have ambiguous situations <ericwilligers_> dirk: agree <ericwilligers_> tab: prefer prefix over suffix, prefer not to try to do both <birtles> I agree <ericwilligers_> RESOLVED: pad the shorter one with identity functions, find the common prefix, interpolate common prefix pairwise, interpolate the rest matrix-wise. |
Gecko bug for updating this. |
One different idea, possibly bad, but figured I'd throw it out there just in case: Matrix interpolation looks far worse for angle-based (rotate and skew) transforms than the rest. What if we try to match those up and interpolate the rest via matrix interpolation? |
… interpolation behavior This fixes w3c#927.
…or transform lists; r=hiro As discussed in: w3c/csswg-drafts#927 with tentative spec text: w3c/csswg-drafts#3215 Depends on D9184 Differential Revision: https://phabricator.services.mozilla.com/D9185 --HG-- extra : moz-landing-system : lando
…sform lists. As discussed in: w3c/csswg-drafts#927 with tentative spec text: w3c/csswg-drafts#3215 Differential Revision: https://phabricator.services.mozilla.com/D9185
… interpolation behavior This fixes w3c#927.
… interpolation behavior This fixes #927.
It turns out this change breaks the header on Channel News Asia. See webcompat/web-bugs#23687 |
…or transform lists; r=hiro As discussed in: w3c/csswg-drafts#927 with tentative spec text: w3c/csswg-drafts#3215 Depends on D9184 Differential Revision: https://phabricator.services.mozilla.com/D9185 UltraBlame original commit: 660b4ee6c9133fb2fb9fee9d70cf0e8d9b04051a
…or transform lists; r=hiro As discussed in: w3c/csswg-drafts#927 with tentative spec text: w3c/csswg-drafts#3215 Depends on D9184 Differential Revision: https://phabricator.services.mozilla.com/D9185 UltraBlame original commit: 660b4ee6c9133fb2fb9fee9d70cf0e8d9b04051a
…or transform lists; r=hiro As discussed in: w3c/csswg-drafts#927 with tentative spec text: w3c/csswg-drafts#3215 Depends on D9184 Differential Revision: https://phabricator.services.mozilla.com/D9185 UltraBlame original commit: 660b4ee6c9133fb2fb9fee9d70cf0e8d9b04051a
https://www.w3.org/mid/CALXxKfCKZd+P0mH2oFyDkBgps56WqwQnLSMpKk1nrqiFXScqVA@mail.gmail.com
https://www.w3.org/mid/CAAWBYDBPafEbiXNy=Mw4a9w1jmvK6dUJzq28PPjN7APgtjqAEw@mail.gmail.com
Need to decide what goes into Level 1, and what to call the new identify functions. Related to #898
The text was updated successfully, but these errors were encountered: