Closed Bug 1756175 Opened 2 years ago Closed 1 year ago

Implement roundRect for canvas2D

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: aaronhk, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Do you think we need to prioritize this?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(lsalzman)

If it is in the spec and someone wants to go ahead and implement it, I don't see why not, but unless it's a webcompat issue I don't know that it's a distinct priority yet?

Flags: needinfo?(lsalzman)
Severity: S3 → N/A
Priority: -- → P5

Can I work on it?

Can I work on this?

Flags: needinfo?(lsalzman)

(In reply to Deebash D from comment #4)

Can I work on this?

Anyone is welcome to contribute to Mozilla, if they feel they're up to it. If it is your first time contributing code to Mozilla, reviewing https://firefox-source-docs.mozilla.org/setup/contributing_code.html is probably of use.

Flags: needinfo?(lsalzman)
Depends on: 1814235
Blocks: interop-2023

I implemented parts of this, but I probably won't be able to finish this without some help.

  • Bug 1814235 means the current WebIDL as specified doesn't work
  • I don't understand how to support mDSPathBuilder, which seems to require transforming everything?
  • The CanvasPath implementation is missing, but hopefully we can just re-use most of the CanvasRenderingContext2D implementation for that.
No longer blocks: interop-2023

Hi Andrew! Maybe you could give me some hints? See comment 7, especially point two and three.

Flags: needinfo?(aosmond)

(In reply to Tom S [:evilpie] from comment #7)

  • Bug 1814235 means the current WebIDL as specified doesn't work

I landed a fix for this, it should work now. Let me know if you run into any other issues!

Thank you Peter! We are now down to only two failures in the WPT html/canvas/element/path-objects/ test suite, those might be related to the scaling that is supposed to be done in Step 11? The two other questions, particular about mDSPathBuilder remain.

/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html
  FAIL Check that roundRects with intersecting corner arcs are rendered correctly. - assert_equals: Red channel of the pixel at (2, 25) expected 0 but got 63
/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html
  FAIL Check that roundRects with intersecting corner arcs are rendered correctly. - assert_equals: Red channel of the pixel at (1, 1) expected 255 but got 0

Thanks everyone for your hints, we are only with those two failures in comment 10 left now.

Flags: needinfo?(aosmond)
Assignee: nobody → evilpies
Attachment #9315707 - Attachment description: WIP: Bug 1756175 - Implement roundRect → Bug 1756175 - Implement roundRect for canvas2D. r?lsalzman
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/154b792529c2
Implement roundRect for canvas2D. r=lsalzman,emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Regressions: 1818187

FF112 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/25359.
Essentially this is just an MDN release note and browser compatibility data update, since this API is documented.

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

Attachment

General

Created:
Updated:
Size: