Closed Bug 1683723 Opened 4 years ago Closed 4 years ago

Fix warnings about deprecated enum names (NSControlSizeSmall, NSEventModifierFlagDeviceIndependentFlagsMask, ...) in widget/cocoa

Categories

(Core :: Widget: Cocoa, task)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

These warnings were "caused" by the switch to the 10.12 SDK in bug 1680152.

I'm planning to make these replacements:

NSAlphaShiftKeyMask: NSEventModifierFlagCapsLock
NSAlternateKeyMask: NSEventModifierFlagOption
NSAnyEventMask: NSEventMaskAny
NSApplicationDefined: NSEventTypeApplicationDefined
NSBorderlessWindowMask: NSWindowStyleMaskBorderless
NSCenterTextAlignment: NSTextAlignmentCenter
NSClosableWindowMask: NSWindowStyleMaskClosable
NSCommandKeyMask: NSEventModifierFlagCommand
NSCompositeCopy: NSCompositingOperationCopy
NSControlKeyMask: NSEventModifierFlagControl
NSDeviceIndependentModifierFlagsMask: NSEventModifierFlagDeviceIndependentFlagsMask
NSFlagsChanged: NSEventTypeFlagsChanged
NSFullScreenWindowMask: NSWindowStyleMaskFullScreen
NSFullSizeContentViewWindowMask: NSWindowStyleMaskFullSizeContentView
NSFunctionKeyMask: NSEventModifierFlagFunction
NSHelpKeyMask: NSEventModifierFlagHelp
NSKeyDown: NSEventTypeKeyDown
NSKeyUp: NSEventTypeKeyUp
NSLeftMouseDown: NSEventTypeLeftMouseDown
NSLeftMouseDownMask: NSEventMaskLeftMouseDown
NSLeftMouseDragged: NSEventTypeLeftMouseDragged
NSLeftMouseUp: NSEventTypeLeftMouseUp
NSMiniaturizableWindowMask: NSWindowStyleMaskMiniaturizable
NSMiniControlSize: NSControlSizeMini
NSMouseEntered: NSEventTypeMouseEntered
NSMouseExited: NSEventTypeMouseExited
NSMouseMoved: NSEventTypeMouseMoved
NSNumericPadKeyMask: NSEventModifierFlagNumericPad
NSOtherMouseDown: NSEventTypeOtherMouseDown
NSOtherMouseDownMask: NSEventMaskOtherMouseDown
NSOtherMouseDragged: NSEventTypeOtherMouseDragged
NSOtherMouseUp: NSEventTypeOtherMouseUp
NSRegularControlSize: NSControlSizeRegular
NSResizableWindowMask: NSWindowStyleMaskResizable
NSRightMouseDown: NSEventTypeRightMouseDown
NSRightMouseDragged: NSEventTypeRightMouseDragged
NSRightMouseUp: NSEventTypeRightMouseUp
NSRightTextAlignment: NSTextAlignmentRight
NSScrollWheel: NSEventTypeScrollWheel
NSScrollWheelMask: NSEventMaskScrollWheel
NSShiftKeyMask: NSEventModifierFlagShift
NSSmallControlSize: NSControlSizeSmall
NSTabletPointEventSubtype: NSEventSubtypeTabletPoint
NSTitledWindowMask: NSWindowStyleMaskTitled
Type: task → defect
Type: defect → task
Depends on: 1680152
Keywords: regression
No longer regressed by: 1680152

I ran the following command:

rg -l 'NSAlphaShiftKeyMask' . | xargs sed -i '' -e 's/NSAlphaShiftKeyMask/NSEventModifierFlagCapsLock/g'
rg -l 'NSAlternateKeyMask' . | xargs sed -i '' -e 's/NSAlternateKeyMask/NSEventModifierFlagOption/g'
rg -l 'NSAnyEventMask' . | xargs sed -i '' -e 's/NSAnyEventMask/NSEventMaskAny/g'
rg -l 'NSApplicationDefined' . | xargs sed -i '' -e 's/NSApplicationDefined/NSEventTypeApplicationDefined/g'
rg -l 'NSBorderlessWindowMask' . | xargs sed -i '' -e 's/NSBorderlessWindowMask/NSWindowStyleMaskBorderless/g'
rg -l 'NSCenterTextAlignment' . | xargs sed -i '' -e 's/NSCenterTextAlignment/NSTextAlignmentCenter/g'
rg -l 'NSClosableWindowMask' . | xargs sed -i '' -e 's/NSClosableWindowMask/NSWindowStyleMaskClosable/g'
rg -l 'NSCommandKeyMask' . | xargs sed -i '' -e 's/NSCommandKeyMask/NSEventModifierFlagCommand/g'
rg -l 'NSCompositeCopy' . | xargs sed -i '' -e 's/NSCompositeCopy/NSCompositingOperationCopy/g'
rg -l 'NSControlKeyMask' . | xargs sed -i '' -e 's/NSControlKeyMask/NSEventModifierFlagControl/g'
rg -l 'NSDeviceIndependentModifierFlagsMask' . | xargs sed -i '' -e 's/NSDeviceIndependentModifierFlagsMask/NSEventModifierFlagDeviceIndependentFlagsMask/g'
rg -l 'NSFlagsChanged' . | xargs sed -i '' -e 's/NSFlagsChanged/NSEventTypeFlagsChanged/g'
rg -l 'NSFullScreenWindowMask' . | xargs sed -i '' -e 's/NSFullScreenWindowMask/NSWindowStyleMaskFullScreen/g'
rg -l 'NSFullSizeContentViewWindowMask' . | xargs sed -i '' -e 's/NSFullSizeContentViewWindowMask/NSWindowStyleMaskFullSizeContentView/g'
rg -l 'NSFunctionKeyMask' . | xargs sed -i '' -e 's/NSFunctionKeyMask/NSEventModifierFlagFunction/g'
rg -l 'NSHelpKeyMask' . | xargs sed -i '' -e 's/NSHelpKeyMask/NSEventModifierFlagHelp/g'
rg -l 'NSKeyDown' . | xargs sed -i '' -e 's/NSKeyDown/NSEventTypeKeyDown/g'
rg -l 'NSKeyUp' . | xargs sed -i '' -e 's/NSKeyUp/NSEventTypeKeyUp/g'
rg -l 'NSLeftMouseDown' . | xargs sed -i '' -e 's/NSLeftMouseDown/NSEventTypeLeftMouseDown/g'
rg -l 'NSLeftMouseDownMask' . | xargs sed -i '' -e 's/NSLeftMouseDownMask/NSEventMaskLeftMouseDown/g'
rg -l 'NSLeftMouseDragged' . | xargs sed -i '' -e 's/NSLeftMouseDragged/NSEventTypeLeftMouseDragged/g'
rg -l 'NSLeftMouseUp' . | xargs sed -i '' -e 's/NSLeftMouseUp/NSEventTypeLeftMouseUp/g'
rg -l 'NSMiniaturizableWindowMask' . | xargs sed -i '' -e 's/NSMiniaturizableWindowMask/NSWindowStyleMaskMiniaturizable/g'
rg -l 'NSMiniControlSize' . | xargs sed -i '' -e 's/NSMiniControlSize/NSControlSizeMini/g'
rg -l 'NSMouseEntered' . | xargs sed -i '' -e 's/NSMouseEntered/NSEventTypeMouseEntered/g'
rg -l 'NSMouseExited' . | xargs sed -i '' -e 's/NSMouseExited/NSEventTypeMouseExited/g'
rg -l 'NSMouseMoved' . | xargs sed -i '' -e 's/NSMouseMoved/NSEventTypeMouseMoved/g'
rg -l 'NSNumericPadKeyMask' . | xargs sed -i '' -e 's/NSNumericPadKeyMask/NSEventModifierFlagNumericPad/g'
rg -l 'NSOtherMouseDown' . | xargs sed -i '' -e 's/NSOtherMouseDown/NSEventTypeOtherMouseDown/g'
rg -l 'NSOtherMouseDownMask' . | xargs sed -i '' -e 's/NSOtherMouseDownMask/NSEventMaskOtherMouseDown/g'
rg -l 'NSOtherMouseDragged' . | xargs sed -i '' -e 's/NSOtherMouseDragged/NSEventTypeOtherMouseDragged/g'
rg -l 'NSOtherMouseUp' . | xargs sed -i '' -e 's/NSOtherMouseUp/NSEventTypeOtherMouseUp/g'
rg -l 'NSRegularControlSize' . | xargs sed -i '' -e 's/NSRegularControlSize/NSControlSizeRegular/g'
rg -l 'NSResizableWindowMask' . | xargs sed -i '' -e 's/NSResizableWindowMask/NSWindowStyleMaskResizable/g'
rg -l 'NSRightMouseDown' . | xargs sed -i '' -e 's/NSRightMouseDown/NSEventTypeRightMouseDown/g'
rg -l 'NSRightMouseDragged' . | xargs sed -i '' -e 's/NSRightMouseDragged/NSEventTypeRightMouseDragged/g'
rg -l 'NSRightMouseUp' . | xargs sed -i '' -e 's/NSRightMouseUp/NSEventTypeRightMouseUp/g'
rg -l 'NSRightTextAlignment' . | xargs sed -i '' -e 's/NSRightTextAlignment/NSTextAlignmentRight/g'
rg -l 'NSScrollWheel' . | xargs sed -i '' -e 's/NSScrollWheel/NSEventTypeScrollWheel/g'
rg -l 'NSScrollWheelMask' . | xargs sed -i '' -e 's/NSScrollWheelMask/NSEventMaskScrollWheel/g'
rg -l 'NSShiftKeyMask' . | xargs sed -i '' -e 's/NSShiftKeyMask/NSEventModifierFlagShift/g'
rg -l 'NSSmallControlSize' . | xargs sed -i '' -e 's/NSSmallControlSize/NSControlSizeSmall/g'
rg -l 'NSTabletPointEventSubtype' . | xargs sed -i '' -e 's/NSTabletPointEventSubtype/NSEventSubtypeTabletPoint/g'
rg -l 'NSTitledWindowMask' . | xargs sed -i '' -e 's/NSTitledWindowMask/NSWindowStyleMaskTitled/g'

Then I removed changes to third-party webrtc code, removed a comment in accessible/mac/mozAccessible.mm,
and performed some manual replacements in native_mouse_mac_window.xhtml.

Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/f2e28ce82fe6 Replace deprecated Cocoa enum constants with their modern replacements. r=spohl
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Blocks: 1691166
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: