Closed Bug 822846 Opened 12 years ago Closed 11 years ago

Use nsMimeTypes.h in imagelib instead of working with literal strings

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file, 6 obsolete files)

Bug 547707 seems to have removed a lot of uses of literal strings for mime types in Gecko, but we still have some left over in imagelib, as Ms2ger points out in bug 815471 comment 18. Let's get rid of those.
Assignee: nobody → seth
Proposed patch. I was very aggressive here and converted over _every_ occurrence of a mime type in imagelib. This still needs testing on try before review.
Trivial fix: remove a now-unneeded extern declaration.
Attachment #693659 - Attachment is obsolete: true
Try is 100% green. Requesting review.
Attachment #693709 - Flags: review?(joe)
Attachment #693709 - Attachment is obsolete: true
Attachment #693709 - Flags: review?(joe)
Try job for rebased version here: https://tbpl.mozilla.org/?tree=Try&rev=0956f88e7341
Attachment #694045 - Flags: review?(joe) → review+
We have a 100% green try and an r+. Requesting checkin.
Keywords: checkin-needed
Backed out for Windows build bustage.
https://hg.mozilla.org/integration/mozilla-inbound/rev/660750a95f60

https://tbpl.mozilla.org/php/getParsedLog.php?id=18223213&tree=Mozilla-Inbound

nsImageModule.cpp

c:\tools\sdks\v7.0\include\winuser.h(8986) : warning C4005: 'IMAGE_ICON' : macro redefinition

        e:\builds\moz2_slave\m-in-w32\build\obj-firefox\dist\include\nsMimeTypes.h(100) : see previous definition of 'IMAGE_ICON'

e:\builds\moz2_slave\m-in-w32\build\obj-firefox\dist\include\jmorecfg.h(201) : warning C4005: 'FAR' : macro redefinition

        c:\tools\sdks\v7.0\include\windef.h(146) : see previous definition of 'FAR'

e:\builds\moz2_slave\m-in-w32\build\image\src\BMPFileHeaders.h(38) : warning C4005: 'LCS_sRGB' : macro redefinition

        c:\tools\sdks\v7.0\include\wingdi.h(613) : see previous definition of 'LCS_sRGB'

e:/builds/moz2_slave/m-in-w32/build/image/build/nsImageModule.cpp(81) : error C2440: 'initializing' : cannot convert from 'int' to 'const char *'

        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Renamed IMAGE_ICON to IMAGE_ICON_MS to avoid a clash with a system header file on Windows. New try job here: https://tbpl.mozilla.org/?tree=Try&rev=1d81c5952783
Attachment #694045 - Attachment is obsolete: true
Went ahead and did a rebase while I was at it. Try is having problems so I'll have a new try job up later.
Attachment #696836 - Attachment is obsolete: true
That didn't do it. Let's try this again...
Attachment #696838 - Attachment is obsolete: true
Try seems to be OK. Let's give this another shot. Requesting checkin.
Keywords: checkin-needed
To make checkin easier I went ahead and rebased this patch; there was an unrelated change that prevented it from applying cleanly. Shouldn't require another try run (someone had just changed 'struct' to 'class').
Attachment #697728 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/1b5445f3ff22
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: