Bug
1821727: Refactor NativeLayerCA clip rect geometry calcuations. r=mstange
This creates a new method that is used in ApplyChanges and DumpLayer to
calculate the clip rect geometry. Along the way, it eliminates some
redundant outputs:
1) effectiveClip is just a holder of both the position and bounds of the
clip, which are applied seperately by the caller, so the new function
returns them seperately.
2) clipToLayerOffset is just the unscaled negated value of the clip
position, and the only place it is used can tolerate doing the math at the
point of use.
It also reorganizes the logic in DumpLayer a bit to more cleanly separate
the parts that output the wrapping div from the parts that output the img.
It also replaces the use of NS constants with CG constants in
ApplyChanges, for consistency. Hopefully this makes it more clear that
when the clip rect is set and then later unset, the wrapper layer is
restored to its original condition.
Unfortunately, it also re-lints the files it touches, which were somehow
out of compliance with current linting rules, so the changes look much
more extensive than they are.
Differential Revision: https://phabricator.services.mozilla.com/
D172289