Closed Bug 1627014 Opened 4 years ago Closed 3 years ago

Implement `CanvasRenderingContext2D.createConicGradient`

Categories

(Core :: Graphics: Canvas2D, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: ntim, Assigned: aryanagal98, Mentored)

References

Details

(Keywords: dev-doc-complete, good-first-bug, Whiteboard: [lang=c++])

Attachments

(1 file, 2 obsolete files)

Type: defect → enhancement
Priority: -- → P3
Mentor: emilio
Whiteboard: [lang=c++]
Keywords: good-first-bug
No longer blocks: conic-gradients
Depends on: conic-gradients

What needs to be done here:

  • Basically, checking out https://phabricator.services.mozilla.com/D69465, and rebasing it to trunk (or doing the same changes on top of trunk).
  • Adding a new pref near here. It has to be a RelaxedAtomicBool pref, and name should probably be canvas.createConicGradient.enabled or such. Default value should be true, and mirror can be always, I think it's fine as long as we send an intent email as per the exposure guidelines (I can take care of that bit once the patch is ready to land).
  • Changing the [Pref="..."] on top of the new function in CanvasRenderingContext2D.webidl to use [Pref="canvas.createConicGradient.enabled"].
  • Running the html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.html test, and ensure it passes with your changes. You can do this with ./mach wpt html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.html
  • Since it should start passing, testing/web-platform/meta/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.html.ini should be removed.
  • Check whether we need to do the same with html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html, and the similar metadata (not sure off-hand what's the state of our OffscreenCanvas implementation.

I think that should be it. Feel free to ask questions if you get stuck or something doesn't work as expected. Tim, can you sanity-check and confirm I haven't missed anything?

Flags: needinfo?(ntim.bugs)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

I think that should be it. Feel free to ask questions if you get stuck or something doesn't work as expected. Tim, can you sanity-check and confirm I haven't missed anything?

Sounds fine to me. I'm unsure what graphics backend canvas is using, but should be fine as long as it's not Cairo.

Flags: needinfo?(ntim.bugs)

Added an option to use ConicGradient API as a preference and removed the corresponding expected FAILing test, over @ntim's implementation.

Assignee: nobody → aryanagal98
Status: NEW → ASSIGNED
Attachment #9194949 - Attachment description: Bug 1627104 - Implement CanvasRenderingContext2D.createConicGradient r?ntim,emilio → Bug 1627014 - Implement CanvasRenderingContext2D.createConicGradient r?ntim,emilio
Attachment #9137899 - Attachment is obsolete: true

Added an option to use ConicGradient API as a preference and removed the
corresponding expected FAILing test, over @ntim's implementation.

Attachment #9194989 - Attachment is obsolete: true
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cdd65df84242
Implement CanvasRenderingContext2D.createConicGradient r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch

Rumyra documented this, and her work looks fantastic! See

Please let us know if you think anything else is needed here.

Blocks: 1711724
You need to log in before you can comment on or make changes to this bug.