Closed Bug 1331857 Opened 7 years ago Closed 7 years ago

Create a base class for CanvasRenderingContext2D

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: kechen, Assigned: kechen)

References

Details

Attachments

(1 file, 3 obsolete files)

According to Bug 1318573 comment 21, we need a base class for CanvasRenderingContext2D and PaintRenderingContext2D.

I will extract the base class in this bug and do the following refactor work back in Bug 1318573 so that I won't block by rebasing the patches.
Fix some tailing spaces and indents.

George,
Could you help me to review this ?
Thank you.
Attachment #8827763 - Attachment is obsolete: true
Attachment #8827763 - Flags: review?(gwright)
Attachment #8827770 - Flags: review?(gwright)
From IRC:

03:12 <gw280> so at the moment it looks like all you're doing is renaming CanvasRenderingContext2D to BasicRenderingContext2D
03:13 <gw280> and CRC2D is just a null implementation of BRC2D
03:13 <gw280> this seems pointless to me
03:13 <gw280> can we figure out what common components can be put into BRC2D and what CRC2D-specific stuff can go in there?
03:13 <gw280> at the very least, I'd rather we made BRC2D a pure virtual class and CRC2D stays the same, but now implements BRC2D
03:14 <gw280> I'd rather avoid a situation where we're moving a lot of our code and moving code history between files for no real reason
Attachment #8827770 - Flags: review?(gwright)
Hello George, can you help me to review it ?
Or do you think we should just land this patch back in Bug 1318573 ?
The purpose of filing this bug is to separate the function migrations part by part so that I don't have to wait every migrations get reviewed before I land it.
Attachment #8827770 - Attachment is obsolete: true
Attachment #8829789 - Flags: review?(gwright)
Attachment #8829789 - Flags: review?(gwright) → review+
There are some errors on try server with this patch.
I will examine the patch and request the review again.
Hello George,

I add virtual keyword to CRC2 to prevent some Werror and change the order of the inheritance to prevent nsISupport assertion.
Could you help me to review it again ?
Attachment #8829789 - Attachment is obsolete: true
Attachment #8833195 - Flags: review?(gwright)
Here is the try run, the error seems irrelevant to this modify.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=276917ab4bbb2c896ba385601993f31de762d2fb
Attachment #8833195 - Flags: review?(gwright) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/17414d851efb
Create class BasicRenderingContext2D. r=gwright
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/17414d851efb
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: