Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
jogibear9988 committed Jul 28, 2025
commit 75d652de86038430e579088a2ad4c908ff0667ed
6 changes: 3 additions & 3 deletions cssom-view-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1863,13 +1863,13 @@ typedef (Text or Element or CSSPseudoElement or Document) GeometryNode;

The helper method getCompleteTransform(anchestor) must run the following steps:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to get the element as a parameter, and use <div algorithm> for this for example:

<div algorithm="get the complete transform">
  In order to <dfn export>get the complete transform</dfn> of an node <var>node</var> relative to a node <var>ancestor</ancestor> ...
</div>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added node to helper function

<ol>
1. let currentElement be the element getCompleteTransform() called on.
1. let currentElement be the anchestor parameter.
2. let transformationMatrix be the current transformation matrix of currentElement (https://www.w3.org/TR/css-transforms-2/#ctm)
3. while currentElement is not null do
<ol>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need the <ol>?

1. create a translation matrix from the currentElement offsetLeft and offsetTop
2. multiply the matrix from 4. with the transformationMatrix and store the result in transformationMatrix
3. assign currentElement offsetParent to currentElement
3. assign the offsetParent of the currentElement to currentElement
4. let parentTransformationMatrix be the current transformation matrix of currentElement (https://www.w3.org/TR/css-transforms-2/#ctm)
5. multiply the parentTransformationMatrix with the transformationMatrix and store in transformationMatrix
6. if currentElement is the anchestor or the anchestor is null return the transformationMatrix
Expand Down Expand Up @@ -1914,7 +1914,7 @@ The <dfn method for=GeometryUtils lt="convertPointFromNode(point, from, options)
method must run the following steps:

<ol>
1. get the resulting matrix between the element and the document.defaultView via the algorithm defined in getCompleteTransform
1. get the resulting matrix between the node and the document.defaultView via the algorithm defined in getCompleteTransform
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give these meaningful names like:

 * Let <var>thisTransformToViewport</var> be the result of calling [=getCompleteTransform=] with <var>this</var> and <var>this</var>' [=associated document=].
 * Let <var>fromTransformToViewport</var> be the result of ...
 * Invert <var>fromTransformToViewport</var>.
 * ...

Then reference those.

2. get the resulting matrix between the from and the document.defaultView via the algorithm defined in getCompleteTransform
3. inverse the matrix in 2.
4. Depending on the value of options.fromBox modify the point with the calculated style values of the element.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use <var>point</var> etc.

Expand Down