Ignore deprecation warnings.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Mar 2016 21:02:09 +0000 (21:02 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Mar 2016 21:02:09 +0000 (21:02 +0000)
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::stopNSAppRunLoop):
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent):
(WebKit::mouseEventTypeForEvent):
(WebKit::clickCountForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
(WebKit::textFromEvent):
(WebKit::unmodifiedTextFromEvent):
(WebKit::isKeypadEvent):
(WebKit::isKeyUpEvent):
(WebKit::modifiersForEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toNSEventModifierFlags):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
(WebKit::WebViewImpl::createFullScreenWindow):
(WebKit::WebViewImpl::sendToolTipMouseExited):
(WebKit::WebViewImpl::sendToolTipMouseEntered):
(WebKit::applicationFlagsForDrag):
(WebKit::WebViewImpl::setLastMouseDownEvent):
(WebKit::WebViewImpl::doneWithKeyEvent):
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
(WebKit::WebViewImpl::performKeyEquivalent):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::beginModal):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate):
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::modifierFlagsFromWebEvent):
(WebKit::getEventTypeFromWebEvent):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::cssAlignmentValueForNSTextAlignment):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::convertImageToBitmap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/ChildProcessMac.mm
Source/WebKit2/Shared/mac/WebEventFactory.mm
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm
Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm
Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm

index 787c5e5..543005a 100644 (file)
@@ -1,3 +1,53 @@
+2016-03-08  Anders Carlsson  <andersca@apple.com>
+
+        Ignore deprecation warnings.
+
+        * Shared/mac/ChildProcessMac.mm:
+        (WebKit::ChildProcess::stopNSAppRunLoop):
+        * Shared/mac/WebEventFactory.mm:
+        (WebKit::mouseButtonForEvent):
+        (WebKit::mouseEventTypeForEvent):
+        (WebKit::clickCountForEvent):
+        (WebKit::globalPointForEvent):
+        (WebKit::pointForEvent):
+        (WebKit::textFromEvent):
+        (WebKit::unmodifiedTextFromEvent):
+        (WebKit::isKeypadEvent):
+        (WebKit::isKeyUpEvent):
+        (WebKit::modifiersForEvent):
+        (WebKit::WebEventFactory::createWebKeyboardEvent):
+        * UIProcess/API/Cocoa/WKNavigationAction.mm:
+        (toNSEventModifierFlags):
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::becomeFirstResponder):
+        (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
+        (WebKit::WebViewImpl::viewDidMoveToWindow):
+        (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
+        (WebKit::WebViewImpl::createFullScreenWindow):
+        (WebKit::WebViewImpl::sendToolTipMouseExited):
+        (WebKit::WebViewImpl::sendToolTipMouseEntered):
+        (WebKit::applicationFlagsForDrag):
+        (WebKit::WebViewImpl::setLastMouseDownEvent):
+        (WebKit::WebViewImpl::doneWithKeyEvent):
+        (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
+        (WebKit::WebViewImpl::performKeyEquivalent):
+        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+        (WebKit::PluginProcessProxy::beginModal):
+        * UIProcess/mac/WebContextMenuProxyMac.mm:
+        (WebKit::WebContextMenuProxyMac::showContextMenu):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformCanAttach):
+        * UIProcess/mac/WebPopupMenuProxyMac.mm:
+        (WebKit::WebPopupMenuProxyMac::populate):
+        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
+        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
+        (WebKit::modifierFlagsFromWebEvent):
+        (WebKit::getEventTypeFromWebEvent):
+        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
+        (WebKit::cssAlignmentValueForNSTextAlignment):
+        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+        (WebKit::convertImageToBitmap):
+
 2016-03-08  Oliver Hunt  <oliver@apple.com>
 
         Start moving to separated writable and executable mappings in the JIT
index a5c723e..58eb321 100644 (file)
@@ -242,7 +242,10 @@ void ChildProcess::stopNSAppRunLoop()
     ASSERT([NSApp isRunning]);
     [NSApp stop:nil];
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined location:NSMakePoint(0, 0) modifierFlags:0 timestamp:0.0 windowNumber:0 context:nil subtype:0 data1:0 data2:0];
+#pragma clang diagnostic pop
     [NSApp postEvent:event atStart:true];
 }
 #endif
index 00f1348..cebbc26 100644 (file)
@@ -63,6 +63,8 @@ static WebMouseEvent::Button currentMouseButton()
 
 static WebMouseEvent::Button mouseButtonForEvent(NSEvent *event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     switch ([event type]) {
         case NSLeftMouseDown:
         case NSLeftMouseUp:
@@ -85,10 +87,13 @@ static WebMouseEvent::Button mouseButtonForEvent(NSEvent *event)
         default:
             return WebMouseEvent::NoButton;
     }
+#pragma clang diagnostic pop
 }
 
 static WebEvent::Type mouseEventTypeForEvent(NSEvent* event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     switch ([event type]) {
         case NSLeftMouseDragged:
         case NSMouseEntered:
@@ -108,10 +113,13 @@ static WebEvent::Type mouseEventTypeForEvent(NSEvent* event)
         default:
             return WebEvent::MouseMove;
     }
+#pragma clang diagnostic pop
 }
 
 static int clickCountForEvent(NSEvent *event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     switch ([event type]) {
         case NSLeftMouseDown:
         case NSLeftMouseUp:
@@ -126,6 +134,7 @@ static int clickCountForEvent(NSEvent *event)
         default:
             return 0;
     }
+#pragma clang diagnostic pop
 }
 
 static NSScreen *screenForWindow(NSWindow *window)
@@ -162,6 +171,8 @@ static NSPoint globalPointForEvent(NSEvent *event)
 #if defined(__LP64__) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
     case NSEventTypePressure:
 #endif
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     case NSLeftMouseDown:
     case NSLeftMouseDragged:
     case NSLeftMouseUp:
@@ -175,6 +186,7 @@ static NSPoint globalPointForEvent(NSEvent *event)
     case NSRightMouseDragged:
     case NSRightMouseUp:
     case NSScrollWheel:
+#pragma clang diagnostic pop
         return globalPoint([event locationInWindow], [event window]);
     default:
         return NSZeroPoint;
@@ -187,6 +199,8 @@ static NSPoint pointForEvent(NSEvent *event, NSView *windowView)
 #if defined(__LP64__) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
     case NSEventTypePressure:
 #endif
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     case NSLeftMouseDown:
     case NSLeftMouseDragged:
     case NSLeftMouseUp:
@@ -200,6 +214,7 @@ static NSPoint pointForEvent(NSEvent *event, NSView *windowView)
     case NSRightMouseDragged:
     case NSRightMouseUp:
     case NSScrollWheel: {
+#pragma clang diagnostic pop
         // Note: This will have its origin at the bottom left of the window unless windowView is flipped.
         // In those cases, the Y coordinate gets flipped by Widget::convertFromContainingWindow.
         NSPoint location = [event locationInWindow];
@@ -251,14 +266,20 @@ static WebWheelEvent::Phase momentumPhaseForEvent(NSEvent *event)
 
 static inline String textFromEvent(NSEvent* event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([event type] == NSFlagsChanged)
+#pragma clang diagnostic pop
         return emptyString();
     return String([event characters]);
 }
 
 static inline String unmodifiedTextFromEvent(NSEvent* event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([event type] == NSFlagsChanged)
+#pragma clang diagnostic pop
         return emptyString();
     return String([event charactersIgnoringModifiers]);
 }
@@ -267,9 +288,12 @@ static bool isKeypadEvent(NSEvent* event)
 {
     // Check that this is the type of event that has a keyCode.
     switch ([event type]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
         case NSKeyDown:
         case NSKeyUp:
         case NSFlagsChanged:
+#pragma clang diagnostic pop
             break;
         default:
             return false;
@@ -302,6 +326,8 @@ static bool isKeypadEvent(NSEvent* event)
 
 static inline bool isKeyUpEvent(NSEvent *event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([event type] != NSFlagsChanged)
         return [event type] == NSKeyUp;
     // FIXME: This logic fails if the user presses both Shift keys at once, for example:
@@ -329,12 +355,15 @@ static inline bool isKeyUpEvent(NSEvent *event)
         case 63: // Function
             return ([event modifierFlags] & NSFunctionKeyMask) == 0;
     }
+#pragma clang diagnostic pop
     return false;
 }
 
 static inline WebEvent::Modifiers modifiersForEvent(NSEvent *event)
 {
     unsigned modifiers = 0;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([event modifierFlags] & NSAlphaShiftKeyMask)
         modifiers |= WebEvent::CapsLockKey;
     if ([event modifierFlags] & NSShiftKeyMask)
@@ -345,6 +374,7 @@ static inline WebEvent::Modifiers modifiersForEvent(NSEvent *event)
         modifiers |= WebEvent::AltKey;
     if ([event modifierFlags] & NSCommandKeyMask)
         modifiers |= WebEvent::MetaKey;
+#pragma clang diagnostic pop
     return (WebEvent::Modifiers)modifiers;
 }
 
@@ -464,7 +494,10 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(NSEvent *event, bool ha
     int windowsVirtualKeyCode       = windowsKeyCodeForKeyEvent(event);
     int nativeVirtualKeyCode        = [event keyCode];
     int macCharCode                 = WKGetNSEventKeyChar(event);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     bool autoRepeat                 = ([event type] != NSFlagsChanged) && [event isARepeat];
+#pragma clang diagnostic pop
     bool isKeypad                   = isKeypadEvent(event);
     bool isSystemKey                = false; // SystemKey is always false on the Mac.
     WebEvent::Modifiers modifiers   = modifiersForEvent(event);
index 4889c3f..a59dc6a 100644 (file)
@@ -62,6 +62,8 @@ static NSEventModifierFlags toNSEventModifierFlags(WebKit::WebEvent::Modifiers m
 {
     NSEventModifierFlags modifierFlags = 0;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if (modifiers & WebKit::WebEvent::CapsLockKey)
         modifierFlags |= NSAlphaShiftKeyMask;
     if (modifiers & WebKit::WebEvent::ShiftKey)
@@ -72,7 +74,7 @@ static NSEventModifierFlags toNSEventModifierFlags(WebKit::WebEvent::Modifiers m
         modifierFlags |= NSAlternateKeyMask;
     if (modifiers & WebKit::WebEvent::MetaKey)
         modifierFlags |= NSCommandKeyMask;
-
+#pragma clang diagnostic pop
     return modifierFlags;
 }
 
index 2c21d96..5316908 100644 (file)
@@ -593,8 +593,11 @@ bool WebViewImpl::becomeFirstResponder()
     if (direction != NSDirectSelection) {
         NSEvent *event = [NSApp currentEvent];
         NSEvent *keyboardEvent = nil;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
         if ([event type] == NSKeyDown || [event type] == NSKeyUp)
             keyboardEvent = event;
+#pragma clang diagnostic pop
         m_page->setInitialFocus(direction == NSSelectingNext, keyboardEvent != nil, NativeWebKeyboardEvent(keyboardEvent, false, { }), [](WebKit::CallbackBase::Error) { });
     }
     return true;
@@ -815,7 +818,10 @@ void WebViewImpl::updateContentInsetsIfAutomatic()
         return;
 
     NSWindow *window = m_view.window;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ((window.styleMask & NSFullSizeContentViewWindowMask) && !window.titlebarAppearsTransparent && ![m_view enclosingScrollView]) {
+#pragma clang diagnostic pop
         NSRect contentLayoutRect = [m_view convertRect:window.contentLayoutRect fromView:nil];
         CGFloat newTopContentInset = NSMaxY(contentLayoutRect) - NSHeight(contentLayoutRect);
         if (m_topContentInset != newTopContentInset)
@@ -1182,7 +1188,10 @@ void WebViewImpl::viewDidMoveToWindow()
 
         if (!m_flagsChangedEventMonitor) {
             auto weakThis = createWeakPtr();
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             m_flagsChangedEventMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSFlagsChangedMask handler:[weakThis] (NSEvent *flagsChangedEvent) {
+#pragma clang diagnostic pop
                 if (weakThis)
                     weakThis->postFakeMouseMovedEventForFlagsChangedEvent(flagsChangedEvent);
                 return flagsChangedEvent;
@@ -1250,9 +1259,12 @@ NSView *WebViewImpl::hitTest(CGPoint point)
 
 void WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent(NSEvent *flagsChangedEvent)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:flagsChangedEvent.window.mouseLocationOutsideOfEventStream
         modifierFlags:flagsChangedEvent.modifierFlags timestamp:flagsChangedEvent.timestamp windowNumber:flagsChangedEvent.windowNumber
         context:nullptr eventNumber:0 clickCount:0 pressure:0];
+#pragma clang diagnostic pop
     NativeWebMouseEvent webEvent(fakeEvent, m_lastPressureEvent.get(), m_view);
     m_page->handleMouseEvent(webEvent);
 }
@@ -1601,7 +1613,10 @@ NSView *WebViewImpl::fullScreenPlaceholderView()
 NSWindow *WebViewImpl::createFullScreenWindow()
 {
 #if ENABLE(FULLSCREEN_API)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     return [[[WebCoreFullScreenWindow alloc] initWithContentRect:[[NSScreen mainScreen] frame] styleMask:(NSBorderlessWindowMask | NSResizableWindowMask) backing:NSBackingStoreBuffered defer:NO] autorelease];
+#pragma clang diagnostic pop
 #else
     return nil;
 #endif
@@ -2557,6 +2572,8 @@ void WebViewImpl::removeTrackingRects(NSTrackingRectTag *tags, int count)
 void WebViewImpl::sendToolTipMouseExited()
 {
     // Nothing matters except window, trackingNumber, and userData.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseExited
                                                 location:NSMakePoint(0, 0)
                                            modifierFlags:0
@@ -2566,12 +2583,15 @@ void WebViewImpl::sendToolTipMouseExited()
                                              eventNumber:0
                                           trackingNumber:TRACKING_RECT_TAG
                                                 userData:m_trackingRectUserData];
+#pragma clang diagnostic pop
     [m_trackingRectOwner mouseExited:fakeEvent];
 }
 
 void WebViewImpl::sendToolTipMouseEntered()
 {
     // Nothing matters except window, trackingNumber, and userData.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseEntered
                                                 location:NSMakePoint(0, 0)
                                            modifierFlags:0
@@ -2581,6 +2601,7 @@ void WebViewImpl::sendToolTipMouseEntered()
                                              eventNumber:0
                                           trackingNumber:TRACKING_RECT_TAG
                                                 userData:m_trackingRectUserData];
+#pragma clang diagnostic pop
     [m_trackingRectOwner mouseEntered:fakeEvent];
 }
 
@@ -2736,7 +2757,10 @@ static WebCore::DragApplicationFlags applicationFlagsForDrag(NSView *view, id <N
         flags |= WebCore::DragApplicationHasAttachedSheet;
     if (draggingInfo.draggingSource == view)
         flags |= WebCore::DragApplicationIsSource;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([NSApp currentEvent].modifierFlags & NSAlternateKeyMask)
+#pragma clang diagnostic pop
         flags |= WebCore::DragApplicationIsCopyKeyDown;
     return static_cast<WebCore::DragApplicationFlags>(flags);
 
@@ -3325,7 +3349,10 @@ void WebViewImpl::smartMagnifyWithEvent(NSEvent *event)
 
 void WebViewImpl::setLastMouseDownEvent(NSEvent *event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     ASSERT(!event || event.type == NSLeftMouseDown || event.type == NSRightMouseDown || event.type == NSOtherMouseDown);
+#pragma clang diagnostic pop
 
     if (event == m_lastMouseDownEvent.get())
         return;
@@ -3362,8 +3389,11 @@ void WebViewImpl::didRestoreScrollPosition()
 
 void WebViewImpl::doneWithKeyEvent(NSEvent *event, bool eventWasHandled)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([event type] != NSKeyDown)
         return;
+#pragma clang diagnostic pop
 
     if (tryPostProcessPluginComplexTextInputKeyDown(event))
         return;
@@ -3439,8 +3469,11 @@ Vector<WebCore::KeypressCommand> WebViewImpl::collectKeyboardLayoutCommandsForEv
 {
     Vector<WebCore::KeypressCommand> commands;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([event type] != NSKeyDown)
         return commands;
+#pragma clang diagnostic pop
 
     ASSERT(!m_collectedKeypressCommands);
     m_collectedKeypressCommands = &commands;
@@ -3815,8 +3848,11 @@ bool WebViewImpl::performKeyEquivalent(NSEvent *event)
     // We get Esc key here after processing either Esc or Cmd+period. The former starts as a keyDown, and the latter starts as a key equivalent,
     // but both get transformed to a cancelOperation: command, executing which passes an Esc key event to -performKeyEquivalent:.
     // Don't interpret this event again, avoiding re-entrancy and infinite loops.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask))
         return [m_view _web_superPerformKeyEquivalent:event];
+#pragma clang diagnostic pop
 
     if (m_keyDownEventBeingResent) {
         // WebCore has already seen the event, no need for custom processing.
index 0157128..f07d279 100644 (file)
@@ -231,7 +231,10 @@ void PluginProcessProxy::beginModal()
     ASSERT(!m_placeholderWindow);
     ASSERT(!m_activationObserver);
     
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     m_placeholderWindow = adoptNS([[WKPlaceholderModalWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+#pragma clang diagnostic pop
     [m_placeholderWindow setReleasedWhenClosed:NO];
     
     m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationWillBecomeActiveNotification object:NSApp queue:nil
index 01eddad..f4bc44a 100644 (file)
@@ -472,7 +472,10 @@ void WebContextMenuProxyMac::showContextMenu()
     [[WKMenuTarget sharedMenuTarget] setMenuProxy:this];
 
     NSPoint menuLocation = [m_webView convertPoint:m_context.menuLocation() toView:nil];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     NSEvent *event = [NSEvent mouseEventWithType:NSRightMouseUp location:menuLocation modifierFlags:0 timestamp:0 windowNumber:m_webView.window.windowNumber context:nil eventNumber:0 clickCount:0 pressure:0];
+#pragma clang diagnostic pop
     [NSMenu popUpContextMenu:m_menu.get() withEvent:event forView:m_webView];
 }
 
index 760b726..7600d03 100644 (file)
@@ -55,7 +55,10 @@ SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
 using namespace WebCore;
 using namespace WebKit;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 static const NSUInteger windowStyleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask | NSFullSizeContentViewWindowMask;
+#pragma clang diagnostic pop
 
 // The time we keep our WebView alive before closing it and its process.
 // Reusing the WebView improves start up time for people that jump in and out of the Inspector.
@@ -450,8 +453,11 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
 
 bool WebInspectorProxy::platformCanAttach(bool webProcessCanAttach)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([m_inspectorWindow styleMask] & NSFullScreenWindowMask)
         return false;
+#pragma clang diagnostic pop
 
     NSView *inspectedView = inspectedPage()->inspectorAttachmentView();
     if ([inspectedView isKindOfClass:[WKView class]] || [inspectedView isKindOfClass:[WKWebView class]])
index 237953d..283b38a 100644 (file)
@@ -74,7 +74,10 @@ void WebPopupMenuProxyMac::populate(const Vector<WebPopupItem>& items, NSFont *f
             RetainPtr<NSMutableParagraphStyle> paragraphStyle = adoptNS([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
             NSWritingDirection writingDirection = items[i].m_textDirection == LTR ? NSWritingDirectionLeftToRight : NSWritingDirectionRightToLeft;
             [paragraphStyle setBaseWritingDirection:writingDirection];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [paragraphStyle setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
+#pragma clang diagnostic pop
             RetainPtr<NSMutableDictionary> attributes = adoptNS([[NSMutableDictionary alloc] initWithObjectsAndKeys:
                 paragraphStyle.get(), NSParagraphStyleAttributeName,
                 font, NSFontAttributeName,
@@ -139,6 +142,8 @@ void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection text
 
     NSControlSize controlSize;
     switch (data.menuSize) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     case WebCore::PopupMenuStyle::PopupMenuSizeNormal:
         controlSize = NSRegularControlSize;
         break;
@@ -148,6 +153,7 @@ void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection text
     case WebCore::PopupMenuStyle::PopupMenuSizeMini:
         controlSize = NSMiniControlSize;
         break;
+#pragma clang diagnostic pop
     }
 
     Ref<WebPopupMenuProxyMac> protect(*this);
@@ -165,10 +171,12 @@ void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection text
     if (!m_client->currentlyProcessedMouseDownEvent())
         return;
     
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     NSEvent* initiatingNSEvent = m_client->currentlyProcessedMouseDownEvent()->nativeEvent();
     if ([initiatingNSEvent type] != NSLeftMouseDown)
         return;
-    
+
     NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSLeftMouseUp
                                             location:[initiatingNSEvent locationInWindow]
                                        modifierFlags:[initiatingNSEvent modifierFlags]
@@ -178,7 +186,8 @@ void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection text
                                          eventNumber:[initiatingNSEvent eventNumber]
                                           clickCount:[initiatingNSEvent clickCount]
                                             pressure:[initiatingNSEvent pressure]];
-    
+#pragma clang diagnostic pop
+
     [NSApp postEvent:fakeEvent atStart:YES];
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
index 555439a..3b4b230 100644 (file)
@@ -1277,14 +1277,19 @@ void PDFPlugin::didEvaluateJavaScript(uint64_t, const WTF::String&)
     
 static NSUInteger modifierFlagsFromWebEvent(const WebEvent& event)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     return (event.shiftKey() ? NSShiftKeyMask : 0)
         | (event.controlKey() ? NSControlKeyMask : 0)
         | (event.altKey() ? NSAlternateKeyMask : 0)
         | (event.metaKey() ? NSCommandKeyMask : 0);
+#pragma clang diagnostic pop
 }
     
 static bool getEventTypeFromWebEvent(const WebEvent& event, NSEventType& eventType)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     switch (event.type()) {
     case WebEvent::KeyDown:
         eventType = NSKeyDown;
@@ -1331,6 +1336,7 @@ static bool getEventTypeFromWebEvent(const WebEvent& event, NSEventType& eventTy
     default:
         return false;
     }
+#pragma clang diagnostic pop
 }
     
 NSEvent *PDFPlugin::nsEventForWebMouseEvent(const WebMouseEvent& event)
index 0b3ae01..ad88f7f 100644 (file)
@@ -52,6 +52,8 @@ using namespace HTMLNames;
 
 static const String cssAlignmentValueForNSTextAlignment(NSTextAlignment alignment)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     switch (alignment) {
     case NSLeftTextAlignment:
         return "left";
@@ -64,7 +66,7 @@ static const String cssAlignmentValueForNSTextAlignment(NSTextAlignment alignmen
     case NSNaturalTextAlignment:
         return "-webkit-start";
     }
-
+#pragma clang diagnostic pop
     ASSERT_NOT_REACHED();
     return String();
 }
index 0142cc6..25c369c 100644 (file)
@@ -65,7 +65,10 @@ static PassRefPtr<ShareableBitmap> convertImageToBitmap(NSImage *image, const In
     RetainPtr<NSGraphicsContext> savedContext = [NSGraphicsContext currentContext];
 
     [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:graphicsContext->platformContext() flipped:YES]];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [image drawInRect:NSMakeRect(0, 0, bitmap->size().width(), bitmap->size().height()) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1 respectFlipped:YES hints:nil];
+#pragma clang diagnostic pop
 
     [NSGraphicsContext setCurrentContext:savedContext.get()];