Rename imagelib's DrawResult to ImgDrawResult

RESOLVED FIXED in Firefox 59

Status

()

P3
normal
RESOLVED FIXED
2 years ago
9 months ago

People

(Reporter: jwatt, Assigned: samathy)

Tracking

Trunk
mozilla59
Points:
---

Firefox Tracking Flags

(firefox59 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
If mozilla::image::DrawResult is going to be used in many places outside the imagelib code without namespace prefixing (which it already is), it should really have "Img" tacked on to the beginning of its name, or something. Given that this type is used extensively with generic drawing code, not having anything in its name to indicate this is specifically about the drawing of *images* under that generic drawing code makes it far to easy to misinterpret as a general drawing result. (See bug 1351440 for a case in point.)

I think the string "Img" brings to mind the <img> element, which puts people on the right "assumption" path about what information this type is used to carry. That may be a bit overly specific, but it's better than looking like it's a very general thing to do with all painting.
(Assignee)

Comment 1

a year ago
If this has been decided upon (and this bug isnt more of a 'Hey we should consider this')
I'm happy to trawl through and rename DrawResult and all the cases where its used.
Yeah, I think you can go ahead with this.
(Assignee)

Comment 3

a year ago
Does the file DrawResult.h need renaming too, or is it best to leave that be?
We should rename that too. If you are using hg you can use the command "hg move DrawResult.h ImgDrawResult.h" which will preserve blame information instead of just deleting all the lines and then re-adding them to a new file in the diff.
Comment hidden (mozreview-request)
(Assignee)

Comment 6

a year ago
Attached commit updates all the instances of DrawResult to ImgDrawResult and renames the file DrawResult.h to ImgDrawResult.h.
Compiles and runs fine on my Linux machine.

Comment 7

a year ago
mozreview-review
Comment on attachment 8936292 [details]
Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel

https://reviewboard.mozilla.org/r/207028/#review212912
Attachment #8936292 - Flags: review+
Assignee: nobody → samathy

Comment 8

a year ago
Pushed by tnikkel@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8e33d0ce108c
Rename imagelib's DrawResult to ImgDrawResult r=tnikkel

Comment 9

a year ago
Backout by aciure@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6340ede9772
Backed out changeset 8e33d0ce108c for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
Looks like some renames were missed in OS X specific code.
Comment hidden (mozreview-request)
(Assignee)

Comment 13

a year ago
Oops, not sure how I missed that.
Made the change.

I think I've jumped through the right hoops to push another review request.
Flags: needinfo?(samathy)
I triggered a try push.

Comment 15

a year ago
mozreview-review
Comment on attachment 8936292 [details]
Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel

https://reviewboard.mozilla.org/r/207028/#review213124
Attachment #8936292 - Flags: review+

Comment 16

a year ago
Pushed by tnikkel@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4e2cf0afd644
Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel

Comment 17

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4e2cf0afd644
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox59: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
status-firefox55: affected → ---
You need to log in before you can comment on or make changes to this bug.