Closed Bug 1516727 Opened 5 years ago Closed 5 years ago

Having classes called SVGAngle and nsSVGAngle is confusing

Categories

(Core :: SVG, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: longsonr, Assigned: longsonr)

Details

Attachments

(4 files)

      No description provided.
Assignee: nobody → longsonr
Attachment #9033598 - Flags: review?(dholbert)
Attachment #9033598 - Attachment is patch: true
Comment on attachment 9033598 [details] [diff] [review]
Part 1 - simplify creation of SVGAngle objects

Review of attachment 9033598 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/svg/SVGAngle.cpp
@@ +19,5 @@
> +SVGAngle::SVGAngle(SVGElement* aSVGElement)
> +    : mSVGElement(aSVGElement), mType(SVGAngle::CreatedValue) {
> +  nsSVGAngle* angle = new nsSVGAngle();
> +  angle->Init();
> +  mVal = angle;

Given that we don't check for a failure status from Init() you could just assign directly to mVal here.

::: dom/svg/SVGSVGElement.cpp
@@ +266,1 @@
>    return svgangle.forget();

You could use:

  return do_AddRef(new SVGAngle(this));
Attachment #9033598 - Flags: review?(dholbert) → review+
Priority: -- → P3
Keywords: leave-open
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f534d2edbd06
Part 1 simplify creation of SVGAngle objects r=jwatt
Comment on attachment 9033682 [details] [diff] [review]
Part 2 - Rename SVGAngle to DOMSVGAngle

Review of attachment 9033682 [details] [diff] [review]:
-----------------------------------------------------------------

Can you run `./mach clang-format` before requesting review for future patches? (I'm assuming you're all set up to be able to run that.) Not a big deal, but it's nice to see the patch as it will land.

::: dom/svg/SVGSVGElement.cpp
@@ +14,5 @@
>  #include "mozilla/EventDispatcher.h"
>  #include "mozilla/SMILAnimationController.h"
>  
> +#include "DOMSVGAngle.h"
> +#include "DOMSVGAngle.h"

No need to repeat this. ;)
Attachment #9033682 - Flags: review?(jwatt) → review+
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/43b1e9034e34
Part 2 rename SVGAngle to DOMSVGAngle r=jwatt
Attachment #9033716 - Flags: review?(jwatt) → review+
Keywords: leave-open
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e43ba4cbf93
Part 3 rename nsSVGAngle to SVGAngle r=jwatt
https://hg.mozilla.org/mozilla-central/rev/5e43ba4cbf93
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → NEW
I mistakenly thought it was already in the mozilla namespace like nsSVGTransform, but apparently not.
Attachment #9033872 - Flags: review?(jwatt)
Attachment #9033872 - Flags: review?(jwatt) → review+
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9196c1cefbb
Part 4 move SVGAngle to the mozilla namespace r=jwatt
https://hg.mozilla.org/mozilla-central/rev/a9196c1cefbb
Status: NEW → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: