Commit 95da8776 authored by ZER0's avatar ZER0
Browse files

Bug 1391014 - take in account the ancestor's transformation too for the current matrix; r=gl

MozReview-Commit-ID: Dc4DU3wPzU8

--HG--
extra : rebase_source : ba22fb39f0415a565167f2da21970acc4e78cdbc
parent a33ac3ff
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ exports.isIdentity = isIdentity;

/**
 * Returns the transformation matrix for the given node, relative to the ancestor passed
 * as second argument.
 * as second argument; considering the ancestor transformation too.
 * If no ancestor is specified, it will returns the transformation matrix relative to the
 * node's parent element.
 *
@@ -132,7 +132,8 @@ exports.isIdentity = isIdentity;
 *        The transformation matrix.
 */
function getNodeTransformationMatrix(node, ancestor = node.parentElement) {
  let { a, b, c, d, e, f } = node.getTransformToAncestor(ancestor);
  let { a, b, c, d, e, f } = ancestor.getTransformToParent()
                                     .multiply(node.getTransformToAncestor(ancestor));

  return [
    a, c, e,