Closed Bug 1823214 Opened 3 years ago Closed 3 years ago

Refactor mul_by function for calc nodes into more generic map function

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: tlouw, Assigned: tlouw)

References

Details

Attachments

(2 files)

The mul_by function for calc nodes does a multiplication on each leaf node in a calc tree. We need to do more operations on each leaf node, e.g. abs, signum, divide, etc.

Change the mul_by fn to a map fn and then we can use that to do mul_by and all the other operations.

Blocks: 1819893

Refactor the mul_by function into a more generic map function that can
be used for more operations like abs, signum and mul.

Assignee: nobody → tlouw
Attachment #9323804 - Attachment description: WIP: Bug 1823214 - Refactor mul_by fn into map fn. r=emilio,#layout-reviewers → Bug 1823214 - Refactor mul_by fn into map fn. r=emilio,#layout-reviewers
Status: NEW → ASSIGNED

Remove now dead Mul implementations. Use Self rather than the whole type
to shrink a bit the code.

Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e159a61ff71 Refactor mul_by fn into map fn. r=emilio
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/92224387c48d Minor clean ups on top of the previous patch. r=tlouw
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: