[css-typed-om] Allow transform values to accept CSSMathValues too.
Currently CSSTranslate, CSSRotate and CSSScale do not accept calc values (CSSMathValues) because it requires type checking the calc value to see if they match the right type [1]. Since type checking and matching are now implemented, we have all the machinery to accept CSSMathValues too. This patch uses CSSNumericValueType.Matches* functions to check if the CSSNumericValues passed in resolve to the right type. We also (re)moved some redundant DCHECKs. We will have a follow up patch for CSSSkew and CSSPerspective. Note that percents are not allowed in CSSTranslation (spec needs edit): https://github.com/w3c/css-houdini-drafts/issues/530 [1] https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-match Specs: https://drafts.css-houdini.org/css-typed-om-1/#dom-csstranslation-csstranslation https://drafts.css-houdini.org/css-typed-om-1/#dom-cssrotation-cssrotation https://drafts.css-houdini.org/css-typed-om-1/#dom-cssrotation-cssrotation-x-y-z-angle https://drafts.css-houdini.org/css-typed-om-1/#dom-cssscale-cssscale Bug: 789370 Change-Id: I6f538a3f07b4c58eb15c9f059c39751e66f64f2f Reviewed-on: https://chromium-review.googlesource.com/812364 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by:meade_UTC10 <meade@chromium.org> Cr-Commit-Position: refs/heads/master@{#523706}
Showing
Please register or sign in to comment