WebKit Bugzilla
Attachment 348297 Details for
Bug 188996
: Add IGNORE_WARNING_.* macros
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188996-20180828182553.patch (text/plain), 324.81 KB, created by
Guillaume Emont
on 2018-08-28 09:25:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Guillaume Emont
Created:
2018-08-28 09:25:55 PDT
Size:
324.81 KB
patch
obsolete
>Subversion Revision: 235421 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 59898cdfaa6aa1e2faf4395568baa4be15674c26..684d92cdea3c9f219083d7df255d3abd237a3528 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,45 @@ >+2018-08-27 Guillaume Emont <guijemont@igalia.com> >+ >+ Add IGNORE_WARNING_.* macros >+ https://bugs.webkit.org/show_bug.cgi?id=188996 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/JSCallbackObject.h: >+ * API/tests/testapi.c: >+ * assembler/LinkBuffer.h: >+ (JSC::LinkBuffer::finalizeCodeWithDisassembly): >+ * b3/B3LowerToAir.cpp: >+ * b3/B3Opcode.cpp: >+ * b3/B3Type.h: >+ * b3/B3TypeMap.h: >+ * b3/B3Width.h: >+ * b3/air/AirArg.cpp: >+ * b3/air/AirArg.h: >+ * b3/air/AirCode.h: >+ * bytecode/Opcode.h: >+ (JSC::padOpcodeName): >+ * dfg/DFGSpeculativeJIT.cpp: >+ (JSC::DFG::SpeculativeJIT::speculateNumber): >+ (JSC::DFG::SpeculativeJIT::speculateMisc): >+ * dfg/DFGSpeculativeJIT64.cpp: >+ * ftl/FTLOutput.h: >+ * jit/CCallHelpers.h: >+ (JSC::CCallHelpers::calculatePokeOffset): >+ * llint/LLIntData.cpp: >+ * llint/LLIntSlowPaths.cpp: >+ (JSC::LLInt::slowPathLogF): >+ * runtime/ConfigFile.cpp: >+ (JSC::ConfigFile::canonicalizePaths): >+ * runtime/JSDataViewPrototype.cpp: >+ * runtime/JSGenericTypedArrayViewConstructor.h: >+ * runtime/JSGenericTypedArrayViewPrototype.h: >+ * runtime/Options.cpp: >+ (JSC::Options::setAliasedOption): >+ * tools/CodeProfiling.cpp: >+ * wasm/WasmSections.h: >+ * wasm/generateWasmValidateInlinesHeader.py: >+ > 2018-08-27 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [WebAssembly] Parse wasm modules in a streaming fashion >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 96cac60b419914fc89ec507f98148a39e6407742..8ec52e510c03e80a734ff2ffd9a38d39b11a3cc9 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,29 @@ >+2018-08-27 Guillaume Emont <guijemont@igalia.com> >+ >+ Add IGNORE_WARNING_.* macros >+ https://bugs.webkit.org/show_bug.cgi?id=188996 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Assertions.cpp: >+ * wtf/Assertions.h: >+ * wtf/Compiler.h: >+ * wtf/MD5.cpp: >+ (WTF::MD5::MD5): >+ (WTF::MD5::addBytes): >+ (WTF::MD5::checksum): >+ * wtf/PrintStream.cpp: >+ (WTF::PrintStream::printfVariableFormat): >+ * wtf/SHA1.cpp: >+ (WTF::SHA1::SHA1): >+ (WTF::SHA1::addBytes): >+ (WTF::SHA1::computeHash): >+ * wtf/ThreadingPthreads.cpp: >+ * wtf/Vector.h: >+ (WTF::VectorBuffer::endOfBuffer): >+ * wtf/text/WTFString.cpp: >+ (WTF::createWithFormatAndArguments): >+ > 2018-08-27 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [WebAssembly] Parse wasm modules in a streaming fashion >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aa16036e28323e8cada1c6e2c851d3d1ef69788b..1af4b69e0dab4a59fe8d88aee5096358f9f0aefd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,131 @@ >+2018-08-27 Guillaume Emont <guijemont@igalia.com> >+ >+ Add IGNORE_WARNING_.* macros >+ https://bugs.webkit.org/show_bug.cgi?id=188996 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h: >+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: >+ * accessibility/mac/AXObjectCacheMac.mm: >+ (WebCore::AXObjectCache::postPlatformNotification): >+ * accessibility/mac/AccessibilityObjectMac.mm: >+ (WebCore::AccessibilityObject::overrideAttachmentParent): >+ (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const): >+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: >+ (-[WebAccessibilityObjectWrapper renderWidgetChildren]): >+ (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): >+ (-[WebAccessibilityObjectWrapper role]): >+ (-[WebAccessibilityObjectWrapper roleDescription]): >+ * bridge/objc/WebScriptObject.mm: >+ * bridge/objc/objc_class.mm: >+ (JSC::Bindings::ObjcClass::fieldNamed const): >+ * crypto/CommonCryptoUtilities.cpp: >+ (WebCore::getCommonCryptoDigestAlgorithm): >+ * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp: >+ (WebCore::encryptAES_GCM): >+ (WebCore::decyptAES_GCM): >+ * crypto/mac/SerializedCryptoKeyWrapMac.mm: >+ (WebCore::wrapSerializedCryptoKey): >+ (WebCore::unwrapSerializedCryptoKey): >+ * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: >+ * css/makeSelectorPseudoElementsMap.py: >+ * editing/TextIterator.cpp: >+ * editing/mac/EditorMac.mm: >+ (WebCore::Editor::pasteWithPasteboard): >+ (WebCore::Editor::takeFindStringFromSelection): >+ (WebCore::Editor::replaceNodeFromPasteboard): >+ * page/mac/EventHandlerMac.mm: >+ (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): >+ * page/mac/ServicesOverlayController.mm: >+ (WebCore::ServicesOverlayController::Highlight::paintContents): >+ * platform/LocalizedStrings.cpp: >+ (WebCore::formatLocalizedString): >+ * platform/ScreenProperties.h: >+ (WebCore::ScreenData::decode): >+ * platform/gamepad/mac/HIDGamepadProvider.cpp: >+ (WebCore::HIDGamepadProvider::stopMonitoringInput): >+ * platform/graphics/PlatformDisplay.cpp: >+ (WebCore::PlatformDisplay::sharedDisplay): >+ * platform/graphics/SurrogatePairAwareTextIterator.cpp: >+ * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: >+ (WebCore::MediaSelectionGroupAVFObjC::updateOptions): >+ * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: >+ (WebCore::CDMSessionAVStreamSession::update): >+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const): >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: >+ (WebCore::IGNORE_WARNING_CLANG_TOP_LEVEL_END): >+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: >+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: >+ (-[WebAVSampleBufferErrorListener beginObservingRenderer:]): >+ (-[WebAVSampleBufferErrorListener stopObservingRenderer:]): >+ (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]): >+ (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): >+ (WebCore::IGNORE_WARNING_CLANG_TOP_LEVEL_END): >+ * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: >+ (PlatformCALayer::drawLayerContents): >+ * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: >+ (WebCore::FontCascade::fontForCombiningCharacterSequence const): >+ * platform/graphics/cg/ImageDecoderCG.cpp: >+ (WebCore::ImageDecoderCG::createFrameImageAtIndex): >+ * platform/graphics/cocoa/GraphicsContextCocoa.mm: >+ (WebCore::GraphicsContext::drawLineForDocumentMarker): >+ * platform/graphics/cocoa/WebGLLayer.h: >+ (IGNORE_WARNING_CLANG_TOP_LEVEL): >+ * platform/graphics/mac/ComplexTextControllerCoreText.mm: >+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): >+ * platform/graphics/mac/IconMac.mm: >+ (WebCore::Icon::Icon): >+ * platform/graphics/mac/PDFDocumentImageMac.mm: >+ (WebCore::PDFDocumentImage::drawPDFPage): >+ * platform/graphics/mac/WebKitNSImageExtras.mm: >+ (-[NSImage _web_lockFocusWithDeviceScaleFactor:]): >+ * platform/ios/DragImageIOS.mm: >+ * platform/mac/DragImageMac.mm: >+ (WebCore::scaleDragImage): >+ (WebCore::createDragImageForLink): >+ * platform/mac/LegacyNSPasteboardTypes.h: >+ * platform/mac/LocalCurrentGraphicsContext.mm: >+ (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): >+ * platform/mac/PasteboardMac.mm: >+ (WebCore::Pasteboard::createForCopyAndPaste): >+ (WebCore::Pasteboard::createForDragAndDrop): >+ (WebCore::setDragImageImpl): >+ * platform/mac/PlatformEventFactoryMac.mm: >+ (WebCore::globalPoint): >+ * platform/mac/SSLKeyGeneratorMac.mm: >+ * platform/mac/ScrollViewMac.mm: >+ (WebCore::ScrollView::platformContentsToScreen const): >+ (WebCore::ScrollView::platformScreenToContents const): >+ * platform/mac/ThemeMac.mm: >+ (WebCore::drawCellFocusRingWithFrameAtTime): >+ * platform/mac/WebPlaybackControlsManager.mm: >+ * platform/mac/WidgetMac.mm: >+ (WebCore::Widget::paint): >+ * platform/mediastream/RealtimeIncomingAudioSource.h: >+ * platform/mediastream/RealtimeIncomingVideoSource.h: >+ * platform/mediastream/RealtimeOutgoingAudioSource.h: >+ * platform/mediastream/RealtimeOutgoingVideoSource.h: >+ * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h: >+ * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: >+ * platform/mediastream/libwebrtc/LibWebRTCProvider.h: >+ * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: >+ * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: >+ * platform/network/cf/NetworkStorageSessionCFNet.cpp: >+ * platform/network/cf/ResourceHandleCFNet.cpp: >+ (WebCore::ResourceHandle::createCFURLConnection): >+ * platform/network/cf/SocketStreamHandleImplCFNet.cpp: >+ (WebCore::SocketStreamHandleImpl::reportErrorToClient): >+ * platform/network/create-http-header-name-table: >+ * platform/text/TextEncoding.cpp: >+ * testing/MockLibWebRTCPeerConnection.h: >+ * xml/XPathGrammar.cpp: >+ > 2018-08-28 Alejandro G. Castro <alex@igalia.com> > > Fix gcc compilation warnings after r235230 >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 42825d3baf6ec4c210baf543232570a8a7415c4f..d120d01febd5dba8eaef177b7dc77373bd7f6554 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,23 @@ >+2018-08-27 Guillaume Emont <guijemont@igalia.com> >+ >+ Add IGNORE_WARNING_.* macros >+ https://bugs.webkit.org/show_bug.cgi?id=188996 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp: >+ (PAL::CryptoDigest::create): >+ (PAL::CryptoDigest::addBytes): >+ (PAL::CryptoDigest::computeHash): >+ * pal/spi/cocoa/AVKitSPI.h: >+ * pal/spi/cocoa/NSKeyedArchiverSPI.h: >+ (insecurelyUnarchiveObjectFromData): >+ * pal/spi/ios/MediaPlayerSPI.h: >+ * pal/system/mac/PopupMenu.mm: >+ (PAL::popUpMenu): >+ * pal/system/mac/WebPanel.mm: >+ (-[WebPanel init]): >+ > 2018-08-27 Keith Rollin <krollin@apple.com> > > Unreviewed build fix -- disable LTO for production builds >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 135421153babb3d2f8b7e81d2170f3a9dd113ebc..d32c922f5619e4ca1db345bd32b8a09dd54dfb5c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,119 @@ >+2018-08-27 Guillaume Emont <guijemont@igalia.com> >+ >+ Add IGNORE_WARNING_.* macros >+ https://bugs.webkit.org/show_bug.cgi?id=188996 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: >+ (WebKit::NetworkDataTaskCocoa::statelessCookieStorage): >+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm: >+ (WebKit::NetworkProcess::platformSyncAllCookies): >+ * PluginProcess/mac/PluginProcessMac.mm: >+ (WebKit::beginModal): >+ * PluginProcess/mac/PluginProcessShim.mm: >+ * Shared/Plugins/Netscape/NetscapePluginModule.cpp: >+ (WebKit::NetscapePluginModule::tryLoad): >+ * Shared/ios/ChildProcessIOS.mm: >+ (WebKit::ChildProcess::initializeSandbox): >+ * Shared/mac/ChildProcessMac.mm: >+ (WebKit::compileAndApplySandboxSlowCase): >+ * Shared/mac/ColorSpaceData.mm: >+ (WebKit::ColorSpaceData::decode): >+ * Shared/mac/SandboxExtensionMac.mm: >+ (WebKit::SandboxExtensionImpl::sandboxExtensionForType): >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _web_superAccessibilityAttributeValue:]): >+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: >+ * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm: >+ * UIProcess/API/glib/WebKitWebView.cpp: >+ (webkitWebViewRunAsModal): >+ * UIProcess/API/mac/WKView.mm: >+ (-[WKView _web_superAccessibilityAttributeValue:]): >+ * UIProcess/Cocoa/DownloadClient.mm: >+ (WebKit::DownloadClient::decideDestinationWithSuggestedFilename): >+ * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: >+ (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]): >+ * UIProcess/Cocoa/NavigationState.mm: >+ (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): >+ * UIProcess/Cocoa/UIDelegate.mm: >+ (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu): >+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm: >+ (WebKit::WebProcessPool::platformInitializeWebProcess): >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (-[WKTextListTouchBarViewController initWithWebViewImpl:]): >+ (WebKit::WebViewImpl::updateWindowAndViewFrames): >+ (WebKit::WebViewImpl::sendDragEndToPage): >+ (WebKit::WebViewImpl::startDrag): >+ (WebKit::WebViewImpl::characterIndexForPoint): >+ * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: >+ (WebKit::PluginProcessProxy::getPluginProcessSerialNumber): >+ (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess): >+ (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess): >+ (WebKit::PluginProcessProxy::exitFullscreen): >+ * UIProcess/ios/SmartMagnificationController.mm: >+ * UIProcess/ios/WKGeolocationProviderIOS.mm: >+ * UIProcess/ios/WKLegacyPDFView.mm: >+ * UIProcess/ios/WKPDFPageNumberIndicator.mm: >+ (-[WKPDFPageNumberIndicator _makeRoundedCorners]): >+ * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: >+ * UIProcess/ios/forms/WKFileUploadPanel.mm: >+ (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]): >+ * UIProcess/ios/forms/WKFormColorControl.mm: >+ (-[WKColorPopover initWithView:]): >+ * UIProcess/ios/forms/WKFormInputControl.mm: >+ (-[WKDateTimePopover initWithView:datePickerMode:]): >+ * UIProcess/ios/forms/WKFormPopover.h: >+ * UIProcess/ios/forms/WKFormPopover.mm: >+ * UIProcess/ios/forms/WKFormSelectPopover.mm: >+ (-[WKSelectPopover initWithView:hasGroups:]): >+ * UIProcess/mac/PageClientImplMac.mm: >+ (WebKit::PageClientImpl::screenToRootView): >+ (WebKit::PageClientImpl::rootViewToScreen): >+ * UIProcess/mac/WKFullScreenWindowController.mm: >+ (-[WKFullScreenWindowController enterFullScreen:]): >+ (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): >+ (-[WKFullScreenWindowController exitFullScreen]): >+ (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]): >+ (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): >+ (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): >+ (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): >+ (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): >+ * UIProcess/mac/WKPrintingView.mm: >+ (-[WKPrintingView _setAutodisplay:]): >+ (-[WKPrintingView _drawPDFDocument:page:atPoint:]): >+ (-[WKPrintingView _drawPreview:]): >+ (-[WKPrintingView drawRect:]): >+ * UIProcess/mac/WKTextInputWindowController.mm: >+ (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]): >+ (-[WKTextInputPanel _hasMarkedText]): >+ * UIProcess/mac/WebPopupMenuProxyMac.mm: >+ (WebKit::WebPopupMenuProxyMac::showPopupMenu): >+ * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: >+ (WebKit::initializeEventRecord): >+ (WebKit::NetscapePlugin::sendComplexTextInput): >+ (WebKit::makeCGLPresentLayerOpaque): >+ (WebKit::NetscapePlugin::nullEventTimerFired): >+ * WebProcess/Plugins/PDF/PDFPlugin.mm: >+ (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]): >+ (-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]): >+ (WebKit::PDFPlugin::handleEditingCommand): >+ (WebKit::PDFPlugin::setActiveAnnotation): >+ (WebKit:: const): >+ * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h: >+ * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: >+ (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): >+ * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h: >+ * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: >+ (WebKit::PDFPluginTextAnnotation::createAnnotationElement): >+ * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: >+ * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: >+ (WebKit::convertImageToBitmap): >+ (WebKit::WebDragClient::declareAndWriteDragImage): >+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: >+ * WebProcess/WebPage/mac/WebPageMac.mm: >+ (WebKit::drawPDFPage): >+ > 2018-08-27 Basuke Suzuki <Basuke.Suzuki@sony.com> > > [Curl] Enable Proxy Authentication on WebKit. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index de2642c76ad3868a80190983b9720e6481e0b6ee..a968a3bf83cb29bd1009addc1fb97dd37720ca1d 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,134 @@ >+2018-08-27 Guillaume Emont <guijemont@igalia.com> >+ >+ Add IGNORE_WARNING_.* macros >+ https://bugs.webkit.org/show_bug.cgi?id=188996 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Carbon/CarbonUtils.m: >+ (PoolCleaner): >+ * Carbon/CarbonWindowAdapter.mm: >+ (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]): >+ (-[CarbonWindowAdapter setViewsNeedDisplay:]): >+ (-[CarbonWindowAdapter reconcileToCarbonWindowBounds]): >+ (-[CarbonWindowAdapter _termWindowIfOwner]): >+ (-[CarbonWindowAdapter _windowMovedToRect:]): >+ (-[CarbonWindowAdapter setContentView:]): >+ (-[CarbonWindowAdapter _handleRootBoundsChanged]): >+ (-[CarbonWindowAdapter _handleContentBoundsChanged]): >+ * Carbon/CarbonWindowFrame.m: >+ (-[CarbonWindowFrame title]): >+ * Carbon/HIViewAdapter.m: >+ (+[HIViewAdapter getHIViewForNSView:]): >+ * Carbon/HIWebView.mm: >+ (overrideCGContext): >+ (restoreCGContext): >+ (Draw): >+ * DOM/DOM.mm: >+ * History/WebHistory.h: >+ * History/WebHistory.mm: >+ (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): >+ * History/WebHistoryItem.mm: >+ (-[WebHistoryItem icon]): >+ * Misc/WebKitNSStringExtras.mm: >+ (-[NSString _web_drawAtPoint:font:textColor:]): >+ * Misc/WebNSImageExtras.m: >+ (-[NSImage _web_scaleToMaxSize:]): >+ (-[NSImage _web_dissolveToFraction:]): >+ * Misc/WebNSPasteboardExtras.mm: >+ (+[NSPasteboard _web_setFindPasteboardString:withOwner:]): >+ (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]): >+ * Panels/WebAuthenticationPanel.m: >+ (-[WebAuthenticationPanel loadNib]): >+ * Plugins/Hosted/NetscapePluginHostManager.mm: >+ (WebKit::NetscapePluginHostManager::spawnPluginHost): >+ (WebKit::NetscapePluginHostManager::didCreateWindow): >+ * Plugins/Hosted/NetscapePluginHostProxy.mm: >+ (WebKit::NetscapePluginHostProxy::makeCurrentProcessFrontProcess): >+ (WebKit::NetscapePluginHostProxy::makePluginHostProcessFrontProcess const): >+ (WebKit::NetscapePluginHostProxy::isPluginHostProcessFrontProcess const): >+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: >+ (WebKit::NetscapePluginInstanceProxy::mouseEvent): >+ * Plugins/Hosted/WebHostedNetscapePluginView.mm: >+ (-[WebHostedNetscapePluginView drawRect:]): >+ * Plugins/Hosted/WebTextInputWindowController.m: >+ (-[WebTextInputPanel _interpretKeyEvent:string:]): >+ * Plugins/WebBaseNetscapePluginView.mm: >+ (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]): >+ * Plugins/WebNetscapePluginPackage.mm: >+ (-[WebNetscapePluginPackage _tryLoad]): >+ * Plugins/WebNetscapePluginView.mm: >+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): >+ (-[WebNetscapePluginView sendDrawRectEvent:]): >+ (-[WebNetscapePluginView drawRect:]): >+ * Plugins/WebPluginController.mm: >+ (WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_): >+ (WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_): >+ * WebCoreSupport/PopupMenuMac.mm: >+ (PopupMenuMac::populate): >+ * WebCoreSupport/WebAlternativeTextClient.h: >+ * WebCoreSupport/WebDragClient.mm: >+ (WebDragClient::startDrag): >+ * WebCoreSupport/WebFrameLoaderClient.mm: >+ (WebFrameLoaderClient::convertMainResourceLoadToDownload): >+ (webGetNSImage): >+ * WebInspector/WebNodeHighlight.mm: >+ * WebInspector/WebNodeHighlightView.mm: >+ (-[WebNodeHighlightView drawRect:]): >+ * WebView/WebClipView.mm: >+ (-[WebClipView initWithFrame:]): >+ * WebView/WebFrame.mm: >+ (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): >+ (-[WebFrame _drawRect:contentsOnly:]): >+ (-[WebFrame accessibilityRoot]): >+ * WebView/WebFullScreenController.mm: >+ (-[WebFullScreenController enterFullScreen:]): >+ (-[WebFullScreenController finishedEnterFullScreenAnimation:]): >+ (-[WebFullScreenController exitFullScreen]): >+ (-[WebFullScreenController finishedExitFullScreenAnimation:]): >+ (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]): >+ (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]): >+ * WebView/WebHTMLView.mm: >+ (-[NSWindow _web_borderView]): >+ (-[WebHTMLView _updateMouseoverWithFakeEvent]): >+ (-[WebHTMLView _setAsideSubviews]): >+ (-[WebHTMLView _autoscroll]): >+ (-[WebHTMLView drawRect:]): >+ (-[WebHTMLView mouseDown:]): >+ (-[WebHTMLView mouseDragged:]): >+ (-[WebHTMLView mouseUp:]): >+ (-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]): >+ (-[WebHTMLView knowsPageRange:]): >+ (-[WebHTMLView accessibilityHitTest:]): >+ (-[WebHTMLView _fontAttributesFromFontPasteboard]): >+ (-[WebHTMLView _colorAsString:]): >+ (-[WebHTMLView copyFont:]): >+ (-[WebHTMLView _executeSavedKeypressCommands]): >+ (-[WebHTMLView attachRootLayer:]): >+ (-[WebHTMLView textStorage]): >+ (-[WebHTMLView _updateSelectionForInputManager]): >+ * WebView/WebPDFView.mm: >+ (_applicationInfoForMIMEType): >+ (-[WebPDFView centerSelectionInVisibleArea:]): >+ (-[WebPDFView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): >+ (-[WebPDFView _recursiveDisplayAllDirtyWithLockFocus:visRect:]): >+ (-[WebPDFView _recursive:displayRectIgnoringOpacity:inContext:topView:]): >+ (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]): >+ * WebView/WebTextCompletionController.mm: >+ (-[WebTextCompletionController _buildUI]): >+ (-[WebTextCompletionController _placePopupWindow:]): >+ * WebView/WebVideoFullscreenController.mm: >+ * WebView/WebVideoFullscreenHUDWindowController.mm: >+ (createMediaUIBackgroundView): >+ * WebView/WebView.mm: >+ (-[WebTextListTouchBarViewController initWithWebView:]): >+ (-[WebView _dispatchTileDidDraw:]): >+ (-[WebView encodeWithCoder:]): >+ (-[WebView mainFrameIcon]): >+ (LayerFlushController::flushLayers): >+ * WebView/WebWindowAnimation.mm: >+ (setScaledFrameForWindow): >+ > 2018-08-27 Keith Rollin <krollin@apple.com> > > Unreviewed build fix -- disable LTO for production builds >diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h >index 16364696389dec90e050ed2000eae72c1d79213a..a65055d8490b6f643ac3aff295038bbdc33bda22 100644 >--- a/Source/JavaScriptCore/API/JSCallbackObject.h >+++ b/Source/JavaScriptCore/API/JSCallbackObject.h >@@ -158,18 +158,9 @@ public: > void* getPrivate(); > > // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 >-#if COMPILER(CLANG) >-#if __has_warning("-Wundefined-var-template") >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wundefined-var-template" >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wundefined-var-template") > DECLARE_INFO; >-#if COMPILER(CLANG) >-#if __has_warning("-Wundefined-var-template") >-#pragma clang diagnostic pop >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wundefined-var-template") > > JSClassRef classRef() const { return m_callbackObjectData->jsClass; } > bool inherits(JSClassRef) const; >diff --git a/Source/JavaScriptCore/API/tests/testapi.c b/Source/JavaScriptCore/API/tests/testapi.c >index 3fc861219a30845aa8be86446058afb3f6207ad9..17df8881821f7ccd21358b835e8b9b9b4187da25 100644 >--- a/Source/JavaScriptCore/API/tests/testapi.c >+++ b/Source/JavaScriptCore/API/tests/testapi.c >@@ -1140,10 +1140,7 @@ static bool globalContextNameTest() > return result; > } > >-#if COMPILER(GCC) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-but-set-variable" >-#endif >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-but-set-variable"); > static void checkConstnessInJSObjectNames() > { > JSStaticFunction fun; >@@ -1151,9 +1148,7 @@ static void checkConstnessInJSObjectNames() > JSStaticValue val; > val.name = "something"; > } >-#if COMPILER(GCC) >-#pragma GCC diagnostic pop >-#endif >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-but-set-variable"); > > #ifdef __cplusplus > extern "C" { >diff --git a/Source/JavaScriptCore/assembler/LinkBuffer.h b/Source/JavaScriptCore/assembler/LinkBuffer.h >index 559908add03de215aa60af72809fa33e1c9d97a9..336af37c04942130445980dd179f7e3bc5317973 100644 >--- a/Source/JavaScriptCore/assembler/LinkBuffer.h >+++ b/Source/JavaScriptCore/assembler/LinkBuffer.h >@@ -263,15 +263,11 @@ public: > template<PtrTag tag, typename... Args> > CodeRef<tag> finalizeCodeWithDisassembly(const char* format, Args... args) > { >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wformat-nonliteral" >-#pragma GCC diagnostic ignored "-Wformat-security" >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG("-Wformat-nonliteral"); >+ IGNORE_WARNING_GCC_OR_CLANG("-Wformat-security"); > return finalizeCodeWithDisassemblyImpl(format, args...).template retagged<tag>(); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wformat-security"); >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wformat-nonliteral"); > } > > template<PtrTag tag> >diff --git a/Source/JavaScriptCore/b3/B3LowerToAir.cpp b/Source/JavaScriptCore/b3/B3LowerToAir.cpp >index 2cdb7243d34e27e5761c934935ce551814d5b62a..5cc052533b40631c0b1635974baef9ef98aee1e8 100644 >--- a/Source/JavaScriptCore/b3/B3LowerToAir.cpp >+++ b/Source/JavaScriptCore/b3/B3LowerToAir.cpp >@@ -62,10 +62,9 @@ > #include <wtf/IndexSet.h> > #include <wtf/ListDump.h> > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { > >@@ -3527,8 +3526,8 @@ void lowerToAir(Procedure& procedure) > > } } // namespace JSC::B3 > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/b3/B3Opcode.cpp b/Source/JavaScriptCore/b3/B3Opcode.cpp >index 7ebf66b70a450c92ae1549d5264bc990da1bec14..728ad74de57a04445b7d5e5555c7fad00eb19815 100644 >--- a/Source/JavaScriptCore/b3/B3Opcode.cpp >+++ b/Source/JavaScriptCore/b3/B3Opcode.cpp >@@ -30,10 +30,9 @@ > > #include <wtf/PrintStream.h> > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { > >@@ -373,8 +372,8 @@ void printInternal(PrintStream& out, Opcode opcode) > > } // namespace WTF > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/b3/B3Type.h b/Source/JavaScriptCore/b3/B3Type.h >index 4ceaa8a1df14b8b6b68e0e80bfeb6a9e0a2d8e82..9f321d938a9e1834fd72ea953f411626d8ad5313 100644 >--- a/Source/JavaScriptCore/b3/B3Type.h >+++ b/Source/JavaScriptCore/b3/B3Type.h >@@ -30,10 +30,9 @@ > #include "B3Common.h" > #include <wtf/StdLibExtras.h> > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { > >@@ -87,8 +86,8 @@ void printInternal(PrintStream&, JSC::B3::Type); > > } // namespace WTF > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/b3/B3TypeMap.h b/Source/JavaScriptCore/b3/B3TypeMap.h >index c0ea413048a5556f5dc3458d3840e5fb5b99d6d1..cf1843a8bf102755f875786c02106f11c90afa4c 100644 >--- a/Source/JavaScriptCore/b3/B3TypeMap.h >+++ b/Source/JavaScriptCore/b3/B3TypeMap.h >@@ -30,10 +30,9 @@ > #include "B3Type.h" > #include <wtf/PrintStream.h> > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { > >@@ -101,8 +100,8 @@ private: > > } } // namespace JSC::B3 > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/b3/B3Width.h b/Source/JavaScriptCore/b3/B3Width.h >index e36583f694b883fb2b889d01310834a0531cfc47..9895836b327a42ebac22d22dfc163c2ef3133572 100644 >--- a/Source/JavaScriptCore/b3/B3Width.h >+++ b/Source/JavaScriptCore/b3/B3Width.h >@@ -30,10 +30,9 @@ > #include "B3Bank.h" > #include "B3Type.h" > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { > >@@ -143,9 +142,9 @@ void printInternal(PrintStream&, JSC::B3::Width); > > } // namespace WTF > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) > >diff --git a/Source/JavaScriptCore/b3/air/AirArg.cpp b/Source/JavaScriptCore/b3/air/AirArg.cpp >index f9e469c047cbeb387177751c49c766c579e68539..2ac4849663b9678934b6d085fdcff06885f27426 100644 >--- a/Source/JavaScriptCore/b3/air/AirArg.cpp >+++ b/Source/JavaScriptCore/b3/air/AirArg.cpp >@@ -34,10 +34,9 @@ > #include "FPRInfo.h" > #include "GPRInfo.h" > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { namespace Air { > >@@ -379,8 +378,8 @@ void printInternal(PrintStream& out, Arg::Signedness signedness) > > } // namespace WTF > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/b3/air/AirArg.h b/Source/JavaScriptCore/b3/air/AirArg.h >index 838fca8921271c1b0778b25d450579de43795767..c1a42352afd8d87b7285c9fa4bee20e5e5402f64 100644 >--- a/Source/JavaScriptCore/b3/air/AirArg.h >+++ b/Source/JavaScriptCore/b3/air/AirArg.h >@@ -35,10 +35,9 @@ > #include "B3Width.h" > #include <wtf/Optional.h> > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace B3 { > >@@ -1494,8 +1493,8 @@ template<> struct HashTraits<JSC::B3::Air::Arg> : SimpleClassHashTraits<JSC::B3: > > } // namespace WTF > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/b3/air/AirCode.h b/Source/JavaScriptCore/b3/air/AirCode.h >index 7597030fdcf042bfc3d8dea2281b9eb28ba25435..21839d59835b5ba33c36cb35c2b3d2289064264a 100644 >--- a/Source/JavaScriptCore/b3/air/AirCode.h >+++ b/Source/JavaScriptCore/b3/air/AirCode.h >@@ -44,10 +44,9 @@ namespace JSC { namespace B3 { > > class Procedure; > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace Air { > >@@ -388,8 +387,8 @@ private: > > } } } // namespace JSC::B3::Air > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(B3_JIT) >diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h >index 07d9a7314eeb109c731237d4be327131b11c94ee..ed7e1dc75e1dde5330277b64181ec55d2c9452f3 100644 >--- a/Source/JavaScriptCore/bytecode/Opcode.h >+++ b/Source/JavaScriptCore/bytecode/Opcode.h >@@ -74,18 +74,13 @@ const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_BYTECODE_HELPER_IDS; > const int opcodeLengths[numOpcodeIDs] = { FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTH_MAP) }; > #undef OPCODE_ID_LENGTH_MAP > >-#if COMPILER(GCC) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wtype-limits" >-#endif >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wtype-limits") > > #define VERIFY_OPCODE_ID(id, size) COMPILE_ASSERT(id <= numOpcodeIDs, ASSERT_THAT_JS_OPCODE_IDS_ARE_VALID); > FOR_EACH_OPCODE_ID(VERIFY_OPCODE_ID); > #undef VERIFY_OPCODE_ID > >-#if COMPILER(GCC) >-#pragma GCC diagnostic pop >-#endif >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wtype-limits") > > #if ENABLE(COMPUTED_GOTO_OPCODES) > typedef void* Opcode; >diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp >index bd18f9df9b7e8530923edf6e0b4108f6d297a067..aaef6a228d8ce9bd1a892f02d67d55959201a886 100644 >--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp >+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp >@@ -9657,14 +9657,9 @@ void SpeculativeJIT::speculateNumber(Edge edge) > JSValueRegs(gpr), edge, SpecBytecodeNumber, > m_jit.branchIfNotNumber(gpr)); > #else >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wenum-compare" >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG("-Wenum-compare"); > static_assert(JSValue::Int32Tag >= JSValue::LowestTag, "Int32Tag is included in >= JSValue::LowestTag range."); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wenum-compare"); > GPRReg tagGPR = value.tagGPR(); > DFG_TYPE_CHECK( > value.jsValueRegs(), edge, ~SpecInt32Only, >@@ -10171,14 +10166,9 @@ void SpeculativeJIT::speculateMisc(Edge edge, JSValueRegs regs) > regs, edge, SpecMisc, > m_jit.branch64(MacroAssembler::Above, regs.gpr(), MacroAssembler::TrustedImm64(TagBitTypeOther | TagBitBool | TagBitUndefined))); > #else >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wenum-compare" >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG("-Wenum-compare"); > static_assert(JSValue::Int32Tag >= JSValue::UndefinedTag, "Int32Tag is included in >= JSValue::UndefinedTag range."); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wenum-compare"); > DFG_TYPE_CHECK( > regs, edge, ~SpecInt32Only, > m_jit.branchIfInt32(regs.tagGPR())); >diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp >index 7e1cbcf8ed965ecc9a6ca864d5b87fe1b745d7eb..664e7b41b1f058565b75de4c90b36fbea74538f7 100644 >--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp >+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp >@@ -876,12 +876,7 @@ void SpeculativeJIT::emitCall(Node* node) > > // Clang should allow unreachable [[clang::fallthrough]] in template functions if any template expansion uses it > // http://llvm.org/bugs/show_bug.cgi?id=18619 >-#if COMPILER(CLANG) && defined(__has_warning) >-#pragma clang diagnostic push >-#if __has_warning("-Wimplicit-fallthrough") >-#pragma clang diagnostic ignored "-Wimplicit-fallthrough" >-#endif >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wimplicit-fallthrough") > template<bool strict> > GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnFormat) > { >@@ -1012,9 +1007,7 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF > return InvalidGPRReg; > } > } >-#if COMPILER(CLANG) && defined(__has_warning) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wimplicit-fallthrough") > > GPRReg SpeculativeJIT::fillSpeculateInt32(Edge edge, DataFormat& returnFormat) > { >diff --git a/Source/JavaScriptCore/ftl/FTLOutput.h b/Source/JavaScriptCore/ftl/FTLOutput.h >index 9f59369c89be57e6ee779e116f37fe6c2b7e970f..7a6a00d196e16cc2c889e72ba031846f251f1a5b 100644 >--- a/Source/JavaScriptCore/ftl/FTLOutput.h >+++ b/Source/JavaScriptCore/ftl/FTLOutput.h >@@ -50,11 +50,8 @@ > #include <wtf/StringPrintStream.h> > > // FIXME: remove this once everything can be generated through B3. >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wmissing-noreturn" >-#pragma GCC diagnostic ignored "-Wunused-parameter" >-#endif // COMPILER(GCC_OR_CLANG) >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL("-Wmissing-noreturn") >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL("-Wunused-parameter") > > namespace JSC { > >@@ -500,9 +497,8 @@ inline void Output::addIncomingToPhi(LValue phi, ValueFromBlock value, Params... > addIncomingToPhi(phi, theRest...); > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC_OR_CLANG) >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END("-Wunused-parameter") >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END("-Wmissing-noreturn") > > } } // namespace JSC::FTL > >diff --git a/Source/JavaScriptCore/jit/CCallHelpers.h b/Source/JavaScriptCore/jit/CCallHelpers.h >index 1d8e3bee9b6bd67e7093475536d2bd57d1f3183f..3fa831daf6a085bcf6ae795f66f425d700ee7455 100644 >--- a/Source/JavaScriptCore/jit/CCallHelpers.h >+++ b/Source/JavaScriptCore/jit/CCallHelpers.h >@@ -329,14 +329,9 @@ private: > > currentGPRArgument += extraGPRArgs; > currentFPRArgument -= numCrossSources; >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wtype-limits" >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG("-Wtype-limits"); > ASSERT(currentGPRArgument >= GPRInfo::numberOfArgumentRegisters || currentFPRArgument >= FPRInfo::numberOfArgumentRegisters); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wtype-limits"); > > unsigned pokeOffset = POKE_ARGUMENT_OFFSET + extraPoke; > pokeOffset += std::max(currentGPRArgument, numberOfGPArgumentRegisters) - numberOfGPArgumentRegisters; >diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp >index c93d15c74c58ff5d96aa0aad943413f085a3d92e..1cb77a62b55042e77d9fe9f15b9c8f7be39c478b 100644 >--- a/Source/JavaScriptCore/llint/LLIntData.cpp >+++ b/Source/JavaScriptCore/llint/LLIntData.cpp >@@ -67,10 +67,7 @@ void initialize() > #endif // ENABLE(JIT) > } > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wmissing-noreturn" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wmissing-noreturn") > void Data::performAssertions(VM& vm) > { > UNUSED_PARAM(vm); >@@ -199,8 +196,6 @@ void Data::performAssertions(VM& vm) > ASSERT(ArithProfile::fromInt(bits).rhsObservedType().isOnlyNumber()); > } > } >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wmissing-noreturn") > > } } // namespace JSC::LLInt >diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >index 2843305b306a18dd948a7e1d9ec010413bd861ab..c845ce0972b865d6991b8729c08035d2ff2f86cb 100644 >--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >@@ -205,16 +205,12 @@ void slowPathLn(const Types&... values) > template<typename... Types> > void slowPathLogF(const char* format, const Types&... values) > { >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wformat-nonliteral" >-#pragma GCC diagnostic ignored "-Wformat-security" >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG("-Wformat-nonliteral"); >+ IGNORE_WARNING_GCC_OR_CLANG("-Wformat-security"); > if (Options::traceLLIntSlowPath()) > dataLogF(format, values...); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wformat-security"); >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wformat-nonliteral"); > } > > #else // not LLINT_TRACING >diff --git a/Source/JavaScriptCore/runtime/ConfigFile.cpp b/Source/JavaScriptCore/runtime/ConfigFile.cpp >index 98c196f82f6851bdf70ef8d6223b5a169129362f..04974648d48cc3c4745a3467faf7bae8e7678f4f 100644 >--- a/Source/JavaScriptCore/runtime/ConfigFile.cpp >+++ b/Source/JavaScriptCore/runtime/ConfigFile.cpp >@@ -491,14 +491,13 @@ void ConfigFile::canonicalizePaths() > strncat(filenameBuffer, "/", 2); // Room for '/' plus NUL > #if COMPILER(GCC) > #if GCC_VERSION_AT_LEAST(8, 0, 0) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wstringop-truncation" >+ IGNORE_WARNING_GCC("-Wstringop-truncation"); > #endif > #endif > strncat(filenameBuffer, m_filename, sizeof(filenameBuffer) - strlen(filenameBuffer) - 1); > #if COMPILER(GCC) > #if GCC_VERSION_AT_LEAST(8, 0, 0) >-#pragma GCC diagnostic pop >+ IGNORE_WARNING_GCC_END("-Wstringop-truncation"); > #endif > #endif > strncpy(m_filename, filenameBuffer, s_maxPathLength); >diff --git a/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp b/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp >index f05cff5f88a551c3a7c4baad2f03c5b47789af6d..c0cae05e1d54b9c494fe1635bfc36f997772bff6 100644 >--- a/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp >@@ -208,10 +208,7 @@ EncodedJSValue setData(ExecState* exec) > return JSValue::encode(jsUndefined()); > } > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wmissing-prototypes" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wmissing-prototypes") > > EncodedJSValue JSC_HOST_CALL dataViewProtoGetterBuffer(ExecState* exec) > { >@@ -328,8 +325,6 @@ EncodedJSValue JSC_HOST_CALL dataViewProtoFuncSetFloat64(ExecState* exec) > { > return setData<Float64Adaptor>(exec); > } >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wmissing-prototypes") > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h >index 8acfd48e23ffd96cbcb2fbb7bf712f7808f5a440..d7cbdfc2ad8901e6c2056d320570dafd3c72a194 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h >@@ -43,19 +43,10 @@ public: > VM&, JSGlobalObject*, Structure*, JSObject* prototype, const String& name, FunctionExecutable* privateAllocator); > > // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 >-#if COMPILER(CLANG) >-#if __has_warning("-Wundefined-var-template") >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wundefined-var-template" >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wundefined-var-template") > DECLARE_INFO; >-#if COMPILER(CLANG) >-#if __has_warning("-Wundefined-var-template") >-#pragma clang diagnostic pop >-#endif >-#endif >- >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wundefined-var-template") >+ > static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); > }; > >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h >index 4e1eb7d8834cbc5de72cd6cc6b1d24b46143c5b6..0f60e8deb3304016f05875196638717f8436b35c 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h >@@ -43,18 +43,9 @@ public: > VM&, JSGlobalObject*, Structure*); > > // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 >-#if COMPILER(CLANG) >-#if __has_warning("-Wundefined-var-template") >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wundefined-var-template" >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wundefined-var-template") > DECLARE_INFO; >-#if COMPILER(CLANG) >-#if __has_warning("-Wundefined-var-template") >-#pragma clang diagnostic pop >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wundefined-var-template") > > static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); > }; >diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp >index 407c5704746b04cff74dfa98b9bc313fc733664f..09b705b4882910a2062a873572c1129650ad442f 100644 >--- a/Source/JavaScriptCore/runtime/Options.cpp >+++ b/Source/JavaScriptCore/runtime/Options.cpp >@@ -744,12 +744,7 @@ bool Options::setAliasedOption(const char* arg) > if (!equalStr) > return false; > >-#if COMPILER(CLANG) >-#if __has_warning("-Wtautological-compare") >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wtautological-compare" >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wtautological-compare") > > // For each option, check if the specify arg is a match. If so, set the arg > // if the value makes sense. Otherwise, move on to checking the next option. >@@ -772,11 +767,7 @@ bool Options::setAliasedOption(const char* arg) > JSC_ALIASED_OPTIONS(FOR_EACH_OPTION) > #undef FOR_EACH_OPTION > >-#if COMPILER(CLANG) >-#if __has_warning("-Wtautological-compare") >-#pragma clang diagnostic pop >-#endif >-#endif >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wtautological-compare") > > return false; // No option matched. > } >diff --git a/Source/JavaScriptCore/tools/CodeProfiling.cpp b/Source/JavaScriptCore/tools/CodeProfiling.cpp >index c3da8c2c293fcc9bcc73df12f696f4ce3b498da3..77df5de83c9c33c123f03ec2980252912478ea26 100644 >--- a/Source/JavaScriptCore/tools/CodeProfiling.cpp >+++ b/Source/JavaScriptCore/tools/CodeProfiling.cpp >@@ -44,10 +44,7 @@ volatile CodeProfile* CodeProfiling::s_profileStack = 0; > CodeProfiling::Mode CodeProfiling::s_mode = CodeProfiling::Disabled; > WTF::MetaAllocatorTracker* CodeProfiling::s_tracker = 0; > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wmissing-noreturn" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wmissing-noreturn") > > #if HAVE(MACHINE_CONTEXT) > // Helper function to start & stop the timer. >@@ -63,9 +60,7 @@ static void setProfileTimer(unsigned usec) > } > #endif > >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wmissing-noreturn") > > #if HAVE(MACHINE_CONTEXT) > static void profilingTimer(int, siginfo_t*, void* uap) >diff --git a/Source/JavaScriptCore/wasm/WasmSections.h b/Source/JavaScriptCore/wasm/WasmSections.h >index e6924b7953cc3646bee908441a63c63c294a77d6..f3a1aa0bc71072fbce1ebed7db4c6da822b627c9 100644 >--- a/Source/JavaScriptCore/wasm/WasmSections.h >+++ b/Source/JavaScriptCore/wasm/WasmSections.h >@@ -27,10 +27,9 @@ > > #if ENABLE(WEBASSEMBLY) > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace Wasm { > >@@ -107,8 +106,8 @@ inline const char* makeString(Section section) > > } } // namespace JSC::Wasm > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(WEBASSEMBLY) >diff --git a/Source/JavaScriptCore/wasm/generateWasmValidateInlinesHeader.py b/Source/JavaScriptCore/wasm/generateWasmValidateInlinesHeader.py >index bc54a2237465db9c7d903f22a9542a1ca68ef555..71fd2e36b81e80bae2da556830ffd37ce233fa3e 100755 >--- a/Source/JavaScriptCore/wasm/generateWasmValidateInlinesHeader.py >+++ b/Source/JavaScriptCore/wasm/generateWasmValidateInlinesHeader.py >@@ -127,10 +127,9 @@ contents = wasm.header + """ > > #include <wtf/StdLibExtras.h> > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-type" >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-type") >+#endif > > namespace JSC { namespace Wasm { > >@@ -160,9 +159,9 @@ auto Validate::store(StoreOpType op, ExpressionType pointer, ExpressionType valu > > } } // namespace JSC::Wasm > >-#if COMPILER(GCC) && ASSERT_DISABLED >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) && ASSERT_DISABLED >+#if ASSERT_DISABLED >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-type") >+#endif > > #endif // ENABLE(WEBASSEMBLY) > >diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp >index fe8fac07d6f7573e02f269de5b0b50f2bde7dc5d..2a426828da95ca38c64905a78796d6a65b662062 100644 >--- a/Source/WTF/wtf/Assertions.cpp >+++ b/Source/WTF/wtf/Assertions.cpp >@@ -79,10 +79,9 @@ extern "C" { > static void logToStderr(const char* buffer) > { > #if USE(APPLE_SYSTEM_LOG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > asl_log(0, 0, ASL_LEVEL_NOTICE, "%s", buffer); >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #endif > fputs(buffer, stderr); > } >@@ -94,14 +93,9 @@ static void vprintf_stderr_common(const char* format, va_list args) > if (strstr(format, "%@")) { > auto cfFormat = adoptCF(CFStringCreateWithCString(nullptr, format, kCFStringEncodingUTF8)); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > auto str = adoptCF(CFStringCreateWithFormatAndArguments(nullptr, nullptr, cfFormat.get(), args)); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > CFIndex length = CFStringGetMaximumSizeForEncoding(CFStringGetLength(str.get()), kCFStringEncodingUTF8); > constexpr unsigned InitialBufferSize { 256 }; > Vector<char, InitialBufferSize> buffer(length + 1); >@@ -113,13 +107,12 @@ static void vprintf_stderr_common(const char* format, va_list args) > } > > #if USE(APPLE_SYSTEM_LOG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > va_list copyOfArgs; > va_copy(copyOfArgs, args); > asl_vlog(0, 0, ASL_LEVEL_NOTICE, format, copyOfArgs); > va_end(copyOfArgs); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #endif > > // Fall through to write to stderr in the same manner as other platforms. >@@ -141,10 +134,7 @@ static void vprintf_stderr_common(const char* format, va_list args) > vfprintf(stderr, format, args); > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wformat-nonliteral" >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL("-Wformat-nonliteral") > > static void vprintf_stderr_with_prefix(const char* prefix, const char* format, va_list args) > { >@@ -174,9 +164,7 @@ static void vprintf_stderr_with_trailing_newline(const char* format, va_list arg > vprintf_stderr_common(formatWithNewline.data(), args); > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END("-Wformat-nonliteral") > > WTF_ATTRIBUTE_PRINTF(1, 2) > static void printf_stderr_common(const char* format, ...) >@@ -385,14 +373,9 @@ void WTFLogWithLevel(WTFLogChannel* channel, WTFLogLevel level, const char* form > va_list args; > va_start(args, format); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > WTFLog(channel, format, args); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wformat-nonliteral"); > > va_end(args); > } >@@ -415,14 +398,9 @@ void WTFLog(WTFLogChannel* channel, const char* format, ...) > va_list args; > va_start(args, format); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > String loggingString = String::format(format, args); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wformat-nonliteral"); > > va_end(args); > >@@ -442,14 +420,9 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann > va_list args; > va_start(args, format); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > WTFLog(channel, format, args); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wformat-nonliteral"); > > va_end(args); > >diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h >index 5b28f86fa931d8ca1ac1838585f2f0f2d35f59f6..50541741ba58f14096969b9a7e441255ee7429dd 100644 >--- a/Source/WTF/wtf/Assertions.h >+++ b/Source/WTF/wtf/Assertions.h >@@ -602,15 +602,14 @@ inline void compilerFenceForCrash() > #if COMPILER(CLANG) > // This would be a macro except that its use of #pragma works best around > // a function. Hence it uses macro naming convention. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wmissing-noreturn" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wmissing-noreturn"); > static inline void UNREACHABLE_FOR_PLATFORM() > { > // This *MUST* be a release assert. We use it in places where it's better to crash than to keep > // going. > RELEASE_ASSERT_NOT_REACHED(); > } >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wmissing-noreturn"); > #else > #define UNREACHABLE_FOR_PLATFORM() RELEASE_ASSERT_NOT_REACHED() > #endif >diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h >index 798c3090c9b1c18580a3a6be6fab65bdace6ffaa..db99061f10cf82d1cc2eb69fb68d68b6aadd13ba 100644 >--- a/Source/WTF/wtf/Compiler.h >+++ b/Source/WTF/wtf/Compiler.h >@@ -385,4 +385,80 @@ > #define __has_include(path) 0 > #endif > >+/* IGNORE_WARNING.* */ >+ >+// Can't use WTF_CONCAT() and STRINGIZE() because they are defined in >+// StdLibExtras.h which includes us >+#define _COMPILER_CONCAT_I(a, b) a ## b >+#define _COMPILER_CONCAT(a, b) _COMPILER_CONCAT_I(a, b) >+ >+#define _COMPILER_STRINGIZE(exp) #exp >+ >+#if COMPILER(GCC_OR_CLANG) >+#define IGNORE_WARNING_COND(cond, compiler, warning) _COMPILER_CONCAT(IGNORE_WARNING_IMPL_, cond)(compiler, warning) >+#define IGNORE_WARNING_END_COND(cond, compiler, warning) _COMPILER_CONCAT(IGNORE_WARNING_END_IMPL_, cond)(compiler, warning) >+ >+#define IGNORE_WARNING_IMPL_1(compiler, warning) \ >+ _Pragma(_COMPILER_STRINGIZE(compiler diagnostic push)) \ >+ _Pragma(_COMPILER_STRINGIZE(compiler diagnostic ignored warning)) >+#define IGNORE_WARNING_IMPL_0(compiler, warning) >+#define IGNORE_WARNING_IMPL_(compiler, warning) >+ >+#define IGNORE_WARNING_END_IMPL_1(compiler, warning) \ >+ _Pragma(_COMPILER_STRINGIZE(compiler diagnostic pop)) >+#define IGNORE_WARNING_END_IMPL_0(compiler, warning) >+#define IGNORE_WARNING_END_IMPL_(compiler, warning) >+ >+#if defined(__has_warning) >+#define IGNORE_WARNING_IMPL(compiler, warning) IGNORE_WARNING_COND(__has_warning(warning), compiler, warning) >+#define IGNORE_WARNING_END_IMPL(compiler, warning) IGNORE_WARNING_COND(__has_warning(warning), compiler, warning) >+#else >+#define IGNORE_WARNING_IMPL(compiler, warning) IGNORE_WARNING_COND(1, compiler, warning) >+#define IGNORE_WARNING_END_IMPL(compiler, warning) IGNORE_WARNING_COND(1, compiler, warning) >+#endif >+#endif // COMPILER(GCC_OR_CLANG) >+ >+ >+#if !defined(IGNORE_WARNING_GCC) && COMPILER(GCC) >+#define IGNORE_WARNING_GCC(warning) do { IGNORE_WARNING_IMPL(GCC, warning) } while (false) >+#define IGNORE_WARNING_GCC_END(warning) do { IGNORE_WARNING_END_IMPL(GCC, warning) } while (false) >+#define IGNORE_WARNING_GCC_TOP_LEVEL(warning) IGNORE_WARNING_IMPL(GCC, warning) >+#define IGNORE_WARNING_GCC_TOP_LEVEL_END(warning) IGNORE_WARNING_END_IMPL(GCC, warning) >+#endif >+ >+#if !defined(IGNORE_WARNING_GCC) >+#define IGNORE_WARNING_GCC(x) do { } while (false) >+#define IGNORE_WARNING_GCC_END(x) do { } while (false) >+#define IGNORE_WARNING_GCC_TOP_LEVEL(warning) >+#define IGNORE_WARNING_GCC_TOP_LEVEL_END(warning) >+#endif >+ >+#if !defined(IGNORE_WARNING_CLANG) && COMPILER(CLANG) >+#define IGNORE_WARNING_CLANG(warning) do { IGNORE_WARNING_IMPL(clang, warning) } while (false) >+#define IGNORE_WARNING_CLANG_END(warning) do { IGNORE_WARNING_END_IMPL(clang, warning) } while (false) >+#define IGNORE_WARNING_CLANG_TOP_LEVEL(warning) IGNORE_WARNING_IMPL(clang, warning) >+#define IGNORE_WARNING_CLANG_TOP_LEVEL_END(warning) IGNORE_WARNING_END_IMPL(clang, warning) >+#endif >+ >+#if !defined(IGNORE_WARNING_CLANG) >+#define IGNORE_WARNING_CLANG(x) do { } while (false) >+#define IGNORE_WARNING_CLANG_END(x) do { } while (false) >+#define IGNORE_WARNING_CLANG_TOP_LEVEL(warning) >+#define IGNORE_WARNING_CLANG_TOP_LEVEL_END(warning) >+#endif >+ >+#if !defined(IGNORE_WARNING_GCC_OR_CLANG) && COMPILER(GCC_OR_CLANG) >+#define IGNORE_WARNING_GCC_OR_CLANG(warning) do { IGNORE_WARNING_IMPL(GCC, warning) } while (false) >+#define IGNORE_WARNING_GCC_OR_CLANG_END(warning) do { IGNORE_WARNING_END_IMPL(GCC, warning) } while (false) >+#define IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL(warning) IGNORE_WARNING_IMPL(GCC, warning) >+#define IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END(warning) IGNORE_WARNING_END_IMPL(GCC, warning) >+#endif >+ >+#if !defined(IGNORE_WARNING_GCC_OR_CLANG) >+#define IGNORE_WARNING_GCC_OR_CLANG(x) do { } while (false) >+#define IGNORE_WARNING_GCC_OR_CLANG_END(x) do { } while (false) >+#define IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL(x) >+#define IGNORE_WARNING_GCC_OR_CLANG_END_TOP_LEVEL(x) >+#endif >+ > #endif /* WTF_Compiler_h */ >diff --git a/Source/WTF/wtf/MD5.cpp b/Source/WTF/wtf/MD5.cpp >index e49ba1beb5c80f7cec433fd832722c0925273090..535779a3221edc639fd206b2c178c376e526249e 100644 >--- a/Source/WTF/wtf/MD5.cpp >+++ b/Source/WTF/wtf/MD5.cpp >@@ -59,26 +59,23 @@ namespace WTF { > > MD5::MD5() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_MD5_Init(&m_context); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void MD5::addBytes(const uint8_t* input, size_t length) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_MD5_Update(&m_context, input, length); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void MD5::checksum(Digest& hash) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_MD5_Final(hash.data(), &m_context); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > #else >diff --git a/Source/WTF/wtf/PrintStream.cpp b/Source/WTF/wtf/PrintStream.cpp >index 380c67bcbb90e366d86180878073245e613e4b4f..2c5a7a12040e2430746ffba88fd316bde5696ddb 100644 >--- a/Source/WTF/wtf/PrintStream.cpp >+++ b/Source/WTF/wtf/PrintStream.cpp >@@ -46,22 +46,14 @@ void PrintStream::printf(const char* format, ...) > > void PrintStream::printfVariableFormat(const char* format, ...) > { >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#elif COMPILER(GCC) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); >+ IGNORE_WARNING_GCC("-Wsuggest-attribute=format"); > va_list argList; > va_start(argList, format); > vprintf(format, argList); > va_end(argList); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#elif COMPILER(GCC) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_END("-Wsuggest-attribute=format"); >+ IGNORE_WARNING_CLANG_END("-Wformat-nonliteral"); > } > > void PrintStream::flush() >diff --git a/Source/WTF/wtf/SHA1.cpp b/Source/WTF/wtf/SHA1.cpp >index 305f077589d9ba3e650fb3e75ccfead6e2d52aff..3fd8e30f40028e57ea0daa09b5367d74ca4cb1cd 100644 >--- a/Source/WTF/wtf/SHA1.cpp >+++ b/Source/WTF/wtf/SHA1.cpp >@@ -41,26 +41,23 @@ namespace WTF { > > SHA1::SHA1() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_SHA1_Init(&m_context); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void SHA1::addBytes(const uint8_t* input, size_t length) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_SHA1_Update(&m_context, input, length); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void SHA1::computeHash(Digest& hash) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_SHA1_Final(hash.data(), &m_context); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > #else >diff --git a/Source/WTF/wtf/ThreadingPthreads.cpp b/Source/WTF/wtf/ThreadingPthreads.cpp >index dd01c6c76ee69859c4ccd8b11c6c9a8cd1c04962..c25dfe26047b382696dc725c7bccf57fcc54f91f 100644 >--- a/Source/WTF/wtf/ThreadingPthreads.cpp >+++ b/Source/WTF/wtf/ThreadingPthreads.cpp >@@ -109,15 +109,8 @@ static LazyNeverDestroyed<Semaphore> globalSemaphoreForSuspendResume; > static constexpr const int SigThreadSuspendResume = SIGUSR1; > static std::atomic<Thread*> targetThread { nullptr }; > >-#if COMPILER(GCC) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wreturn-local-addr" >-#endif // COMPILER(GCC) >- >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wreturn-stack-address" >-#endif // COMPILER(CLANG) >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wreturn-local-addr") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wreturn-stack-address") > > static NEVER_INLINE void* getApproximateStackPointer() > { >@@ -126,13 +119,8 @@ static NEVER_INLINE void* getApproximateStackPointer() > return bitwise_cast<void*>(stackLocation); > } > >-#if COMPILER(GCC) >-#pragma GCC diagnostic pop >-#endif // COMPILER(GCC) >- >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif // COMPILER(CLANG) >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wreturn-stack-address") >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wreturn-local-addr") > > void Thread::signalHandlerSuspendResume(int, siginfo_t*, void* ucontext) > { >diff --git a/Source/WTF/wtf/Vector.h b/Source/WTF/wtf/Vector.h >index 85184b9407c6937760a10c65b1ae57227a8f7fff..6421a284f7afe64ebecedae6129fbafdf7cab81a 100644 >--- a/Source/WTF/wtf/Vector.h >+++ b/Source/WTF/wtf/Vector.h >@@ -529,14 +529,9 @@ public: > { > ASSERT(buffer()); > >-#if COMPILER(GCC) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Winvalid-offsetof" >-#endif >+ IGNORE_WARNING_GCC("-Winvalid-offsetof"); > static_assert((offsetof(VectorBuffer, m_inlineBuffer) + sizeof(m_inlineBuffer)) % 8 == 0, "Inline buffer end needs to be on 8 byte boundary for ASan annotations to work."); >-#if COMPILER(GCC) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_END("-Winvalid-offsetof"); > > if (buffer() == inlineBuffer()) > return reinterpret_cast<char*>(m_inlineBuffer) + sizeof(m_inlineBuffer); >diff --git a/Source/WTF/wtf/text/WTFString.cpp b/Source/WTF/wtf/text/WTFString.cpp >index 2b0e5f39cd43c6df41a0c18bc4bbd384f19513d6..b58a0e8c3f5798a6a893e0fbae970d283fc5ea5f 100644 >--- a/Source/WTF/wtf/text/WTFString.cpp >+++ b/Source/WTF/wtf/text/WTFString.cpp >@@ -453,10 +453,7 @@ WTF_ATTRIBUTE_PRINTF(1, 0) static String createWithFormatAndArguments(const char > va_list argsCopy; > va_copy(argsCopy, args); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > > #if USE(CF) && !OS(WINDOWS) > if (strstr(format, "%@")) { >@@ -492,9 +489,7 @@ WTF_ATTRIBUTE_PRINTF(1, 0) static String createWithFormatAndArguments(const char > vsnprintf(buffer.data(), buffer.size(), format, argsCopy); > va_end(argsCopy); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wformat-nonliteral"); > > return StringImpl::create(reinterpret_cast<const LChar*>(buffer.data()), len); > } >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h >index 55ce825c45da783d504d7d448042ec6fdb9a888f..e848ef842ead21b343cf0c7d4eec796b9dbda2bd 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h >@@ -29,12 +29,11 @@ > #include "LibWebRTCMacros.h" > #include "RTCDataChannelHandler.h" > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/datachannelinterface.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > namespace WebCore { > >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h >index 4dafaf4f4f64c2cdb2654244eb0d41c83a7a8081..fe0b9db1f044dfc85c68f73c3c588b9471eba5ca 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h >@@ -33,15 +33,14 @@ > #include "RealtimeOutgoingVideoSource.h" > #include <Timer.h> > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/jsep.h> > #include <webrtc/api/peerconnectioninterface.h> > #include <webrtc/pc/peerconnectionfactory.h> > #include <webrtc/pc/rtcstatscollector.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/LoggerHelper.h> > #include <wtf/ThreadSafeRefCounted.h> >diff --git a/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp b/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp >index b47f8eec68837c727d5f8fcc9716dcbd3cac653e..303be218aa9fbec422f0d42f03b91df864e23774 100644 >--- a/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp >+++ b/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp >@@ -97,10 +97,8 @@ std::unique_ptr<CryptoDigest> CryptoDigest::create(CryptoDigest::Algorithm algor > case CryptoDigest::Algorithm::SHA_1: { > CC_SHA1_CTX* context = new CC_SHA1_CTX; > digest->m_context->ccContext = context; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations") > CC_SHA1_Init(context); >-#pragma clang diagnostic pop > return digest; > } > case CryptoDigest::Algorithm::SHA_224: { >@@ -134,10 +132,9 @@ void CryptoDigest::addBytes(const void* input, size_t length) > { > switch (m_context->algorithm) { > case CryptoDigest::Algorithm::SHA_1: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_SHA1_Update(toSHA1Context(m_context.get()), input, length); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return; > case CryptoDigest::Algorithm::SHA_224: > CC_SHA224_Update(toSHA224Context(m_context.get()), input, length); >@@ -160,10 +157,9 @@ Vector<uint8_t> CryptoDigest::computeHash() > switch (m_context->algorithm) { > case CryptoDigest::Algorithm::SHA_1: > result.resize(CC_SHA1_DIGEST_LENGTH); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CC_SHA1_Final(result.data(), toSHA1Context(m_context.get())); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > break; > case CryptoDigest::Algorithm::SHA_224: > result.resize(CC_SHA224_DIGEST_LENGTH); >diff --git a/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h >index 914517efe7cb14b5faf2c5b1b67f2366c62c6995..dbc82374dccd82f09b912f21485576ad42949cb6 100644 >--- a/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h >+++ b/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h >@@ -38,10 +38,9 @@ > #endif > > #import <AVKit/AVPlayerController.h> >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wobjc-property-no-attribute" >+IGNORE_WARNING_CLANG_TOPLEVEL("-Wobjc-property-no-attribute") > #import <AVKit/AVPlayerLayerView.h> >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOPLEVEL_END("-Wobjc-property-no-attribute") > #import <AVKit/AVPlayerViewController_Private.h> > #import <AVKit/AVPlayerViewController_WebKitOnly.h> > >diff --git a/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h >index 55a64886a880f5b90ea2da6cf51aba4ba67c425d..974e9a03b2cdf38dfc17b20150bd385b77c2e953 100644 >--- a/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h >+++ b/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h >@@ -86,10 +86,9 @@ inline NSData *_Nullable insecurelyArchivedDataWithRootObject(id _Nonnull object > > inline id _Nullable insecurelyUnarchiveObjectFromData(NSData * _Nonnull data) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return [NSKeyedUnarchiver unarchiveObjectWithData:data]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > inline id _Nullable unarchivedObjectOfClassesFromData(NSSet<Class> * _Nonnull classes, NSData * _Nonnull data) >diff --git a/Source/WebCore/PAL/pal/spi/ios/MediaPlayerSPI.h b/Source/WebCore/PAL/pal/spi/ios/MediaPlayerSPI.h >index dd87f93af7025bca6d133457b3f6b1206a0144f8..d7d0960753e244341a59e5605dba9f352d0ca06c 100644 >--- a/Source/WebCore/PAL/pal/spi/ios/MediaPlayerSPI.h >+++ b/Source/WebCore/PAL/pal/spi/ios/MediaPlayerSPI.h >@@ -75,21 +75,19 @@ enum { > }; > typedef NSUInteger MPAVItemType; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > @interface MPAudioVideoRoutingPopoverController : UIPopoverController > @end >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > @interface MPAudioVideoRoutingPopoverController () > - (id)initWithType:(MPAVItemType)avItemType; > @end > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > @interface MPAVRoutingSheet : UIView > @end >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > @interface MPAVRoutingSheet () > @property (nonatomic, assign, setter=setAVItemType:) MPAVItemType avItemType; >diff --git a/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm b/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm >index 2233575dc34e761e861cbb45287b733f2cd4ac23..9cb1e6dcb37ea04bb4c3a40e271bc96da2533c4f 100644 >--- a/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm >+++ b/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm >@@ -44,10 +44,9 @@ namespace PAL { > void popUpMenu(NSMenu *menu, NSPoint location, float width, NSView *view, int selectedItem, NSFont *font, NSControlSize controlSize, bool usesCustomAppearance) > { > NSRect adjustedPopupBounds = [view.window convertRectToScreen:[view convertRect:view.bounds toView:nil]]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (controlSize != NSMiniControlSize) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END(("-Wdeprecated-declarations"); > adjustedPopupBounds.origin.x -= 3; > adjustedPopupBounds.origin.y -= 1; > adjustedPopupBounds.size.width += 6; >diff --git a/Source/WebCore/PAL/pal/system/mac/WebPanel.mm b/Source/WebCore/PAL/pal/system/mac/WebPanel.mm >index 317bda02e7b7eb27a9bd2b597956f5412dacf126..4017f5ab0c674d0de4ac302655cbefb053ac43b5 100644 >--- a/Source/WebCore/PAL/pal/system/mac/WebPanel.mm >+++ b/Source/WebCore/PAL/pal/system/mac/WebPanel.mm >@@ -34,10 +34,9 @@ > > - (instancetype)init > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > static NSUInteger styleMask = NSMiniaturizableWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSTitledWindowMask | NSSmallWindowMask | NSSideUtilityWindowMask | NSUtilityWindowMask; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return [super initWithContentRect:NSZeroRect styleMask:styleMask backing:NSBackingStoreBuffered defer:YES]; > } >diff --git a/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm b/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm >index 399177f353e2f809d2dfc78ab66548aab9293594..c8e6f1e4f5f447de2957db85f63e666f51609321 100644 >--- a/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm >+++ b/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm >@@ -346,10 +346,9 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific > > // NSAccessibilityPostNotification will call this method, (but not when running DRT), so ASSERT here to make sure it does not crash. > // https://bugs.webkit.org/show_bug.cgi?id=46662 >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ASSERT([obj->wrapper() accessibilityIsIgnored] || true); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > AXPostNotificationWithUserInfo(obj->wrapper(), macNotification, nil); > } >diff --git a/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm b/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm >index cce972cfcd02e5754eccecc578fa4b40a9968c26..c62bc8e1da9cfd8530fb72be0a0209da6c061bf5 100644 >--- a/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm >+++ b/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm >@@ -55,10 +55,9 @@ void AccessibilityObject::overrideAttachmentParent(AccessibilityObject* parent) > parentWrapper = parent->wrapper(); > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[wrapper() attachmentView] accessibilitySetOverrideValue:parentWrapper forAttribute:NSAccessibilityParentAttribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > bool AccessibilityObject::accessibilityIgnoreAttachment() const >@@ -69,11 +68,10 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const > if (isAttachment() && (widget = widgetForAttachmentView()) && widget->isFrameView()) > return true; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if ([wrapper() attachmentView]) > return [[wrapper() attachmentView] accessibilityIsIgnored]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // Attachments are ignored by default (unless we determine that we should expose them). > return true; >diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >index 04c186a08ac8af28607c41ba7edd0a017c92bf66..f142e8a52dfbcdba08746f080d59d1c9690d452a 100644 >--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >@@ -1679,10 +1679,9 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache* cache, const Visibl > Widget* widget = m_object->widget(); > if (!widget) > return nil; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return [(widget->platformWidget()) accessibilityAttributeValue: NSAccessibilityChildrenAttribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (id)remoteAccessibilityParentObject >@@ -1751,10 +1750,9 @@ static NSMutableArray *convertStringsToNSArray(const Vector<String>& vector) > if (frameView && frameView->platformWidget()) { > NSPoint nsPoint = (NSPoint)point; > NSView* view = frameView->documentView(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > nsPoint = [[view window] convertBaseToScreen:[view convertPoint:nsPoint toView:nil]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return CGPointMake(nsPoint.x, nsPoint.y); > } else { > >@@ -2006,11 +2004,10 @@ static NSString *roleValueToNSString(AccessibilityRole value) > > - (NSString*)role > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (m_object->isAttachment()) > return [[self attachmentView] accessibilityAttributeValue:NSAccessibilityRoleAttribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > AccessibilityRole role = m_object->roleValue(); > > if (role == AccessibilityRole::Label && is<AccessibilityLabel>(*m_object) && downcast<AccessibilityLabel>(*m_object).containsOnlyStaticText()) >@@ -2030,8 +2027,7 @@ static NSString *roleValueToNSString(AccessibilityRole value) > return NSAccessibilityUnknownRole; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > - (NSString*)subrole > { > if (m_object->isPasswordField()) >@@ -2241,19 +2237,18 @@ static NSString *roleValueToNSString(AccessibilityRole value) > > return nil; > } >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > - (NSString*)roleDescription > { > if (!m_object) > return nil; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // attachments have the AXImage role, but a different subrole > if (m_object->isAttachment()) > return [[self attachmentView] accessibilityAttributeValue:NSAccessibilityRoleDescriptionAttribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > const AtomicString& overrideRoleDescription = m_object->roleDescription(); > if (!overrideRoleDescription.isNull() && !overrideRoleDescription.isEmpty()) >@@ -3472,8 +3467,7 @@ static NSString *roleValueToNSString(AccessibilityRole value) > return paramAttrs; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > - (void)accessibilityPerformPressAction > { >@@ -3531,7 +3525,7 @@ static NSString *roleValueToNSString(AccessibilityRole value) > m_object->decrement(); > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > - (void)accessibilityPerformShowMenuAction > { >@@ -4343,8 +4337,7 @@ static void formatForDebugger(const VisiblePositionRange& range, char* buffer, u > return NSNotFound; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > - (NSUInteger)accessibilityArrayAttributeCount:(NSString *)attribute > { > if (![self updateObjectBackingStore]) >@@ -4365,7 +4358,7 @@ static void formatForDebugger(const VisiblePositionRange& range, char* buffer, u > > return [super accessibilityArrayAttributeCount:attribute]; > } >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > - (NSArray *)accessibilityArrayAttributeValues:(NSString *)attribute index:(NSUInteger)index maxCount:(NSUInteger)maxCount > { >diff --git a/Source/WebCore/bridge/objc/WebScriptObject.mm b/Source/WebCore/bridge/objc/WebScriptObject.mm >index 02b84283ed39b1412da0c0133a02739a0b642334..f11c6dde36a6f4cb7246db7a077e2eb45179940d 100644 >--- a/Source/WebCore/bridge/objc/WebScriptObject.mm >+++ b/Source/WebCore/bridge/objc/WebScriptObject.mm >@@ -702,13 +702,12 @@ static void getListFromNSArray(ExecState *exec, NSArray *array, RootObject* root > return self; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wobjc-missing-super-calls" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wobjc-missing-super-calls") > - (void)dealloc > { > return; > } >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wobjc-missing-super-calls") > > + (WebUndefined *)undefined > { >diff --git a/Source/WebCore/bridge/objc/objc_class.mm b/Source/WebCore/bridge/objc/objc_class.mm >index ce1ef6557a0763a7d3430a3bf986a1987f8cb356..882c4f5bc93a8cd30c4b94c6caca412fdbdf0a67 100644 >--- a/Source/WebCore/bridge/objc/objc_class.mm >+++ b/Source/WebCore/bridge/objc/objc_class.mm >@@ -163,10 +163,9 @@ Field* ObjcClass::fieldNamed(PropertyName propertyName, Instance* instance) cons > RetainPtr<CFStringRef> fieldName = adoptCF(CFStringCreateWithCString(NULL, jsName.data(), kCFStringEncodingASCII)); > id targetObject = (static_cast<ObjcInstance*>(instance))->getObject(); > #if PLATFORM(IOS) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wundeclared-selector" >+ IGNORE_WARNING_CLANG("-Wundeclared-selector"); > id attributes = [targetObject respondsToSelector:@selector(attributeKeys)] ? [targetObject performSelector:@selector(attributeKeys)] : nil; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wundeclared-selector"); > #else > id attributes = [targetObject attributeKeys]; > #endif >diff --git a/Source/WebCore/crypto/CommonCryptoUtilities.cpp b/Source/WebCore/crypto/CommonCryptoUtilities.cpp >index e0492ee67110f88c7315216d6c68b633496d77a0..8feaf3601092e43f8f2a2cb80471252cf7920e0d 100644 >--- a/Source/WebCore/crypto/CommonCryptoUtilities.cpp >+++ b/Source/WebCore/crypto/CommonCryptoUtilities.cpp >@@ -52,10 +52,9 @@ bool getCommonCryptoDigestAlgorithm(CryptoAlgorithmIdentifier hashFunction, CCDi > { > switch (hashFunction) { > case CryptoAlgorithmIdentifier::SHA_1: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > algorithm = kCCDigestSHA1; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return true; > case CryptoAlgorithmIdentifier::SHA_224: > algorithm = kCCDigestSHA224; >diff --git a/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp b/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp >index b2bc24888c7ee758e9db402397a8fa6e4f1d1e08..83dca4f5c027ba1771435718550e95afc45c9762 100644 >--- a/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp >+++ b/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp >@@ -40,10 +40,9 @@ static ExceptionOr<Vector<uint8_t>> encryptAES_GCM(const Vector<uint8_t>& iv, co > Vector<uint8_t> cipherText(plainText.size()); // Per section 5.2.1.2: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf > Vector<uint8_t> tag(desiredTagLengthInBytes); > // tagLength is actual an input <rdar://problem/30660074> >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CCCryptorStatus status = CCCryptorGCM(kCCEncrypt, kCCAlgorithmAES, key.data(), key.size(), iv.data(), iv.size(), additionalData.data(), additionalData.size(), plainText.data(), plainText.size(), cipherText.data(), tag.data(), &desiredTagLengthInBytes); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (status) > return Exception { OperationError }; > >@@ -58,10 +57,9 @@ static ExceptionOr<Vector<uint8_t>> decyptAES_GCM(const Vector<uint8_t>& iv, con > Vector<uint8_t> tag(desiredTagLengthInBytes); > size_t offset = cipherText.size() - desiredTagLengthInBytes; > // tagLength is actual an input <rdar://problem/30660074> >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CCCryptorStatus status = CCCryptorGCM(kCCDecrypt, kCCAlgorithmAES, key.data(), key.size(), iv.data(), iv.size(), additionalData.data(), additionalData.size(), cipherText.data(), offset, plainText.data(), tag.data(), &desiredTagLengthInBytes); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (status) > return Exception { OperationError }; > >diff --git a/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm b/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm >index a517f922e048d14177c4f6f8c436231308814969..79464a4680e39adfac3840f2cc0570a144dd58c6 100644 >--- a/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm >+++ b/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm >@@ -220,15 +220,14 @@ bool wrapSerializedCryptoKey(const Vector<uint8_t>& masterKey, const Vector<uint > size_t tagLength = 16; > uint8_t tag[tagLength]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > status = CCCryptorGCM(kCCEncrypt, kCCAlgorithmAES128, kek.data(), kek.size(), > nullptr, 0, // iv > nullptr, 0, // auth data > key.data(), key.size(), > encryptedKey.data(), > tag, &tagLength); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > if (status != kCCSuccess) > return false; >@@ -289,15 +288,14 @@ bool unwrapSerializedCryptoKey(const Vector<uint8_t>& masterKey, const Vector<ui > uint8_t actualTag[tagLength]; > > key.resize(encryptedKey.size()); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > status = CCCryptorGCM(kCCDecrypt, kCCAlgorithmAES128, kek.data(), kek.size(), > nullptr, 0, // iv > nullptr, 0, // auth data > encryptedKey.data(), encryptedKey.size(), > key.data(), > actualTag, &tagLength); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > if (status != kCCSuccess) > return false; >diff --git a/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py b/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py >index b34e617b146d329fb1bc32a0bb70c7cbba49991a..67bf98b09b714d4f5fbaa1e173cf4f01f7c9a8cb 100644 >--- a/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py >+++ b/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py >@@ -94,11 +94,8 @@ output_file.write(""" > > #include "CSSParserSelector.h" > >-#if defined(__clang__) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wimplicit-fallthrough" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wimplicit-fallthrough") > > // Older versions of gperf like to use the `register` keyword. > #define register >@@ -203,9 +200,8 @@ PseudoClassOrCompatibilityPseudoElement parsePseudoClassAndCompatibilityElementS > > } // namespace WebCore > >-#if defined(__clang__) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wimplicit-fallthrough") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > > """) > output_file.close() >diff --git a/Source/WebCore/css/makeSelectorPseudoElementsMap.py b/Source/WebCore/css/makeSelectorPseudoElementsMap.py >index 201826ed513894d4ff7f3af0513ad7238692af88..334c9361d1a1b4a1502f1b4a692e629c369d0aa6 100644 >--- a/Source/WebCore/css/makeSelectorPseudoElementsMap.py >+++ b/Source/WebCore/css/makeSelectorPseudoElementsMap.py >@@ -92,11 +92,8 @@ output_file.write(""" > #include "config.h" > #include "SelectorPseudoTypeMap.h" > >-#if defined(__clang__) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wimplicit-fallthrough" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wimplicit-fallthrough") > > // Older versions of gperf like to use the `register` keyword. > #define register >@@ -198,9 +195,8 @@ CSSSelector::PseudoElementType parsePseudoElementString(const StringImpl& pseudo > > } // namespace WebCore > >-#if defined(__clang__) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wimplicit-fallthrough") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > > """) > output_file.close() >diff --git a/Source/WebCore/editing/TextIterator.cpp b/Source/WebCore/editing/TextIterator.cpp >index 66508203d4688706a75a697705345641bfcab064..b79ce08850ac8aa1452faa010ba78d8ab8c128dd 100644 >--- a/Source/WebCore/editing/TextIterator.cpp >+++ b/Source/WebCore/editing/TextIterator.cpp >@@ -2011,10 +2011,7 @@ static inline bool containsKanaLetters(const String& pattern) > return false; > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > // NOTE: ICU's unorm_normalize function is deprecated. > > static void normalizeCharacters(const UChar* characters, unsigned length, Vector<UChar>& buffer) >@@ -2038,9 +2035,7 @@ static void normalizeCharacters(const UChar* characters, unsigned length, Vector > ASSERT(status == U_STRING_NOT_TERMINATED_WARNING); > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > static bool isNonLatin1Separator(UChar32 character) > { >diff --git a/Source/WebCore/editing/mac/EditorMac.mm b/Source/WebCore/editing/mac/EditorMac.mm >index cf289bf70e400036767808d1a1699f68237aac00..6568782867be0b26b46aacf2ada1b63773d9f80b 100644 >--- a/Source/WebCore/editing/mac/EditorMac.mm >+++ b/Source/WebCore/editing/mac/EditorMac.mm >@@ -81,11 +81,10 @@ void Editor::pasteWithPasteboard(Pasteboard* pasteboard, bool allowPlainText, Ma > { > RefPtr<Range> range = selectedRange(); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // FIXME: How can this hard-coded pasteboard name be right, given that the passed-in pasteboard has a name? > client()->setInsertionPasteboard(NSGeneralPboard); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > bool chosePlainText; > RefPtr<DocumentFragment> fragment = webContentFromPasteboard(*pasteboard, *range, allowPlainText, chosePlainText); >@@ -111,11 +110,10 @@ void Editor::takeFindStringFromSelection() > > Vector<String> types; > types.append(String(legacyStringPasteboardType())); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > platformStrategies()->pasteboardStrategy()->setTypes(types, NSFindPboard); > platformStrategies()->pasteboardStrategy()->setStringForType(m_frame.displayStringModifiedByEncoding(selectedTextForDataTransfer()), legacyStringPasteboardType(), NSFindPboard); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void Editor::readSelectionFromPasteboard(const String& pasteboardName, MailBlockquoteHandling mailBlockquoteHandling) >@@ -169,11 +167,10 @@ void Editor::replaceNodeFromPasteboard(Node* node, const String& pasteboardName) > return; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // FIXME: How can this hard-coded pasteboard name be right, given that the passed-in pasteboard has a name? > client()->setInsertionPasteboard(NSGeneralPboard); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > bool chosePlainText; > if (RefPtr<DocumentFragment> fragment = webContentFromPasteboard(pasteboard, *range, true, chosePlainText)) { >diff --git a/Source/WebCore/page/mac/EventHandlerMac.mm b/Source/WebCore/page/mac/EventHandlerMac.mm >index a26430cf2524ad204d61379a0ed0b0099656b91d..f0052aae39aabd084dc3be940ee9c0a2264ded15 100644 >--- a/Source/WebCore/page/mac/EventHandlerMac.mm >+++ b/Source/WebCore/page/mac/EventHandlerMac.mm >@@ -612,10 +612,9 @@ void EventHandler::sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent) > // no up-to-date cache of them anywhere. > fakeEvent = [NSEvent mouseEventWithType:NSEventTypeMouseMoved > location:[[view->platformWidget() window] >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > convertScreenToBase:[NSEvent mouseLocation]] >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > modifierFlags:[initiatingEvent modifierFlags] > timestamp:[initiatingEvent timestamp] > windowNumber:[initiatingEvent windowNumber] >diff --git a/Source/WebCore/page/mac/ServicesOverlayController.mm b/Source/WebCore/page/mac/ServicesOverlayController.mm >index 52db99e0f9e57f3ba358df85f071db785284bc0f..ed31c0f55462ac7a28689e3b4b291ac10c214279 100644 >--- a/Source/WebCore/page/mac/ServicesOverlayController.mm >+++ b/Source/WebCore/page/mac/ServicesOverlayController.mm >@@ -132,10 +132,9 @@ void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, G > > CGContextRef cgContext = graphicsContext.platformContext(); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGLayerRef highlightLayer = DDHighlightGetLayerWithContext(ddHighlight(), cgContext); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGRect highlightBoundingRect = DDHighlightGetBoundingRect(ddHighlight()); > highlightBoundingRect.origin = CGPointZero; > >diff --git a/Source/WebCore/platform/LocalizedStrings.cpp b/Source/WebCore/platform/LocalizedStrings.cpp >index b0550cf5305e8635db4d5a82e8966f08f02a750b..7cf7e8163a107cbcb12d9346b5646e87b16d0068 100644 >--- a/Source/WebCore/platform/LocalizedStrings.cpp >+++ b/Source/WebCore/platform/LocalizedStrings.cpp >@@ -54,14 +54,9 @@ String formatLocalizedString(String format, ...) > va_list arguments; > va_start(arguments, format); > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wformat-nonliteral" >-#endif >+ IGNORE_WARNING_CLANG("-Wformat-nonliteral"); > auto result = adoptCF(CFStringCreateWithFormatAndArguments(0, 0, format.createCFString().get(), arguments)); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wformat-nonliteral"); > > va_end(arguments); > return result.get(); >diff --git a/Source/WebCore/platform/ScreenProperties.h b/Source/WebCore/platform/ScreenProperties.h >index 41a50b213fde08d37fdbaacbbc96b61ac873135c..6a38ed96e8339777a2db19cf200588c652ef9f26 100644 >--- a/Source/WebCore/platform/ScreenProperties.h >+++ b/Source/WebCore/platform/ScreenProperties.h >@@ -195,10 +195,9 @@ std::optional<ScreenData> ScreenData::decode(Decoder& decoder) > > auto colorSpaceData = adoptCF(CFDataCreate(kCFAllocatorDefault, iccData->data(), iccData->size())); > // FIXME: <http://webkit.org/b/184358> We should switch to CGColorSpaceCreateICCBased. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > cgColorSpace = adoptCF(CGColorSpaceCreateWithICCProfile(colorSpaceData.get())); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > break; > } > } >diff --git a/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp b/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp >index b6ce696205107bd22e94fc435d8701e0f83ee62e..cfba8314c10b785a76f5a89be220dbd7161ff42d 100644 >--- a/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp >+++ b/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp >@@ -103,10 +103,9 @@ HIDGamepadProvider::HIDGamepadProvider() > > void HIDGamepadProvider::stopMonitoringInput() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >+ IGNORE_WARNING_CLANG("-Wnonnull"); > IOHIDManagerRegisterInputValueCallback(m_manager.get(), nullptr, nullptr); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wnonnull"); > } > > void HIDGamepadProvider::startMonitoringInput() >diff --git a/Source/WebCore/platform/graphics/PlatformDisplay.cpp b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >index 5f29af85a9483d4762e987b3205b80e17c3bb19c..eaafd7904ed8fca4397daabc37e18323f75a6709 100644 >--- a/Source/WebCore/platform/graphics/PlatformDisplay.cpp >+++ b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >@@ -118,14 +118,9 @@ std::unique_ptr<PlatformDisplay> PlatformDisplay::createPlatformDisplay() > PlatformDisplay& PlatformDisplay::sharedDisplay() > { > static std::once_flag onceFlag; >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wexit-time-destructors" >-#endif >+ IGNORE_WARNING_CLANG("-Wexit-time-destructors"); > static std::unique_ptr<PlatformDisplay> display; >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wexit-time-destructors"); > std::call_once(onceFlag, []{ > display = createPlatformDisplay(); > }); >diff --git a/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp b/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp >index 4d5d8088a92ce97e9cd480bc4c8ea568b8e6a6ba..19ebfc71ab31103a0392c5ffdf4f80fd1a271820 100644 >--- a/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp >+++ b/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp >@@ -69,10 +69,7 @@ bool SurrogatePairAwareTextIterator::consumeSlowCase(UChar32& character, unsigne > return true; > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > // NOTE: ICU's unorm_normalize function is deprecated. > > UChar32 SurrogatePairAwareTextIterator::normalizeVoicingMarks() >@@ -95,8 +92,6 @@ UChar32 SurrogatePairAwareTextIterator::normalizeVoicingMarks() > return 0; > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm >index b2c1e96634b3f564ffc0c5bd16b29ee42d84fa2c..590672bc2b8f52b12386971976d0bb7a11f5ea34 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm >@@ -123,10 +123,9 @@ void MediaSelectionGroupAVFObjC::updateOptions(const Vector<String>& characteris > > m_options.remove((__bridge CFTypeRef)removedAVOption); > } >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > AVMediaSelectionOption* selectedOption = [m_playerItem selectedMediaOptionInMediaSelectionGroup:m_mediaSelectionGroup.get()]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > for (AVMediaSelectionOption* addedAVOption in addedAVOptions.get()) { > auto addedOption = MediaSelectionOptionAVFObjC::create(*this, addedAVOption); > if (addedAVOption == selectedOption) >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >index 26ab024d8bc9f82bf7d6555936dc5eb5aa4b5028..bf8e0ee59a2046bbd482945254896b14051eb656 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >@@ -198,12 +198,11 @@ bool CDMSessionAVStreamSession::update(Uint8Array* key, RefPtr<Uint8Array>& next > > RetainPtr<NSData> certificateData = adoptNS([[NSData alloc] initWithBytes:m_certificate->data() length:m_certificate->length()]); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wobjc-literal-conversion" >+ IGNORE_WARNING_CLANG("-Wobjc-literal-conversion"); > String storagePath = this->storagePath(); > if (!storagePath.isEmpty() && [getAVStreamSessionClass() respondsToSelector:@selector(removePendingExpiredSessionReports:withAppIdentifier:storageDirectoryAtURL:)]) > [getAVStreamSessionClass() removePendingExpiredSessionReports:@[m_expiredSession.get()] withAppIdentifier:certificateData.get() storageDirectoryAtURL:[NSURL fileURLWithPath:storagePath]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wobjc-literal-conversion"); > m_expiredSession = nullptr; > return true; > } >@@ -243,10 +242,9 @@ bool CDMSessionAVStreamSession::update(Uint8Array* key, RefPtr<Uint8Array>& next > } > > NSError* error = nil; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > RetainPtr<NSData> request = [protectedSourceBuffer->parser() streamingContentKeyRequestDataForApp:certificateData.get() contentIdentifier:initData.get() trackID:protectedSourceBuffer->protectedTrackID() options:options.get() error:&error]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > if (![protectedSourceBuffer->parser() respondsToSelector:@selector(contentProtectionSessionIdentifier)]) > m_sessionId = createCanonicalUUIDString(); >@@ -273,10 +271,9 @@ bool CDMSessionAVStreamSession::update(Uint8Array* key, RefPtr<Uint8Array>& next > errorCode = MediaPlayer::NoError; > systemCode = 0; > RetainPtr<NSData> keyData = adoptNS([[NSData alloc] initWithBytes:key->data() length:key->length()]); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [protectedSourceBuffer->parser() processContentKeyResponseData:keyData.get() forTrackID:protectedSourceBuffer->protectedTrackID()]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return true; > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h >index d326f2fa2fb2b1c60ed9e3b9388aa5459d9d75e1..bca894d851d70cd30b02fff0a5cd4aa17c2e98db 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h >@@ -54,11 +54,11 @@ public: > > // SourceBufferPrivateAVFObjCErrorClient > void layerDidReceiveError(AVSampleBufferDisplayLayer *, NSError *, bool& shouldIgnore) override; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void rendererDidReceiveError(AVSampleBufferAudioRenderer *, NSError *, bool& shouldIgnore) override; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > > void addSourceBuffer(SourceBufferPrivateAVFObjC*); > void removeSourceBuffer(SourceBufferPrivateAVFObjC*); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index dc3deeb3f792090fb06727ef44734ad083d50f82..9552100af89ee13ea22620299bd245978235fb62 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -2699,10 +2699,9 @@ void MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack(InbandTextTrackPriv > > if (track) { > if (track->textTrackCategory() == InbandTextTrackPrivateAVF::LegacyClosedCaption) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [m_avPlayer.get() setClosedCaptionDisplayEnabled:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) > #if ENABLE(AVF_CAPTIONS) > else if (track->textTrackCategory() == InbandTextTrackPrivateAVF::OutOfBand) >@@ -2715,10 +2714,9 @@ void MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack(InbandTextTrackPriv > #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) > [m_avPlayerItem.get() selectMediaOption:0 inMediaSelectionGroup:safeMediaSelectionGroupForLegibleMedia()]; > #endif >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [m_avPlayer.get() setClosedCaptionDisplayEnabled:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > } >@@ -2734,10 +2732,9 @@ String MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack() const > #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) > // If AVFoundation has an audible group, return the language of the currently selected audible option. > AVMediaSelectionGroupType *audibleGroup = [m_avAsset.get() mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicAudible]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > AVMediaSelectionOptionType *currentlySelectedAudibleOption = [m_avPlayerItem.get() selectedMediaOptionInMediaSelectionGroup:audibleGroup]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (currentlySelectedAudibleOption) { > m_languageOfPrimaryAudioTrack = [[currentlySelectedAudibleOption locale] localeIdentifier]; > INFO_LOG(LOGIDENTIFIER, "language of selected audible option ", m_languageOfPrimaryAudioTrack); >@@ -3248,10 +3245,9 @@ void MediaPlayerPrivateAVFoundationObjC::canPlayFastReverseDidChange(bool newVal > void MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep(bool flag) > { > #if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR) && !PLATFORM(IOSMAC) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [m_avPlayer _setPreventsSleepDuringVideoPlayback:flag]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #else > UNUSED_PARAM(flag); > #endif >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h >index 0444d9af0573f5b727a6359db5de471da827aee3..39a6596fb48bea39f403f7c974e249953a66eef0 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h >@@ -69,12 +69,12 @@ public: > static void getSupportedTypes(HashSet<String, ASCIICaseInsensitiveHash>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void addAudioRenderer(AVSampleBufferAudioRenderer*); > void removeAudioRenderer(AVSampleBufferAudioRenderer*); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > > MediaPlayer::NetworkState networkState() const override; > MediaPlayer::ReadyState readyState() const override; >@@ -87,11 +87,11 @@ public: > void setLoadingProgresssed(bool flag) { m_loadingProgressed = flag; } > void setHasAvailableVideoFrame(bool); > bool hasAvailableVideoFrame() const override; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void setHasAvailableAudioSample(AVSampleBufferAudioRenderer*, bool); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > bool allRenderersHaveAvailableSamples() const { return m_allRenderersHaveAvailableSamples; } > void updateAllRenderersHaveAvailableSamples(); > void durationChanged(); >@@ -267,12 +267,12 @@ private: > struct AudioRendererProperties { > bool hasAudibleSample { false }; > }; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > HashMap<RetainPtr<CFTypeRef>, AudioRendererProperties> m_sampleBufferAudioRendererMap; > RetainPtr<AVSampleBufferRenderSynchronizer> m_synchronizer; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > RetainPtr<id> m_timeJumpedObserver; > RetainPtr<id> m_durationObserver; > RetainPtr<AVStreamSession> m_streamSession; >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >index 968fc5a087f311d88b239e676948949213b4cba6..024441d6bce0bb2c2efaa234a4b454add8357b36 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >@@ -62,17 +62,17 @@ SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation) > > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVAsset) > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVURLAsset) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVSampleBufferAudioRenderer) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVSampleBufferDisplayLayer) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVSampleBufferRenderSynchronizer) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVStreamDataParser) > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVStreamSession); > SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVVideoPerformanceMetrics) >@@ -773,11 +773,11 @@ void MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame(bool flag) > } > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample(AVSampleBufferAudioRenderer* renderer, bool flag) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > { > auto iter = m_sampleBufferAudioRendererMap.find((__bridge CFTypeRef)renderer); > if (iter == m_sampleBufferAudioRendererMap.end()) >@@ -1017,11 +1017,11 @@ void MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState(MediaPlayer::NetworkS > m_player->networkStateChanged(); > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(AVSampleBufferAudioRenderer* audioRenderer) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > { > if (!m_sampleBufferAudioRendererMap.add((__bridge CFTypeRef)audioRenderer, AudioRendererProperties()).isNewEntry) > return; >@@ -1034,11 +1034,11 @@ void MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(AVSampleBufferAudioR > m_player->client().mediaPlayerRenderingModeChanged(m_player); > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer(AVSampleBufferAudioRenderer* audioRenderer) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > { > auto iter = m_sampleBufferAudioRendererMap.find((__bridge CFTypeRef)audioRenderer); > if (iter == m_sampleBufferAudioRendererMap.end()) >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h >index 019cf37b6bbdaac4c4ebfea3f984b2abd9bf13a1..ccc22d303b9cde2476a494567ade14d573539e52 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h >@@ -70,11 +70,11 @@ class SourceBufferPrivateAVFObjCErrorClient { > public: > virtual ~SourceBufferPrivateAVFObjCErrorClient() = default; > virtual void layerDidReceiveError(AVSampleBufferDisplayLayer *, NSError *, bool& shouldIgnore) = 0; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > virtual void rendererDidReceiveError(AVSampleBufferAudioRenderer *, NSError *, bool& shouldIgnore) = 0; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > }; > > class SourceBufferPrivateAVFObjC final : public SourceBufferPrivate { >@@ -117,11 +117,11 @@ public: > void unregisterForErrorNotifications(SourceBufferPrivateAVFObjCErrorClient*); > void layerDidReceiveError(AVSampleBufferDisplayLayer *, NSError *); > void outputObscuredDueToInsufficientExternalProtectionChanged(bool); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void rendererDidReceiveError(AVSampleBufferAudioRenderer *, NSError *); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > > void setVideoLayer(AVSampleBufferDisplayLayer*); > void setDecompressionSession(WebCoreDecompressionSession*); >@@ -152,11 +152,11 @@ private: > void destroyRenderers(); > > void flushVideo(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void flush(AVSampleBufferAudioRenderer *); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > > WeakPtr<SourceBufferPrivateAVFObjC> createWeakPtr() { return m_weakFactory.createWeakPtr(*this); } > >@@ -170,11 +170,11 @@ private: > RetainPtr<AVStreamDataParser> m_parser; > RetainPtr<AVAsset> m_asset; > RetainPtr<AVSampleBufferDisplayLayer> m_displayLayer; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > HashMap<int, RetainPtr<AVSampleBufferAudioRenderer>> m_audioRenderers; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > RetainPtr<WebAVStreamDataParserListener> m_delegate; > RetainPtr<WebAVSampleBufferErrorListener> m_errorListener; > RetainPtr<NSError> m_hdcpError; >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >index dc93478ee35b309fbe8f1d25fe3512965fe066f5..e9cbbb70620ec71b06fa4c7ba8aebe963af5e078 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >@@ -68,11 +68,11 @@ SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation) > > SOFT_LINK_CLASS(AVFoundation, AVAssetTrack) > SOFT_LINK_CLASS(AVFoundation, AVStreamDataParser) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > SOFT_LINK_CLASS(AVFoundation, AVSampleBufferAudioRenderer) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > SOFT_LINK_CLASS(AVFoundation, AVSampleBufferDisplayLayer) > SOFT_LINK_CLASS(AVFoundation, AVStreamSession) > >@@ -243,23 +243,23 @@ SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotific > @interface WebAVSampleBufferErrorListener : NSObject { > WebCore::SourceBufferPrivateAVFObjC* _parent; > Vector<RetainPtr<AVSampleBufferDisplayLayer>> _layers; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > Vector<RetainPtr<AVSampleBufferAudioRenderer>> _renderers; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > } > > - (id)initWithParent:(WebCore::SourceBufferPrivateAVFObjC*)parent; > - (void)invalidate; > - (void)beginObservingLayer:(AVSampleBufferDisplayLayer *)layer; > - (void)stopObservingLayer:(AVSampleBufferDisplayLayer *)layer; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > - (void)beginObservingRenderer:(AVSampleBufferAudioRenderer *)renderer; > - (void)stopObservingRenderer:(AVSampleBufferAudioRenderer *)renderer; >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > @end > > @implementation WebAVSampleBufferErrorListener >@@ -322,12 +322,12 @@ SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotific > [[NSNotificationCenter defaultCenter] removeObserver:self name:AVSampleBufferDisplayLayerFailedToDecodeNotification object:layer]; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > - (void)beginObservingRenderer:(AVSampleBufferAudioRenderer*)renderer > { >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > ASSERT(_parent); > ASSERT(!_renderers.contains(renderer)); > >@@ -335,11 +335,11 @@ SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotific > [renderer addObserver:self forKeyPath:@"error" options:NSKeyValueObservingOptionNew context:nullptr]; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > - (void)stopObservingRenderer:(AVSampleBufferAudioRenderer*)renderer >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > { > ASSERT(_parent); > ASSERT(_renderers.contains(renderer)); >@@ -372,11 +372,11 @@ SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotific > ASSERT_NOT_REACHED(); > > } else if ([object isKindOfClass:getAVSampleBufferAudioRendererClass()]) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG("-Wunknown-pragmas"); >+ IGNORE_WARNING_CLANG("-Wunguarded-availability-new"); > RetainPtr<AVSampleBufferAudioRenderer> renderer = (AVSampleBufferAudioRenderer *)object; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wunguarded-availability-new"); >+ IGNORE_WARNING_CLANG_END("-Wunknown-pragmas"); > RetainPtr<NSError> error = [change valueForKey:NSKeyValueChangeNewKey]; > > ASSERT(_renderers.contains(renderer.get())); >@@ -852,21 +852,21 @@ void SourceBufferPrivateAVFObjC::trackDidChangeEnabled(AudioTrackPrivateMediaSou > int trackID = track->trackID(); > > if (!track->enabled()) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG("-Wunknown-pragmas"); >+ IGNORE_WARNING_CLANG("-Wunguarded-availability-new"); > RetainPtr<AVSampleBufferAudioRenderer> renderer = m_audioRenderers.get(trackID); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wunguarded-availability-new"); >+ IGNORE_WARNING_CLANG_END("-Wunknown-pragmas"); > [m_parser setShouldProvideMediaData:NO forTrackID:trackID]; > if (m_mediaSource) > m_mediaSource->player()->removeAudioRenderer(renderer.get()); > } else { > [m_parser setShouldProvideMediaData:YES forTrackID:trackID]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ IGNORE_WARNING_CLANG("-Wunknown-pragmas"); >+ IGNORE_WARNING_CLANG("-Wunguarded-availability-new"); > RetainPtr<AVSampleBufferAudioRenderer> renderer; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wunguarded-availability-new"); >+ IGNORE_WARNING_CLANG_END("-Wunknown-pragmas"); > if (!m_audioRenderers.contains(trackID)) { > renderer = adoptNS([allocAVSampleBufferAudioRendererInstance() init]); > auto weakThis = createWeakPtr(); >@@ -997,11 +997,11 @@ void SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtecti > layerDidReceiveError(m_displayLayer.get(), error.get()); > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void SourceBufferPrivateAVFObjC::rendererDidReceiveError(AVSampleBufferAudioRenderer *renderer, NSError *error) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > { > LOG(MediaSource, "SourceBufferPrivateAVFObjC::rendererDidReceiveError(%p): renderer(%p), error(%@)", this, renderer, [error description]); > >@@ -1050,11 +1050,11 @@ void SourceBufferPrivateAVFObjC::flushVideo() > } > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunguarded-availability-new") > void SourceBufferPrivateAVFObjC::flush(AVSampleBufferAudioRenderer *renderer) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunguarded-availability-new") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > { > [renderer flush]; > >diff --git a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm >index df04103c71a98964e9f29fe1981b362158a6bd99..03e14614ab0e7395f78461010332af3995db962a 100644 >--- a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm >+++ b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm >@@ -1150,10 +1150,9 @@ void PlatformCALayer::drawLayerContents(CGContextRef context, WebCore::PlatformC > > // Set up an NSGraphicsContext for the context, so that parts of AppKit that rely on > // the current NSGraphicsContext (e.g. NSCell drawing) get the right one. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSGraphicsContext* layerContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [NSGraphicsContext setCurrentContext:layerContext]; > #endif > >diff --git a/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp b/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >index ef843a061e9c0c8267163489dcfaa365b0f7579e..12cdab6bdda970c18d533972a47b92c4e3fc9cb7 100644 >--- a/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >+++ b/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >@@ -49,14 +49,9 @@ const Font* FontCascade::fontForCombiningCharacterSequence(const UChar* characte > { > UErrorCode error = U_ZERO_ERROR; > Vector<UChar, 4> normalizedCharacters(length); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG("-Wdeprecated-declarations"); > int32_t normalizedLength = unorm_normalize(characters, length, UNORM_NFC, UNORM_UNICODE_3_2, normalizedCharacters.data(), length, &error); >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+ IGNORE_WARNING_GCC_OR_CLANG_END("-Wdeprecated-declarations"); > if (U_FAILURE(error)) > return nullptr; > >diff --git a/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp b/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp >index b7d592a9c8a25d70d37f519f5137c42d3a331aee..db7a7f936c94c9207bf5d8af860601719ef10c14 100644 >--- a/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp >@@ -423,14 +423,9 @@ NativeImagePtr ImageDecoderCG::createFrameImageAtIndex(size_t index, Subsampling > // which caused a performance regression for us since the images had to be resampled/recreated every time we called > // CGContextDrawImage. We now tell CG to cache the drawn images. See also <rdar://problem/14366755> - > // CoreGraphics needs to un-deprecate kCGImageCachingTemporary since it's still not the default. >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >-#endif >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGImageSetCachingFlags(image.get(), kCGImageCachingTemporary); >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #endif // PLATFORM(IOS) > > String uti = this->uti(); >diff --git a/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h b/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h >index d6b9e105b7a972c52ecefadb1c5d55cb6f844929..de33a541b5c9a61a8ab81d80fcb5d6dc23327918 100644 >--- a/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h >+++ b/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h >@@ -34,8 +34,7 @@ class GraphicsLayer; > class GraphicsContext3D; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > #if USE(OPENGL) > @interface WebGLLayer : CALayer >@@ -67,4 +66,4 @@ class GraphicsContext3D; > > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") >diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >index e8901bc13ada405232d0d3ff4451963d7d7565b2..d69242f3a2cf5a3bcd9d550088ed62f4d16bcc09 100644 >--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >@@ -158,10 +158,9 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, > > ProviderInfo info = { cp, length, stringAttributes.get() }; > // FIXME: Some SDKs complain that the second parameter below cannot be null. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >+ IGNORE_WARNING_CLANG("-Wnonnull"); > RetainPtr<CTTypesetterRef> typesetter = adoptCF(CTTypesetterCreateWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions)); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wnonnull"); > > line = adoptCF(CTTypesetterCreateLine(typesetter.get(), CFRangeMake(0, 0))); > } else { >diff --git a/Source/WebCore/platform/graphics/mac/IconMac.mm b/Source/WebCore/platform/graphics/mac/IconMac.mm >index 6143b51d43645d5ad48c395af7c4ea26433d7c4a..7135a0d81816d62c4a232028711d3789ab3fe12c 100644 >--- a/Source/WebCore/platform/graphics/mac/IconMac.mm >+++ b/Source/WebCore/platform/graphics/mac/IconMac.mm >@@ -36,10 +36,9 @@ Icon::Icon(NSImage *image) > : m_nsImage(image) > { > // Need this because WebCore uses AppKit's flipped coordinate system exclusively. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [image setFlipped:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > Icon::~Icon() >diff --git a/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm b/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm >index 6da921b98af2f948cbac263590a34cdbc88db5b2..69ae9a2f0a8a1c3baa14047178c420feedd42073 100644 >--- a/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm >+++ b/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm >@@ -73,10 +73,9 @@ void PDFDocumentImage::drawPDFPage(GraphicsContext& context) > bool allowsSubpixelQuantization = CGContextGetAllowsFontSubpixelQuantization(context.platformContext()); > bool allowsSubpixelPositioning = CGContextGetAllowsFontSubpixelPositioning(context.platformContext()); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[m_document pageAtIndex:0] drawWithBox:kPDFDisplayBoxCropBox]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > CGContextSetAllowsFontSmoothing(context.platformContext(), allowsSmoothing); > CGContextSetAllowsFontSubpixelQuantization(context.platformContext(), allowsSubpixelQuantization); >diff --git a/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm b/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm >index 4664f66f738573dfab9054e943a14e190bec2f87..d377b4abe50cf7057605157fee6633f3065dd6ff 100644 >--- a/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm >+++ b/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm >@@ -37,10 +37,9 @@ > [transform scaleBy:deviceScaleFactor]; > > NSRect bounds = { NSZeroPoint, self.size }; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > BOOL flippedOrientation = self.isFlipped; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self lockFocusWithRect:bounds context:nil hints:@{ NSImageHintCTM : transform } flipped:flippedOrientation]; > } > >diff --git a/Source/WebCore/platform/ios/DragImageIOS.mm b/Source/WebCore/platform/ios/DragImageIOS.mm >index 5fb215a2970dd962aa0bdca983a9104ed4d43e10..50e741003276ce1b3d173cd25787a3099c90a940 100644 >--- a/Source/WebCore/platform/ios/DragImageIOS.mm >+++ b/Source/WebCore/platform/ios/DragImageIOS.mm >@@ -52,8 +52,7 @@ > #import <wtf/NeverDestroyed.h> > #import <wtf/SoftLinking.h> > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnullability-completeness" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wnullability-completeness") > > SOFT_LINK_FRAMEWORK(UIKit) > SOFT_LINK_CLASS(UIKit, UIFont) >@@ -63,7 +62,7 @@ SOFT_LINK(UIKit, UIGraphicsGetCurrentContext, CGContextRef, (void), ()) > SOFT_LINK(UIKit, UIGraphicsGetImageFromCurrentImageContext, UIImage *, (void), ()) > SOFT_LINK(UIKit, UIGraphicsEndImageContext, void, (void), ()) > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wnullability-completeness") > > namespace WebCore { > >diff --git a/Source/WebCore/platform/mac/DragImageMac.mm b/Source/WebCore/platform/mac/DragImageMac.mm >index 56102fa2907af84fe133021f08e4ef43b27dc992..ed2a49fdae3996ab80d1d11e8262b981ae7854e1 100644 >--- a/Source/WebCore/platform/mac/DragImageMac.mm >+++ b/Source/WebCore/platform/mac/DragImageMac.mm >@@ -71,10 +71,9 @@ RetainPtr<NSImage> scaleDragImage(RetainPtr<NSImage> image, FloatSize scale) > NSSize newSize = NSMakeSize((originalSize.width * scale.width()), (originalSize.height * scale.height())); > newSize.width = roundf(newSize.width); > newSize.height = roundf(newSize.height); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [image setScalesWhenResized:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [image setSize:newSize]; > return image; > } >@@ -312,10 +311,9 @@ DragImageRef createDragImageForLink(Element& element, URL& url, const String& ti > RetainPtr<NSImage> dragImage = adoptNS([[NSImage alloc] initWithSize:imageSize]); > [dragImage _web_lockFocusWithDeviceScaleFactor:deviceScaleFactor]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > GraphicsContext context((CGContextRef)[NSGraphicsContext currentContext].graphicsPort); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300 > context.translate(linkImageShadowRadius, linkImageShadowRadius - linkImageShadowOffsetY); >diff --git a/Source/WebCore/platform/mac/LegacyNSPasteboardTypes.h b/Source/WebCore/platform/mac/LegacyNSPasteboardTypes.h >index 07aa95ff08a0378260a82a0f565fa88b8bb85654..576d1e92e5959c6b762b74d9ca3cc709fcbdb929 100644 >--- a/Source/WebCore/platform/mac/LegacyNSPasteboardTypes.h >+++ b/Source/WebCore/platform/mac/LegacyNSPasteboardTypes.h >@@ -27,8 +27,7 @@ > > #if PLATFORM(MAC) > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > namespace WebCore { > >@@ -89,6 +88,6 @@ inline NSString *legacyFilesPromisePasteboardType() > > } // namespace WebCore > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif // PLATFORM(MAC) >diff --git a/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm b/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm >index c98fc2859ffc79e19548f1867e33060b1683b073..e5c4b1128d12d6ebe96c7a6e4e8a180ac85a9e0b 100644 >--- a/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm >+++ b/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm >@@ -32,8 +32,7 @@ LocalCurrentGraphicsContext::LocalCurrentGraphicsContext(GraphicsContext& graphi > { > graphicsContext.save(); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef cgContext = this->cgContext(); > if (cgContext == [[NSGraphicsContext currentContext] graphicsPort]) { > m_savedNSGraphicsContext = 0; >@@ -42,7 +41,7 @@ LocalCurrentGraphicsContext::LocalCurrentGraphicsContext(GraphicsContext& graphi > > m_savedNSGraphicsContext = [[NSGraphicsContext currentContext] retain]; > NSGraphicsContext* newContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [NSGraphicsContext setCurrentContext:newContext]; > m_didSetGraphicsContext = true; > } >diff --git a/Source/WebCore/platform/mac/PasteboardMac.mm b/Source/WebCore/platform/mac/PasteboardMac.mm >index cb504cf543eb7e80d7665cd1e57e3089affb1a70..c0f037c5bddda4c2491eafa55010f319e298ddaa 100644 >--- a/Source/WebCore/platform/mac/PasteboardMac.mm >+++ b/Source/WebCore/platform/mac/PasteboardMac.mm >@@ -99,19 +99,17 @@ Pasteboard::Pasteboard(const String& pasteboardName, const Vector<String>& promi > > std::unique_ptr<Pasteboard> Pasteboard::createForCopyAndPaste() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return std::make_unique<Pasteboard>(NSGeneralPboard); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > #if ENABLE(DRAG_SUPPORT) > std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return std::make_unique<Pasteboard>(NSDragPboard); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop(const DragData& dragData) >@@ -614,18 +612,16 @@ static void setDragImageImpl(NSImage *image, NSPoint offset) > RetainPtr<NSBitmapImageRep> bitmapImage; > if (!imageRep || ![imageRep isKindOfClass:[NSBitmapImageRep class]] || !NSEqualSizes(imageRep.size, imageSize)) { > [image lockFocus]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > bitmapImage = adoptNS([[NSBitmapImageRep alloc] initWithFocusedViewRect:*(NSRect*)&imageRect]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [image unlockFocus]; > > // we may have to flip the bits we just read if the image was flipped since it means the cache was also > // and CoreDragSetImage can't take a transform for rendering. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > flipImage = image.isFlipped; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } else { > flipImage = false; > bitmapImage = (NSBitmapImageRep *)imageRep; >diff --git a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >index 5985477d9e05488a29040e0c243594a94997b970..957539d5c05d86ab4bc1b75fd3c1bec874dc55f7 100644 >--- a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >+++ b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >@@ -46,10 +46,9 @@ namespace WebCore { > > NSPoint globalPoint(const NSPoint& windowPoint, NSWindow *window) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return flipScreenPoint([window convertBaseToScreen:windowPoint], screen(window)); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > static NSPoint globalPointForEvent(NSEvent *event) >diff --git a/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm b/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm >index 4700b018c530c112fb8dd13d2873c1044e7dc718..da2df1cf7632475343039cfba19d24c62bcaafea 100644 >--- a/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm >+++ b/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm >@@ -44,8 +44,7 @@ WTF_DECLARE_CF_TYPE_TRAIT(SecACL); > > namespace WebCore { > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > struct PublicKeyAndChallenge { > CSSM_X509_SUBJECT_PUBLIC_KEY_INFO subjectPublicKeyInfo; >@@ -223,7 +222,7 @@ static String signedPublicKeyAndChallengeString(unsigned keySize, const CString& > return base64Encode(encodedSignedPublicKeyAndChallenge.Data, encodedSignedPublicKeyAndChallenge.Length); > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > void getSupportedKeySizes(Vector<String>& supportedKeySizes) > { >diff --git a/Source/WebCore/platform/mac/ScrollViewMac.mm b/Source/WebCore/platform/mac/ScrollViewMac.mm >index 26b6cb4f21f8b3c89936d1d6e6387c16b8404d3b..139a6ae8fd4b98771bfa144ee12ab85f9514250d 100644 >--- a/Source/WebCore/platform/mac/ScrollViewMac.mm >+++ b/Source/WebCore/platform/mac/ScrollViewMac.mm >@@ -230,10 +230,9 @@ IntRect ScrollView::platformContentsToScreen(const IntRect& rect) const > if (NSView* documentView = this->documentView()) { > NSRect tempRect = rect; > tempRect = [documentView convertRect:tempRect toView:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > tempRect.origin = [[documentView window] convertBaseToScreen:tempRect.origin]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return enclosingIntRect(tempRect); > } > END_BLOCK_OBJC_EXCEPTIONS; >@@ -244,10 +243,9 @@ IntPoint ScrollView::platformScreenToContents(const IntPoint& point) const > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > if (NSView* documentView = this->documentView()) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPoint windowCoord = [[documentView window] convertScreenToBase: point]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return IntPoint([documentView convertPoint:windowCoord fromView:nil]); > } > END_BLOCK_OBJC_EXCEPTIONS; >diff --git a/Source/WebCore/platform/mac/ThemeMac.mm b/Source/WebCore/platform/mac/ThemeMac.mm >index fa94c473920fc02c2d83ba6cbf61d7c6d58cc6ff..7a9297c4959ec543ede12dde78d25c2a1a7f3de0 100644 >--- a/Source/WebCore/platform/mac/ThemeMac.mm >+++ b/Source/WebCore/platform/mac/ThemeMac.mm >@@ -358,10 +358,9 @@ static NSButtonCell *sharedCheckboxCell(const ControlStates& states, const IntSi > > static bool drawCellFocusRingWithFrameAtTime(NSCell *cell, NSRect cellFrame, NSView *controlView, NSTimeInterval timeOffset) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGContextSaveGState(cgContext); > > CGFocusRingStyle focusRingStyle; >diff --git a/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm b/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm >index b6eada31806402500602bfab0d32957da6f2b451..d08098c5ad06982e01c962a69044003fdf259a27 100644 >--- a/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm >+++ b/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm >@@ -34,8 +34,7 @@ > #import <wtf/SoftLinking.h> > #import <wtf/text/WTFString.h> > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnullability-completeness" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wnullability-completeness") > SOFT_LINK_FRAMEWORK(AVKit) > #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > SOFT_LINK_CLASS_OPTIONAL(AVKit, AVTouchBarMediaSelectionOption) >@@ -346,7 +345,7 @@ static RetainPtr<NSMutableArray> mediaSelectionOptions(const Vector<MediaSelecti > } > #endif > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wnullability-completeness") > > @end > >diff --git a/Source/WebCore/platform/mac/WidgetMac.mm b/Source/WebCore/platform/mac/WidgetMac.mm >index 996c19d550f9131fa02360b657f88be9f9e666bb..e075bf24c1bc9ea37ad467aadb0472acf2e6c700 100644 >--- a/Source/WebCore/platform/mac/WidgetMac.mm >+++ b/Source/WebCore/platform/mac/WidgetMac.mm >@@ -208,10 +208,9 @@ void Widget::paint(GraphicsContext& p, const IntRect& r, SecurityOriginPaintPoli > Ref<Widget> protectedThis(*this); > > NSGraphicsContext *currentContext = [NSGraphicsContext currentContext]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (currentContext == [[view window] graphicsContext] || ![currentContext isDrawingToScreen]) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > // This is the common case of drawing into a window or an inclusive layer, or printing. > BEGIN_BLOCK_OBJC_EXCEPTIONS; > [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]]]; >@@ -238,10 +237,9 @@ void Widget::paint(GraphicsContext& p, const IntRect& r, SecurityOriginPaintPoli > } > > CGContextRef cgContext = p.platformContext(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ASSERT(cgContext == [currentContext graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGContextSaveGState(cgContext); > > NSRect viewFrame = [view frame]; >@@ -255,10 +253,9 @@ void Widget::paint(GraphicsContext& p, const IntRect& r, SecurityOriginPaintPoli > > BEGIN_BLOCK_OBJC_EXCEPTIONS; > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSGraphicsContext *nsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]] inContext:nsContext]; > } > END_BLOCK_OBJC_EXCEPTIONS; >diff --git a/Source/WebCore/platform/mediastream/RealtimeIncomingAudioSource.h b/Source/WebCore/platform/mediastream/RealtimeIncomingAudioSource.h >index b51318c834e254aa9f72365efe67f354668ce9ae..0d4d764ff4319afc25fa4148bc58b4e70b304154 100644 >--- a/Source/WebCore/platform/mediastream/RealtimeIncomingAudioSource.h >+++ b/Source/WebCore/platform/mediastream/RealtimeIncomingAudioSource.h >@@ -35,12 +35,11 @@ > #include "LibWebRTCMacros.h" > #include "RealtimeMediaSource.h" > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/mediastreaminterface.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/RetainPtr.h> > >diff --git a/Source/WebCore/platform/mediastream/RealtimeIncomingVideoSource.h b/Source/WebCore/platform/mediastream/RealtimeIncomingVideoSource.h >index 7247bb833857e48e99ee786e75e4a93bb005d5ed..75f1291077cbe612e6c54f503fbf2da4426f0499 100644 >--- a/Source/WebCore/platform/mediastream/RealtimeIncomingVideoSource.h >+++ b/Source/WebCore/platform/mediastream/RealtimeIncomingVideoSource.h >@@ -35,12 +35,11 @@ > #include "LibWebRTCMacros.h" > #include "RealtimeMediaSource.h" > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/mediastreaminterface.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/RetainPtr.h> > >diff --git a/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h b/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h >index ea457f7d53350afd1844ef3cf43211f8332956f4..9720940cecfbdcbcbf1ba7c983dfb7116324e1fd 100644 >--- a/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h >+++ b/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h >@@ -35,12 +35,11 @@ > #include "MediaStreamTrackPrivate.h" > #include "Timer.h" > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/mediastreaminterface.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/ThreadSafeRefCounted.h> > >diff --git a/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h b/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h >index 548ea3f01d807e87ce11d30e6cbcdb702f9155e1..2eefa6518ad34a478710db6aeee1fdb84f582a16 100644 >--- a/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h >+++ b/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h >@@ -34,13 +34,12 @@ > #include "MediaStreamTrackPrivate.h" > #include <Timer.h> > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/mediastreaminterface.h> > #include <webrtc/common_video/include/i420_buffer_pool.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/Optional.h> > #include <wtf/ThreadSafeRefCounted.h> >diff --git a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.h b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.h >index 79e99d7ce206f892596bdd4f3d1cef7e5eb37de0..f55da3658ccc879f435e40240d4865e710d91306 100644 >--- a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.h >+++ b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.h >@@ -29,14 +29,13 @@ > > #include "LibWebRTCMacros.h" > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/modules/audio_device/include/audio_device.h> > #include <webrtc/rtc_base/messagehandler.h> > #include <webrtc/rtc_base/thread.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > namespace WebCore { > >diff --git a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp >index 1a1453c89b7c3239fff5ea1d25b3d005e3951c38..19367248bae3209ef0303ca7a7b9f8bdc1258cf4 100644 >--- a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp >+++ b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp >@@ -31,8 +31,7 @@ > #include "Logging.h" > #include <dlfcn.h> > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/audio_codecs/builtin_audio_decoder_factory.h> > #include <webrtc/api/audio_codecs/builtin_audio_encoder_factory.h> >@@ -43,7 +42,7 @@ > #include <webrtc/pc/peerconnectionfactory.h> > #include <webrtc/rtc_base/physicalsocketserver.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/Function.h> > #include <wtf/NeverDestroyed.h> >diff --git a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >index 8fccf22a005fd79860c2c9586637036813238d96..06649ff2b6bd57beb511ea184ac571149f318836 100644 >--- a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >+++ b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >@@ -35,15 +35,14 @@ > > #if USE(LIBWEBRTC) > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/peerconnectioninterface.h> > #include <webrtc/api/video_codecs/video_encoder_factory.h> > #include <webrtc/api/video_codecs/video_decoder_factory.h> > #include <webrtc/rtc_base/scoped_ref_ptr.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > namespace rtc { > class NetworkManager; >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm b/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm >index 4b425f9ba62b0f3f093a906fd4b2ae49c2a43c3e..a2a3f9b3d6046770c15318f93162990ee32440fa 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm >@@ -34,12 +34,11 @@ > #include "MediaSampleAVFObjC.h" > #include <pal/cf/CoreMediaSoftLink.h> > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/sdk/WebKit/WebKitUtilities.h> > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/cf/TypeCastsCF.h> > >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp >index ed14c34c31d66c05ced595c656030e713f655787..7f7ce90a40c225e26be02b04cf67f873a58bfce4 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp >@@ -30,14 +30,13 @@ > > #include "Logging.h" > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/video/i420_buffer.h> > #include <webrtc/common_video/libyuv/include/webrtc_libyuv.h> > #include <webrtc/sdk/WebKit/WebKitUtilities.h> > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunused-parameter") > > #include <pal/cf/CoreMediaSoftLink.h> > #include "CoreVideoSoftLink.h" >diff --git a/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp b/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp >index 8119fd5e556e6c1d7bfc1fbab4b5b88910c39e5f..bebeebbdee61e072216379e52114026b6163f734 100644 >--- a/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp >+++ b/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp >@@ -64,12 +64,11 @@ static inline CFTypeID typeID() { return ClassName##GetTypeID(); } \ > }; > > #if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > #endif > DECLARE_CF_TYPE_TRAIT(CFHTTPCookie); > #if COMPILER(CLANG) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > #endif > > #undef DECLARE_CF_TYPE_TRAIT >diff --git a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp b/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp >index 095a0c4b7d84ac9c9abac44a1a5f46e9ebc0007a..e89be818aae9387c1a5225fde2f4d493b3e6a470 100644 >--- a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp >+++ b/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp >@@ -171,12 +171,11 @@ void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool > #else > if (allowsAnyHTTPSCertificateHosts().contains(firstRequest().url().host().toString())) { > sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsAnyRoot, kCFBooleanTrue); > CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsExpiredRoots, kCFBooleanTrue); > CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsExpiredCertificates, kCFBooleanTrue); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #if !PLATFORM(WIN) // <rdar://problem/33993462> - Disabling validation of certificate chain breaks SSL on Windows. > CFDictionaryAddValue(sslProps.get(), kCFStreamSSLValidatesCertificateChain, kCFBooleanFalse); > #endif >@@ -234,10 +233,9 @@ void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool > if (shouldUseCredentialStorage) > client.shouldUseCredentialStorage = 0; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > d->m_connection = adoptCF(CFURLConnectionCreateWithProperties(0, request.get(), reinterpret_cast<CFURLConnectionClient*>(&client), propertiesDictionary.get())); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > bool ResourceHandle::start() >diff --git a/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp b/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp >index 9ed5aa0c9d9bf13eea31a29568a2497574e586c4..df87068ad912adbe87044b9eaccd20e9662a8fb5 100644 >--- a/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp >+++ b/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp >@@ -666,10 +666,7 @@ void SocketStreamHandleImpl::reportErrorToClient(CFErrorRef error) > > #if PLATFORM(MAC) > >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >-#endif >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > > if (CFEqual(CFErrorGetDomain(error), kCFErrorDomainOSStatus)) { > const char* descriptionOSStatus = GetMacOSStatusCommentString(static_cast<OSStatus>(errorCode)); >@@ -677,9 +674,7 @@ void SocketStreamHandleImpl::reportErrorToClient(CFErrorRef error) > description = "OSStatus Error " + String::number(errorCode) + ": " + descriptionOSStatus; > } > >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > #endif > >diff --git a/Source/WebCore/platform/network/create-http-header-name-table b/Source/WebCore/platform/network/create-http-header-name-table >index ea2b74336483b050638713fd5173a6b09b8d6070..84043d6f77c09b979ddc2bbb58e3628d167cfafa 100755 >--- a/Source/WebCore/platform/network/create-http-header-name-table >+++ b/Source/WebCore/platform/network/create-http-header-name-table >@@ -90,11 +90,8 @@ gperf_file.write(''' > > #include <wtf/text/StringView.h> > >-#if defined(__clang__) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wimplicit-fallthrough" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunknown-pragmas") >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wimplicit-fallthrough") > > // Older versions of gperf like to use the `register` keyword. > #define register >@@ -179,7 +176,8 @@ StringView httpHeaderNameString(HTTPHeaderName headerName) > } // namespace WebCore > > #if defined(__clang__) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wimplicit-fallthrough") >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunknown-pragmas") > #endif > ''') > >diff --git a/Source/WebCore/platform/text/TextEncoding.cpp b/Source/WebCore/platform/text/TextEncoding.cpp >index 4013f37cf7e1d7f7728d8c007ffa681726d5e01d..40ac6c4cd04618fcc0943f222a37182a3ec88ab2 100644 >--- a/Source/WebCore/platform/text/TextEncoding.cpp >+++ b/Source/WebCore/platform/text/TextEncoding.cpp >@@ -69,10 +69,7 @@ String TextEncoding::decode(const char* data, size_t length, bool stopOnError, b > return newTextCodec(*this)->decode(data, length, true, stopOnError, sawError); > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > // NOTE: ICU's unorm_quickCheck and unorm_normalize functions are deprecated. > > Vector<uint8_t> TextEncoding::encode(StringView text, UnencodableHandling handling) const >@@ -112,9 +109,7 @@ Vector<uint8_t> TextEncoding::encode(StringView text, UnencodableHandling handli > return newTextCodec(*this)->encode(StringView { source, sourceLength }, handling); > } > >-#if COMPILER(GCC_OR_CLANG) >-#pragma GCC diagnostic pop >-#endif >+IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > const char* TextEncoding::domName() const > { >diff --git a/Source/WebCore/testing/MockLibWebRTCPeerConnection.h b/Source/WebCore/testing/MockLibWebRTCPeerConnection.h >index 8403530e99d20b8d48ba9477ff179def6d8e8928..7897d77c173fc3a42b21a9ca910820b66dc67e17 100644 >--- a/Source/WebCore/testing/MockLibWebRTCPeerConnection.h >+++ b/Source/WebCore/testing/MockLibWebRTCPeerConnection.h >@@ -28,13 +28,12 @@ > > #include "LibWebRTCMacros.h" > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wunused-parameter" >+IGNORE_WARNING_GCC_TOP_LEVEL("-Wunused-parameter") > > #include <webrtc/api/mediastreaminterface.h> > #include <webrtc/api/peerconnectioninterface.h> > >-#pragma GCC diagnostic pop >+IGNORE_WARNING_GCC_TOP_LEVEL_END("-Wunused-parameter") > > #include <wtf/text/WTFString.h> > >diff --git a/Source/WebCore/xml/XPathGrammar.cpp b/Source/WebCore/xml/XPathGrammar.cpp >index 31df1c0d158a278f4c096cb2ba911f3f7b01b943..f40582e0c673af93cba8ac024c71299be5e353a7 100644 >--- a/Source/WebCore/xml/XPathGrammar.cpp >+++ b/Source/WebCore/xml/XPathGrammar.cpp >@@ -2154,15 +2154,10 @@ yyerrorlab: > /* Pacify compilers like GCC when the user code never invokes > YYERROR and the label yyerrorlab therefore never appears in user > code. */ >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunreachable-code" >-#endif >+ IGNORE_WARNING_CLANG("-Wunreachable-code"); > if (/*CONSTCOND*/ 0) > goto yyerrorlab; >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >+ IGNORE_WARNING_CLANG_END("-Wunreachable-code"); > > /* Do not reclaim the symbols of the rule which action triggered > this YYERROR. */ >diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >index fc209c8f71397e1728c152379937b28b9f4c1d2f..14850475954140a5f3d2a8784a08d6f57298a6ae 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >@@ -134,12 +134,11 @@ NSHTTPCookieStorage *NetworkDataTaskCocoa::statelessCookieStorage() > static NeverDestroyed<RetainPtr<NSHTTPCookieStorage>> statelessCookieStorage; > if (!statelessCookieStorage.get()) { > #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >+ IGNORE_WARNING_CLANG("-Wnonnull"); > #endif > statelessCookieStorage.get() = adoptNS([[NSHTTPCookieStorage alloc] _initWithIdentifier:nil private:YES]); > #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300) >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wnonnull"); > #endif > statelessCookieStorage.get().get().cookieAcceptPolicy = NSHTTPCookieAcceptPolicyNever; > } >diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >index 0023fe161b53ef5bc3a534439b662e58cda0e65c..f02f5506b5a50ed01ced7ff354a27d3199b10c52 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >@@ -223,8 +223,7 @@ static void saveCookies(NSHTTPCookieStorage *cookieStorage, CompletionHandler<vo > > void NetworkProcess::platformSyncAllCookies(CompletionHandler<void()>&& completionHander) { > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > > #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) > RefPtr<CallbackAggregator> callbackAggregator = CallbackAggregator::create(WTFMove(completionHander)); >@@ -236,7 +235,7 @@ void NetworkProcess::platformSyncAllCookies(CompletionHandler<void()>&& completi > completionHander(); > #endif > >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void NetworkProcess::platformPrepareToSuspend(CompletionHandler<void()>&& completionHandler) >diff --git a/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm b/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >index c3120bb59a0a54b6987092faf5692d424153e617..a3d3a17b15c16470e43e982885f5bf8eac18dac2 100644 >--- a/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >+++ b/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >@@ -260,13 +260,12 @@ static unsigned modalCount; > > static void beginModal() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Make sure to make ourselves the front process > ProcessSerialNumber psn; > GetCurrentProcess(&psn); > SetFrontProcess(&psn); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > if (!modalCount++) > setModal(true); >diff --git a/Source/WebKit/PluginProcess/mac/PluginProcessShim.mm b/Source/WebKit/PluginProcess/mac/PluginProcessShim.mm >index 4036d3b87440368072b20b7802617d19e9d1b0a4..fa803e1f0b0f4334a633d97d60f79c9c8586c8c6 100644 >--- a/Source/WebKit/PluginProcess/mac/PluginProcessShim.mm >+++ b/Source/WebKit/PluginProcess/mac/PluginProcessShim.mm >@@ -48,8 +48,7 @@ static PluginProcessShimCallbacks pluginProcessShimCallbacks; > > #ifndef __LP64__ > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > static void shimDebugger(void) > { >@@ -133,7 +132,7 @@ DYLD_INTERPOSE(shimHideWindow, HideWindow); > DYLD_INTERPOSE(shimLSOpenCFURLRef, LSOpenCFURLRef); > DYLD_INTERPOSE(shimMachVMMap, mach_vm_map); > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif > >diff --git a/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp b/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp >index 60f41ebdff61c86377caff17caeb56a9445ec779..5d7c1c1835cfbd5972c0c4d9c0e88813054bc0c0 100644 >--- a/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp >+++ b/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp >@@ -242,8 +242,7 @@ bool NetscapePluginModule::tryLoad() > #if PLUGIN_ARCHITECTURE(MAC) > #ifndef NP_NO_CARBON > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > > // Plugins (at least QT) require that you call UseResFile on the resource file before loading it. > ResFileRefNum currentResourceFile = CurResFile(); >@@ -258,7 +257,7 @@ bool NetscapePluginModule::tryLoad() > // Restore the resource file. > UseResFile(currentResourceFile); > >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > #endif > >diff --git a/Source/WebKit/Shared/ios/ChildProcessIOS.mm b/Source/WebKit/Shared/ios/ChildProcessIOS.mm >index 9bdd72f83f4313e460c5dce0b39ecd5e557b74ca..9dc5e4612e18664e81a8102f86df1a402d590637 100644 >--- a/Source/WebKit/Shared/ios/ChildProcessIOS.mm >+++ b/Source/WebKit/Shared/ios/ChildProcessIOS.mm >@@ -80,10 +80,9 @@ void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& > if (!sandboxProfilePath.isEmpty()) { > CString profilePath = FileSystem::fileSystemRepresentation(sandboxProfilePath); > char* errorBuf; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (sandbox_init_with_parameters(profilePath.data(), SANDBOX_NAMED_EXTERNAL, sandboxParameters.namedParameterArray(), &errorBuf)) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > WTFLogAlways("%s: Couldn't initialize sandbox profile [%s], error '%s'\n", getprogname(), profilePath.data(), errorBuf); > for (size_t i = 0, count = sandboxParameters.count(); i != count; ++i) > WTFLogAlways("%s=%s\n", sandboxParameters.name(i), sandboxParameters.value(i)); >@@ -95,10 +94,9 @@ void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& > } > case SandboxInitializationParameters::UseSandboxProfile: { > char* errorBuf; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (sandbox_init_with_parameters(sandboxParameters.sandboxProfile().utf8().data(), 0, sandboxParameters.namedParameterArray(), &errorBuf)) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > WTFLogAlways("%s: Couldn't initialize sandbox profile, error '%s'\n", getprogname(), errorBuf); > for (size_t i = 0, count = sandboxParameters.count(); i != count; ++i) > WTFLogAlways("%s=%s\n", sandboxParameters.name(i), sandboxParameters.value(i)); >diff --git a/Source/WebKit/Shared/mac/ChildProcessMac.mm b/Source/WebKit/Shared/mac/ChildProcessMac.mm >index 04387269bc74f9751a52dcbbd209bf8ae733c3ea..188fa2a87e78bfb753bc321edda9740f48193d15 100644 >--- a/Source/WebKit/Shared/mac/ChildProcessMac.mm >+++ b/Source/WebKit/Shared/mac/ChildProcessMac.mm >@@ -534,10 +534,9 @@ static bool compileAndApplySandboxSlowCase(const String& profileOrProfilePath, b > char* errorBuf; > CString temp = isProfilePath ? FileSystem::fileSystemRepresentation(profileOrProfilePath) : profileOrProfilePath.utf8(); > uint64_t flags = isProfilePath ? SANDBOX_NAMED_EXTERNAL : 0; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (sandbox_init_with_parameters(temp.data(), flags, parameters.namedParameterArray(), &errorBuf)) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > WTFLogAlways("%s: Could not initialize sandbox profile [%s], error '%s'\n", getprogname(), temp.data(), errorBuf); > for (size_t i = 0, count = parameters.count(); i != count; ++i) > WTFLogAlways("%s=%s\n", parameters.name(i), parameters.value(i)); >diff --git a/Source/WebKit/Shared/mac/ColorSpaceData.mm b/Source/WebKit/Shared/mac/ColorSpaceData.mm >index 65f2b5a6d78361f6c4505dce918567ac31ac88ac..54ff1a18d4c0a809efbc30e6978fb4427dc76f93 100644 >--- a/Source/WebKit/Shared/mac/ColorSpaceData.mm >+++ b/Source/WebKit/Shared/mac/ColorSpaceData.mm >@@ -83,10 +83,9 @@ bool ColorSpaceData::decode(IPC::Decoder& decoder, ColorSpaceData& colorSpaceDat > if (!IPC::decode(decoder, data)) > return false; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > colorSpaceData.cgColorSpace = adoptCF(CGColorSpaceCreateWithICCProfile(data.get())); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return true; > } > >diff --git a/Source/WebKit/Shared/mac/SandboxExtensionMac.mm b/Source/WebKit/Shared/mac/SandboxExtensionMac.mm >index b8e743d2360cfeefc17bca24d59711cdd58a5b7e..05f8cf042b95f007b6faf3228cd1458a25195d07 100644 >--- a/Source/WebKit/Shared/mac/SandboxExtensionMac.mm >+++ b/Source/WebKit/Shared/mac/SandboxExtensionMac.mm >@@ -86,12 +86,11 @@ private: > { > switch (type) { > case SandboxExtension::Type::ReadOnly: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return sandbox_extension_issue_file(APP_SANDBOX_READ, path, 0); > case SandboxExtension::Type::ReadWrite: > return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE, path, 0); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > case SandboxExtension::Type::Generic: > return sandbox_extension_issue_generic(path, 0); > } >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 69ee3d396f8c2645d54840a535fe9ebc2c5a3fa7..edfc2d19deed90760966b09d5fb422e48ec5842a 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -3992,10 +3992,9 @@ WEBCORE_COMMAND(yankAndSelect) > > - (id)_web_superAccessibilityAttributeValue:(NSString *)attribute > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return [super accessibilityAttributeValue:attribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_web_superDoCommandBySelector:(SEL)selector >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >index 8478db2ce3c67ee5077ec50b0e5041be94aef592..5a12f1bfc6dca3f3a96c1eca5f5e2f0bbced00af 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >@@ -500,8 +500,7 @@ static NSString *defaultApplicationNameForUserAgent() > return handler ? static_cast<WebKit::WebURLSchemeHandlerCocoa*>(handler.get())->apiHandler() : nil; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > - (_WKWebsiteDataStore *)_websiteDataStore > { >@@ -513,7 +512,7 @@ static NSString *defaultApplicationNameForUserAgent() > self.websiteDataStore = websiteDataStore ? websiteDataStore->_dataStore.get() : nullptr; > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #if PLATFORM(IOS) > - (WKWebViewContentProviderRegistry *)_contentProviderRegistry >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm >index d5621b004e5d077281fd50f949bffa2bce3e7824..e4bfc9118450def119424fb4431aec0ff77fb50c 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm >@@ -40,8 +40,7 @@ typedef NS_OPTIONS(NSUInteger, _WKWebsiteDataTypes) { > _WKWebsiteDataTypeWebSQLDatabases = 1 << 5, > }; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > @implementation _WKWebsiteDataStore > >@@ -107,6 +106,6 @@ static RetainPtr<NSSet> toWKWebsiteDataTypes(_WKWebsiteDataTypes websiteDataType > > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >index 7bfa842a49bd2147560aa264c0e87183622f9456..6e0af264d801756c054c87c70a15c015908ffdd7 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >@@ -2082,8 +2082,7 @@ void webkitWebViewRunAsModal(WebKitWebView* webView) > > #if PLATFORM(GTK) > // This is to suppress warnings about gdk_threads_leave and gdk_threads_enter. >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_GCC("-Wdeprecated-declarations"); > gdk_threads_leave(); > #endif > >@@ -2091,7 +2090,7 @@ void webkitWebViewRunAsModal(WebKitWebView* webView) > > #if PLATFORM(GTK) > gdk_threads_enter(); >-#pragma GCC diagnostic pop >+ IGNORE_WARNING_GCC_END("-Wdeprecated-declarations"); > #endif > } > >diff --git a/Source/WebKit/UIProcess/API/mac/WKView.mm b/Source/WebKit/UIProcess/API/mac/WKView.mm >index bc5de2b59f2f4c21ae54b60a3433dc84da2d50e4..f02753e8b68fad511b86308e341d711934f5d237 100644 >--- a/Source/WebKit/UIProcess/API/mac/WKView.mm >+++ b/Source/WebKit/UIProcess/API/mac/WKView.mm >@@ -978,10 +978,9 @@ Some other editing-related methods still unimplemented: > > - (id)_web_superAccessibilityAttributeValue:(NSString *)attribute > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return [super accessibilityAttributeValue:attribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_web_superDoCommandBySelector:(SEL)selector >diff --git a/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm b/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm >index 0eb1cf6403286861aa4274dfc744843f0bd00a6a..8f8fa44e13cbe15d4434e6b5c113194b5a4e3702 100644 >--- a/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm >+++ b/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm >@@ -202,10 +202,9 @@ void DownloadClient::decideDestinationWithSuggestedFilename(WebProcessPool&, Dow > > if (m_delegateMethods.downloadDecideDestinationWithSuggestedFilenameAllowOverwrite) { > BOOL allowOverwrite = NO; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSString *destination = [m_delegate _download:wrapper(downloadProxy) decideDestinationWithSuggestedFilename:filename allowOverwrite:&allowOverwrite]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > completionHandler(allowOverwrite ? AllowOverwrite::Yes : AllowOverwrite::No, destination); > } else { > [m_delegate _download:wrapper(downloadProxy) decideDestinationWithSuggestedFilename:filename completionHandler:BlockPtr<void(BOOL, NSString *)>::fromCallable([checker = CompletionHandlerCallChecker::create(m_delegate.get().get(), @selector(_download:decideDestinationWithSuggestedFilename:completionHandler:)), completionHandler = WTFMove(completionHandler)] (BOOL allowOverwrite, NSString *destination) { >diff --git a/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm b/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm >index 11ba37265483ffe7ff24650940d8f33a52c0c04a..b4dccf116676961dde19fac8599903bfcaf714ce 100644 >--- a/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm >+++ b/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm >@@ -59,12 +59,11 @@ using namespace WebKit; > _customProtocolManagerProxy = customProtocolManagerProxy; > _customProtocolID = customProtocolID; > _storagePolicy = NSURLCacheStorageNotAllowed; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; > [_urlConnection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; > [_urlConnection start]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return self; > } >diff --git a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >index 8487e6e305fc64900bd31a7186ecc6c02b33ddc7..41e4981853720b85207f8d684706115e3ede20c1 100644 >--- a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >+++ b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >@@ -575,10 +575,9 @@ void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageP > if (m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionUserInfoDecisionHandlerWebsitePolicies) > [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView decidePolicyForNavigationAction:wrapper(navigationAction) userInfo:userInfo ? static_cast<id <NSSecureCoding>>(userInfo->wrapper()) : nil decisionHandler:decisionHandler.get()]; > else { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView decidePolicyForNavigationAction:wrapper(navigationAction) decisionHandler:decisionHandler.get()]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > } else { > auto decisionHandlerWithoutPolicies = [decisionHandlerWithPolicies = WTFMove(decisionHandlerWithPolicies)] (WKNavigationActionPolicy actionPolicy) mutable { >diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >index f0b9d3000a9e6545adb0b124531f570e482259b4..aa3b94941e69955eb0349d34f8a1896cc35592a0 100644 >--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >@@ -203,13 +203,12 @@ void UIDelegate::ContextMenuClient::menuFromProposedMenu(WebPageProxy&, NSMenu * > return; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (m_uiDelegate.m_delegateMethods.webViewContextMenuForElement) > return completionHandler([(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView contextMenu:menu forElement:contextMenuElementInfo.get()]); > > completionHandler([(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView contextMenu:menu forElement:contextMenuElementInfo.get() userInfo:userInfo ? static_cast<id <NSSecureCoding>>(userInfo->wrapper()) : nil]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > #endif > >diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >index d16f5852ddf84a4d592b9f33e78eb32da920b103..19ef8aeab83ab39c2a6f1be01826801303ec92c8 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >@@ -166,11 +166,10 @@ void WebProcessPool::platformResolvePathsForSandboxExtensions() > void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters) > { > #if PLATFORM(MAC) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); > parameters.accessibilityEnhancedUserInterfaceEnabled = [[NSApp accessibilityAttributeValue:@"AXEnhancedUserInterface"] boolValue]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #else > parameters.accessibilityEnhancedUserInterfaceEnabled = false; > #endif >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 5028700e2fb458e7618c6527b3c73a3cd6ff506d..3a0520dc87218bb8dad7f1a2ced17b657bd6ca1a 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -556,15 +556,14 @@ static const NSUInteger orderedListSegment = 2; > [insertListControl setWidth:listControlSegmentWidth forSegment:orderedListSegment]; > insertListControl.font = [NSFont systemFontOfSize:15]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > id segmentElement = NSAccessibilityUnignoredDescendant(insertListControl); > NSArray *segments = [segmentElement accessibilityAttributeValue:NSAccessibilityChildrenAttribute]; > ASSERT(segments.count == 3); > [segments[noListSegment] accessibilitySetOverrideValue:WebCore::insertListTypeNone() forAttribute:NSAccessibilityDescriptionAttribute]; > [segments[unorderedListSegment] accessibilitySetOverrideValue:WebCore::insertListTypeBulletedAccessibilityTitle() forAttribute:NSAccessibilityDescriptionAttribute]; > [segments[orderedListSegment] accessibilitySetOverrideValue:WebCore::insertListTypeNumberedAccessibilityTitle() forAttribute:NSAccessibilityDescriptionAttribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > self.view = insertListControl; > >@@ -1638,11 +1637,10 @@ void WebViewImpl::updateWindowAndViewFrames() > if (weakThis->m_needsViewFrameInWindowCoordinates) > viewFrameInWindowCoordinates = [weakThis->m_view convertRect:[weakThis->m_view frame] toView:nil]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (WebCore::AXObjectCache::accessibilityEnabled()) > accessibilityPosition = [[weakThis->m_view accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > weakThis->m_page->windowAndViewFramesChanged(viewFrameInWindowCoordinates, accessibilityPosition); > }); >@@ -3717,10 +3715,9 @@ void WebViewImpl::draggedImage(NSImage *, CGPoint endPoint, NSDragOperation oper > > void WebViewImpl::sendDragEndToPage(CGPoint endPoint, NSDragOperation operation) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPoint windowImageLoc = [[m_view window] convertScreenToBase:NSPointFromCGPoint(endPoint)]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > NSPoint windowMouseLoc = windowImageLoc; > > // Prevent queued mouseDragged events from coming after the drag and fake mouseUp event. >@@ -3998,10 +3995,9 @@ void WebViewImpl::startDrag(const WebCore::DragItem& item, const ShareableBitmap > // The call below could release the view. > auto protector = m_view.get(); > auto clientDragLocation = item.dragLocationInWindowCoordinates; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > if (auto& info = item.promisedAttachmentInfo) { > NSString *utiType = info.contentType; >@@ -4030,10 +4026,9 @@ void WebViewImpl::startDrag(const WebCore::DragItem& item, const ShareableBitmap > } > > [pasteboard setString:@"" forType:PasteboardTypes::WebDummyPboardType]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [m_view dragImage:dragNSImage.get() at:NSPointFromCGPoint(clientDragLocation) offset:NSZeroSize event:m_lastMouseDownEvent.get() pasteboard:pasteboard source:m_view.getAutoreleased() slideBack:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > m_page->didStartDrag(); > } > >@@ -4779,11 +4774,10 @@ void WebViewImpl::characterIndexForPoint(NSPoint point, void(^completionHandlerP > > NSWindow *window = [m_view window]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (window) > point = [window convertScreenToBase:point]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > point = [m_view convertPoint:point fromView:nil]; // the point is relative to the main frame > > m_page->characterIndexForPointAsync(WebCore::IntPoint(point), [completionHandler](uint64_t result, WebKit::CallbackBase::Error error) { >diff --git a/Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm b/Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm >index d435e1f340cbe24c7eda9b74a272b24fdd313ddd..b265a21862bda67b55596b40f46f4f6438872fed 100644 >--- a/Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm >+++ b/Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm >@@ -94,10 +94,9 @@ void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationPa > bool PluginProcessProxy::getPluginProcessSerialNumber(ProcessSerialNumber& pluginProcessSerialNumber) > { > pid_t pluginProcessPID = processIdentifier(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return GetProcessForPID(pluginProcessPID, &pluginProcessSerialNumber) == noErr; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void PluginProcessProxy::makePluginProcessTheFrontProcess() >@@ -106,20 +105,18 @@ void PluginProcessProxy::makePluginProcessTheFrontProcess() > if (!getPluginProcessSerialNumber(pluginProcessSerialNumber)) > return; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > SetFrontProcess(&pluginProcessSerialNumber); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void PluginProcessProxy::makeUIProcessTheFrontProcess() > { > ProcessSerialNumber processSerialNumber; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > GetCurrentProcess(&processSerialNumber); > SetFrontProcess(&processSerialNumber); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void PluginProcessProxy::setFullscreenWindowIsShowing(bool fullscreenWindowIsShowing) >@@ -152,10 +149,9 @@ void PluginProcessProxy::exitFullscreen() > { > // If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode. > ProcessSerialNumber frontProcessSerialNumber; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > GetFrontProcess(&frontProcessSerialNumber); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // The UI process must be the front process in order to change the presentation mode. > makeUIProcessTheFrontProcess(); >@@ -168,15 +164,13 @@ void PluginProcessProxy::exitFullscreen() > // If the plug-in process was not the front process, switch back to the previous front process. > // (Otherwise we'll keep the UI process as the front process). > Boolean isPluginProcessFrontProcess; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > SameProcess(&frontProcessSerialNumber, &pluginProcessSerialNumber, &isPluginProcessFrontProcess); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (!isPluginProcessFrontProcess) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > SetFrontProcess(&frontProcessSerialNumber); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > } > >diff --git a/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm b/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm >index b362d57b9c43a85f366e33b6a7d49299f6a9d4f3..0a8eb2f9ae74488e48224f52fb245b8c044bb980 100644 >--- a/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm >+++ b/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm >@@ -37,12 +37,11 @@ > #import "WebPageProxy.h" > #import "WebProcessProxy.h" > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > #import "UIKitSPI.h" > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > static const float smartMagnificationPanScrollThresholdZoomedOut = 60; > static const float smartMagnificationPanScrollThresholdIPhone = 100; >diff --git a/Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm b/Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm >index 88d939771300fc09ac5186adf13130284107d014..c9cd038a4c0048052979fe37d9d4e772b8720b1f 100644 >--- a/Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm >+++ b/Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm >@@ -53,8 +53,7 @@ > #import <WebKit/WebGeolocationCoreLocationProvider.h> > #import <WebKit/WebAllowDenyPolicyListener.h> > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > @interface WKGeolocationProviderIOS (_WKGeolocationCoreLocationListener) <_WKGeolocationCoreLocationListener> > @end >@@ -354,6 +353,6 @@ static void setEnableHighAccuracy(WKGeolocationManagerRef geolocationManager, bo > } > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif // PLATFORM(IOS) >diff --git a/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm b/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >index 0b5d9d6c646b4282c0fcb73e1cbfd0ca34f35aa6..4373c031c285ffe8c495065e18f081dd1c879605 100644 >--- a/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >+++ b/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >@@ -51,8 +51,7 @@ > > // All of UIPDFPage* are deprecated, so just ignore deprecated declarations > // in this file until we switch off them. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > const CGFloat pdfPageMargin = 8; > const CGFloat pdfMinimumZoomScale = 1; >@@ -857,6 +856,6 @@ static NSStringCompareOptions stringCompareOptions(_WKFindOptions options) > > #endif // !PLATFORM(IOSMAC) > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif // ENABLE(WKLEGACYPDFVIEW) >diff --git a/Source/WebKit/UIProcess/ios/WKPDFPageNumberIndicator.mm b/Source/WebKit/UIProcess/ios/WKPDFPageNumberIndicator.mm >index 979b30d3814b1306c0aab1956ec37a3da660638b..60b93452548fb5e2d7d6a83747cadca67ba4e541 100644 >--- a/Source/WebKit/UIProcess/ios/WKPDFPageNumberIndicator.mm >+++ b/Source/WebKit/UIProcess/ios/WKPDFPageNumberIndicator.mm >@@ -183,10 +183,9 @@ const NSTimeInterval indicatorMoveDuration = 0.3; > CGContextSaveGState(context); > CGContextAddRect(context, cornerImageBounds); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > UIBezierPath *cornerPath = [UIBezierPath bezierPathWithRoundedRect:cornerImageBounds byRoundingCorners:(UIRectCorner)UIAllCorners cornerRadii:CGSizeMake(indicatorCornerRadius, indicatorCornerRadius)]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGContextAddPath(context, [cornerPath CGPath]); > CGContextEOClip(context); > CGContextFillRect(context, cornerImageBounds); >diff --git a/Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.mm b/Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.mm >index 74bd232d622ee81e07bf449e3087a2597fc728fc..f2a031605e09338e4ac50eb804de929a14440085 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.mm >@@ -39,8 +39,7 @@ > #import "WKContentViewInteraction.h" > #import "WebPageProxy.h" > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > SOFT_LINK_FRAMEWORK(MediaPlayer) > SOFT_LINK_CLASS(MediaPlayer, MPAVRoutingController) >@@ -160,7 +159,7 @@ using namespace WebKit; > > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #else > >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm b/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm >index 82d6f2a0f5a90f0d4f95bb4ffbb3fe8c1bbd8679..3e45c05594721f61c2ac57bbc0c073e056fff289 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm >@@ -46,8 +46,7 @@ > > using namespace WebKit; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > static inline UIImagePickerControllerCameraDevice cameraDeviceForMediaCaptureType(WebCore::MediaCaptureType mediaCaptureType) > { >@@ -160,10 +159,9 @@ static inline UIImage *cameraIcon() > BOOL _usingCamera; > RetainPtr<UIImagePickerController> _imagePicker; > RetainPtr<UIViewController> _presentationViewController; // iPhone always. iPad for Fullscreen Camera. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > RetainPtr<UIPopoverController> _presentationPopover; // iPad for action sheet and Photo Library. >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > RetainPtr<UIDocumentMenuViewController> _documentMenuController; > WebCore::MediaCaptureType _mediaCaptureType; > } >@@ -450,10 +448,9 @@ static NSArray *UTIsForMIMETypes(NSArray *mimeTypes) > { > [self _dismissDisplayAnimated:animated]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > _presentationPopover = adoptNS([[UIPopoverController alloc] initWithContentViewController:contentViewController]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [_presentationPopover setDelegate:self]; > [_presentationPopover presentPopoverFromRect:CGRectIntegral(CGRectMake(_interactionPoint.x, _interactionPoint.y, 1, 1)) inView:_view permittedArrowDirections:UIPopoverArrowDirectionAny animated:animated]; > } >@@ -720,6 +717,6 @@ static NSArray *UTIsForMIMETypes(NSArray *mimeTypes) > > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif // PLATFORM(IOS) >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm b/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >index 609bac31f56aa5aaebf03c2e318c1554a58e95a7..38c04003aeba1e942a3df953d4cd124067b0ca64 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >@@ -66,10 +66,9 @@ static const CGFloat colorPopoverCornerRadius = 9; > [popoverViewController setView:controlContainerView.get()]; > [popoverViewController setPreferredContentSize:[controlContainerView size]]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > RetainPtr<UIPopoverController> controller = adoptNS([[UIPopoverController alloc] initWithContentViewController:popoverViewController.get()]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self setPopoverController:controller.get()]; > > return self; >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm b/Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm >index 1cd62e3bb51813b714e34a3cfbeb73abaaa90ce3..f92783a7cb071a0bbb2348f97074adc3040ccacc 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm >@@ -330,16 +330,14 @@ static const NSTimeInterval kMillisecondsPerSecond = 1000; > RetainPtr<UINavigationController> navigationController = adoptNS([[UINavigationController alloc] initWithRootViewController:_viewController.get()]); > UINavigationItem *navigationItem = navigationController.get().navigationBar.topItem; > NSString *clearString = WEB_UI_STRING_KEY("Clear", "Clear Button Date Popover", "Clear button in date input popover"); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > UIBarButtonItem *clearButton = [[[UIBarButtonItem alloc] initWithTitle:clearString style:UIBarButtonItemStyleBordered target:self action:@selector(clear:)] autorelease]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [navigationItem setRightBarButtonItem:clearButton]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > RetainPtr<UIPopoverController> controller = adoptNS([[UIPopoverController alloc] initWithContentViewController:navigationController.get()]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self setPopoverController:controller.get()]; > > return self; >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormPopover.h b/Source/WebKit/UIProcess/ios/forms/WKFormPopover.h >index 0ec8c6553879abdc5b9210f957824b07e0b0fdeb..40212bc0b4dabd878bb7b735094814ed1315ef1d 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormPopover.h >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormPopover.h >@@ -40,10 +40,9 @@ > @property (nonatomic, readonly) WKContentView *view; > > @property (nonatomic, assign) CGPoint presentationPoint; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > @property (nonatomic, retain) UIPopoverController *popoverController; >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > @property (nonatomic, assign) id <WKRotatingPopoverDelegate> dismissionDelegate; > @end > >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormPopover.mm b/Source/WebKit/UIProcess/ios/forms/WKFormPopover.mm >index be2f0d2cad4ff8c2fd4181563b7e6db6dcb8e2a0..d8fd1c8ffa1120cc3ff3d4323e1af33fe9c7997b 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormPopover.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormPopover.mm >@@ -36,8 +36,7 @@ > > using namespace WebKit; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > @implementation WKFormRotatingAccessoryPopover > >@@ -178,6 +177,6 @@ using namespace WebKit; > > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif // PLATFORM(IOS) >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm b/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm >index 57bfa40704a20e32eecb8fe1c76c2c50e8d8f904..f481e419541adfa90581b03875476dbea194cbe9 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm >@@ -401,10 +401,9 @@ static NSString *stringWithWritingDirection(NSString *string, UITextWritingDirec > else > popoverViewController.preferredContentSize = popoverSize; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > self.popoverController = [[[UIPopoverController alloc] initWithContentViewController:popoverViewController] autorelease]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [navController release]; > >diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >index 8c23b28b820b5be1e741b317e3d209ffa8161d0c..a35610aec41d811a13823dc76d6b817eb73409a3 100644 >--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >@@ -419,10 +419,9 @@ void PageClientImpl::pinnedStateDidChange() > > IntPoint PageClientImpl::screenToRootView(const IntPoint& point) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPoint windowCoord = [[m_view window] convertScreenToBase:point]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return IntPoint([m_view convertPoint:windowCoord fromView:nil]); > } > >@@ -430,10 +429,9 @@ IntRect PageClientImpl::rootViewToScreen(const IntRect& rect) > { > NSRect tempRect = rect; > tempRect = [m_view convertRect:tempRect toView:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > tempRect.origin = [[m_view window] convertBaseToScreen:tempRect.origin]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return enclosingIntRect(tempRect); > } > >diff --git a/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm b/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm >index 5a6bfc33cef2d206a9e06d15ddf1c87cc3712456..f032c8a28376131e2e341fd661d5f990887b99f9 100644 >--- a/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm >+++ b/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm >@@ -265,12 +265,11 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage) > // future overhead. > webViewContents = createImageWithCopiedData(webViewContents.get()); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled in _startEnterFullScreenAnimationWithDuration: > NSDisableScreenUpdates(); > [[self window] setAutodisplay:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [self _manager]->saveScrollPosition(); > _savedTopContentInset = _page->topContentInset(); >@@ -325,11 +324,10 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > if (completed) { > _fullScreenState = InFullScreen; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled ta the end of the current block. > NSDisableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self _manager]->didEnterFullScreen(); > [self _manager]->setAnimatingFullScreen(false); > >@@ -347,10 +345,9 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > // Transition to fullscreen failed. Clean up. > _fullScreenState = NotInFullScreen; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > _page->setSuppressVisibilityUpdates(false); > > NSResponder *firstResponder = [[self window] firstResponder]; >@@ -369,10 +366,9 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > [self _manager]->setAnimatingFullScreen(false); > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > if (_requestedExitFullScreen) { > _requestedExitFullScreen = NO; >@@ -402,12 +398,11 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > > [_webViewPlaceholder setExitWarningVisible:NO]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled in _startExitFullScreenAnimationWithDuration: or beganExitFullScreenWithInitialFrame:finalFrame: > NSDisableScreenUpdates(); > [[self window] setAutodisplay:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // See the related comment in enterFullScreen: > // We will resume the normal behavior in _startExitFullScreenAnimationWithDuration: >@@ -437,10 +432,9 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > // Because we are breaking the normal animation pattern, re-enable screen updates > // as exitFullScreen has disabled them, but _startExitFullScreenAnimationWithDuration: > // will never be called. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > [[self window] exitFullScreenMode:self]; >@@ -463,20 +457,18 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > > NSResponder *firstResponder = [[self window] firstResponder]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled in completeFinishExitFullScreenAnimationAfterRepaint. > NSDisableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > _page->setSuppressVisibilityUpdates(true); > [[self window] orderOut:self]; > NSView *contentView = [[self window] contentView]; > contentView.hidden = YES; > [_backgroundView.get().layer removeAllAnimations]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[_webViewPlaceholder window] setAutodisplay:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [self _replaceView:_webViewPlaceholder.get() with:_webView]; > BEGIN_BLOCK_OBJC_EXCEPTIONS >@@ -509,16 +501,14 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med > - (void)completeFinishExitFullScreenAnimationAfterRepaint > { > _repaintCallback = nullptr; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[_webView window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [[_webView window] displayIfNeeded]; > _page->setSuppressVisibilityUpdates(false); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)performClose:(id)sender >@@ -727,15 +717,13 @@ static CAAnimation *fadeAnimation(CFTimeInterval duration, AnimationDirection di > [window makeFirstResponder:_webView]; > > _page->setSuppressVisibilityUpdates(false); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [[self window] displayIfNeeded]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_startExitFullScreenAnimationWithDuration:(NSTimeInterval)duration >@@ -758,15 +746,13 @@ static CAAnimation *fadeAnimation(CFTimeInterval duration, AnimationDirection di > [_backgroundView.get().layer addAnimation:fadeAnimation(duration, AnimateOut) forKey:@"fullscreen"]; > > _page->setSuppressVisibilityUpdates(false); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [[self window] displayIfNeeded]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_watchdogTimerFired:(NSTimer *)timer >diff --git a/Source/WebKit/UIProcess/mac/WKPrintingView.mm b/Source/WebKit/UIProcess/mac/WKPrintingView.mm >index 1fda7dbe5df1ff7db1770cafb140dff560f5a38c..71b5aa4f580a22dbc8f5bc3ad9600d061feabb75 100644 >--- a/Source/WebKit/UIProcess/mac/WKPrintingView.mm >+++ b/Source/WebKit/UIProcess/mac/WKPrintingView.mm >@@ -78,16 +78,14 @@ static BOOL isForcingPreviewUpdate; > > - (void)_setAutodisplay:(BOOL)newState > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (!newState && [[_wkView window] isAutodisplay]) >-#pragma clang diagnostic pop > [_wkView displayIfNeeded]; >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[_wkView window] setAutodisplay:newState]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // For some reason, painting doesn't happen for a long time without this call, <rdar://problem/8975229>. > if (newState) >@@ -454,19 +452,17 @@ static NSString *linkDestinationName(PDFDocument *document, PDFDestination *dest > } > > NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext currentContext]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef context = static_cast<CGContextRef>([nsGraphicsContext graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > CGContextSaveGState(context); > CGContextTranslateCTM(context, point.x, point.y); > CGContextScaleCTM(context, _totalScaleFactorForPrinting, -_totalScaleFactorForPrinting); > CGContextTranslateCTM(context, 0, -[pdfPage boundsForBox:kPDFDisplayBoxMediaBox].size.height); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [pdfPage drawWithBox:kPDFDisplayBoxMediaBox]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > CGAffineTransform transform = CGContextGetCTM(context); > >@@ -479,10 +475,9 @@ static NSString *linkDestinationName(PDFDocument *document, PDFDestination *dest > if (![annotation isKindOfClass:WebKit::pdfAnnotationLinkClass()]) > continue; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > PDFAnnotationLink *linkAnnotation = (PDFAnnotationLink *)annotation; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > NSURL *url = [linkAnnotation URL]; > CGRect transformedRect = CGRectApplyAffineTransform(NSRectToCGRect([linkAnnotation bounds]), transform); > >@@ -545,10 +540,9 @@ static NSString *linkDestinationName(PDFDocument *document, PDFDestination *dest > } > > RefPtr<WebKit::ShareableBitmap> bitmap = pagePreviewIterator->value; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef cgContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > WebCore::GraphicsContext context(cgContext); > WebCore::GraphicsContextStateSaver stateSaver(context); >@@ -589,10 +583,9 @@ static NSString *linkDestinationName(PDFDocument *document, PDFDestination *dest > if (![annotation isKindOfClass:WebKit::pdfAnnotationLinkClass()]) > continue; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > PDFAnnotationLink *linkAnnotation = (PDFAnnotationLink *)annotation; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (linkAnnotation.URL) > continue; > >diff --git a/Source/WebKit/UIProcess/mac/WKTextInputWindowController.mm b/Source/WebKit/UIProcess/mac/WKTextInputWindowController.mm >index ae3641ef797463a180c0fb2674b002ab11a87962..b85437459ec1b0221d6a99b15abf95bdd15e8239 100644 >--- a/Source/WebKit/UIProcess/mac/WKTextInputWindowController.mm >+++ b/Source/WebKit/UIProcess/mac/WKTextInputWindowController.mm >@@ -106,10 +106,9 @@ > > - (BOOL)_interpretKeyEvent:(NSEvent *)event usingLegacyCocoaTextInput:(BOOL)usingLegacyCocoaTextInput string:(NSString **)string > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > BOOL hadMarkedText = [_inputTextView hasMarkedText]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > *string = nil; > >@@ -124,10 +123,9 @@ > if (![[_inputTextView inputContext] handleEvent:event]) > return NO; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if ([_inputTextView hasMarkedText]) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > // Don't show the input method window for dead keys > if ([[event characters] length] > 0) > [self orderFront:nil]; >@@ -161,10 +159,9 @@ > > - (BOOL)_hasMarkedText > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return [_inputTextView hasMarkedText]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > @end >diff --git a/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm >index 8b5db1595ab357fec94dce77c764eadcbb63560d..b903e8675d72c2d010cda799fad3d267a9010ae3 100644 >--- a/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm >@@ -188,10 +188,9 @@ void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection text > [NSApp postEvent:fakeEvent atStart:YES]; > fakeEvent = [NSEvent mouseEventWithType:NSEventTypeMouseMoved > location:[[m_webView window] >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > convertScreenToBase:[NSEvent mouseLocation]] >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > modifierFlags:[initiatingNSEvent modifierFlags] > timestamp:[initiatingNSEvent timestamp] > windowNumber:[initiatingNSEvent windowNumber] >diff --git a/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm b/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm >index edcf532c85aaf8c6b3a50ae3d64be06e9aa0e340..4ed11654a1039d65c911acaf161f38fbd9cf3554 100644 >--- a/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm >+++ b/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm >@@ -373,10 +373,9 @@ static inline EventRecord initializeEventRecord(EventKind eventKind) > > eventRecord.what = eventKind; > eventRecord.message = 0; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > eventRecord.when = TickCount(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > eventRecord.where = Point(); > eventRecord.modifiers = 0; > >@@ -1043,10 +1042,9 @@ void NetscapePlugin::sendComplexTextInput(const String& textInput) > > // Set the script code as the keyboard script. Normally Carbon does this whenever the input source changes. > // However, this is only done for the process that has the keyboard focus. We cheat and do it here instead. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > SetScriptManagerVariable(smKeyScript, scriptCode); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > EventRecord event = initializeEventRecord(keyDown); > event.modifiers = 0; >@@ -1121,11 +1119,10 @@ static void makeCGLPresentLayerOpaque(CALayer *pluginRootLayer) > return; > > Class cglPresentLayerClass = NSClassFromString(@"CGLPresentLayer"); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (![cglPresentLayerClass isSubclassOfClass:[CAOpenGLLayer class]]) > return; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > CALayer *layer = [sublayers objectAtIndex:0]; > if (![layer isKindOfClass:cglPresentLayerClass]) >@@ -1181,11 +1178,10 @@ void NetscapePlugin::nullEventTimerFired() > event.where.v = mousePosition.y; > > event.modifiers = GetCurrentKeyModifiers(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (!Button()) > event.modifiers |= btnState; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > NPP_HandleEvent(&event); > } >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >index 5307e26a7637e8a69b045abb92879f3f8c6586f2..dae3295f045d74b5d66ba3e2c84feb34be1df139 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >@@ -318,10 +318,9 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20; > if (WebKit::PDFPluginAnnotation* activeAnnotation = _pdfPlugin->activeAnnotation()) { > if (AXObjectCache* existingCache = _pdfPlugin->axObjectCache()) { > if (AccessibilityObject* object = existingCache->getOrCreate(activeAnnotation->element())) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return [object->wrapper() accessibilityAttributeValue:@"_AXAssociatedPluginParent"]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > } > return nil; >@@ -426,10 +425,9 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20; > > - (void)writeItemsToPasteboard:(NSArray *)items withTypes:(NSArray *)types > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > _pdfPlugin->writeItemsToPasteboard(NSGeneralPboard, items, types); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)showDefinitionForAttributedString:(NSAttributedString *)string atPoint:(CGPoint)point >@@ -1651,11 +1649,10 @@ bool PDFPlugin::handleEditingCommand(const String& commandName, const String& ar > [m_pdfLayerController selectAll]; > else if (commandName == "takeFindStringFromSelection") { > NSString *string = [m_pdfLayerController currentSelection].string; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (string.length) > writeItemsToPasteboard(NSFindPboard, @[ [string dataUsingEncoding:NSUTF8StringEncoding] ], @[ NSPasteboardTypeString ]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > return true; >@@ -1735,13 +1732,12 @@ void PDFPlugin::setActiveAnnotation(PDFAnnotation *annotation) > m_activeAnnotation->commit(); > > if (annotation) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if ([annotation isKindOfClass:pdfAnnotationTextWidgetClass()] && static_cast<PDFAnnotationTextWidget *>(annotation).isReadOnly) { > m_activeAnnotation = nullptr; > return; > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > m_activeAnnotation = PDFPluginAnnotation::create(annotation, m_pdfLayerController.get(), this); > m_activeAnnotation->attach(m_annotationContainer.get()); >@@ -2079,10 +2075,9 @@ std::tuple<String, PDFSelection *, NSDictionary *> PDFPlugin::lookupTextAtLocati > if (!NSPointInRect(pointInPageSpace, bounds)) > continue; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > PDFAnnotationLink *linkAnnotation = (PDFAnnotationLink *)annotation; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > NSURL *url = linkAnnotation.URL; > if (!url) > continue; >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h >index 0f7675c5d231d57d92bd627936e9e024d2e1c68d..de75ca8678c3c536cfa01bd14646468c3188e7f4 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h >@@ -53,10 +53,9 @@ private: > > Ref<WebCore::Element> createAnnotationElement() override; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > PDFAnnotationChoiceWidget *choiceAnnotation() { return static_cast<PDFAnnotationChoiceWidget *>(annotation()); } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > }; > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm >index 5825fd3ecab46154f8f9d05013f654ac8c6158cf..c597e96fb4c0b9752570e99d2ee3c61b477b4f46 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm >@@ -67,10 +67,9 @@ void PDFPluginChoiceAnnotation::commit() > Ref<Element> PDFPluginChoiceAnnotation::createAnnotationElement() > { > Document& document = parent()->document(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > PDFAnnotationChoiceWidget *choiceAnnotation = this->choiceAnnotation(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > auto element = document.createElement(selectTag, false); > >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h >index 92d4023cd70e94d98d4bb581e30a7d285b19d9dc..79ad31259ff045754f1fbba987954d97cd6fab30 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h >@@ -60,10 +60,9 @@ protected: > private: > bool handleEvent(WebCore::Event&) override; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > PDFAnnotationTextWidget *textAnnotation() const { return static_cast<PDFAnnotationTextWidget *>(annotation()); } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > }; > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm >index 2c6a76c4b0e115510195ffd697486466a75f1268..ac60978b8df4434f4a6db2d3bc5da296ad6c3c77 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm >@@ -80,10 +80,9 @@ PDFPluginTextAnnotation::~PDFPluginTextAnnotation() > Ref<Element> PDFPluginTextAnnotation::createAnnotationElement() > { > Document& document = parent()->document(); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > PDFAnnotationTextWidget *textAnnotation = this->textAnnotation(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > bool isMultiline = textAnnotation.isMultiline; > > auto element = document.createElement(isMultiline ? textareaTag : inputTag, false); >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h >index 4520e9d69bc802f6ebda65b297e8a8d458c19728..cb694c5b5720c3f258143cac3fc9b413e3a86993 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h >@@ -51,14 +51,11 @@ public: > #endif > private: > #if PLATFORM(IOS) >-#pragma clang diagnostic push >-#if defined(__has_warning) && __has_warning("-Wunused-private-field") >-#pragma clang diagnostic ignored "-Wunused-private-field" >-#endif >+ IGNORE_WARNING_CLANG("-Wunused-private-field"); > #endif > WebPage *m_page; > #if PLATFORM(IOS) >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wunused-private-field"); > #endif > }; > >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >index a877e7fcfa0a398797770a14344905ff973032f0..7c3cd8d2f86682e4c77089b6b6d478fbf62e035e 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >@@ -72,10 +72,9 @@ static RefPtr<ShareableBitmap> convertImageToBitmap(NSImage *image, const IntSiz > > RetainPtr<NSGraphicsContext> savedContext = [NSGraphicsContext currentContext]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:graphicsContext->platformContext() flipped:YES]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [image drawInRect:NSMakeRect(0, 0, bitmap->size().width(), bitmap->size().height()) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1 respectFlipped:YES hints:nil]; > > [NSGraphicsContext setCurrentContext:savedContext.get()]; >@@ -113,10 +112,9 @@ static WebCore::CachedImage* cachedImage(Element& element) > > void WebDragClient::declareAndWriteDragImage(const String& pasteboardName, Element& element, const URL& url, const String& label, Frame*) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ASSERT(pasteboardName == String(NSDragPboard)); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > WebCore::CachedImage* image = cachedImage(element); > >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm >index fe94e85e470f4a87e59fe9d7ecf8442fee57cf33..d3d9a1556d3056da41be543893f38dcac8e0c823 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm >@@ -192,8 +192,7 @@ using namespace WebKit; > return YES; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > - (id)accessibilityHitTest:(NSPoint)point > { > if (!m_page) >@@ -215,7 +214,7 @@ using namespace WebKit; > > return [[self accessibilityRootObjectWrapper] accessibilityHitTest:convertedPoint]; > } >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > @end > >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >index da7c98f68c48189073dbea474871ff2cab6a581a..6cc1337d11541af691a25c633c065c57f238ec5c 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >@@ -818,11 +818,10 @@ static void drawPDFPage(PDFDocument *pdfDocument, CFIndex pageIndex, CGContextRe > } > > [NSGraphicsContext saveGraphicsState]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO]]; > [pdfPage drawWithBox:kPDFDisplayBoxCropBox]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [NSGraphicsContext restoreGraphicsState]; > > CGAffineTransform transform = CGContextGetCTM(context); >@@ -831,10 +830,9 @@ static void drawPDFPage(PDFDocument *pdfDocument, CFIndex pageIndex, CGContextRe > if (![annotation isKindOfClass:pdfAnnotationLinkClass()]) > continue; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > PDFAnnotationLink *linkAnnotation = (PDFAnnotationLink *)annotation; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > NSURL *url = [linkAnnotation URL]; > if (!url) > continue; >diff --git a/Source/WebKitLegacy/mac/Carbon/CarbonUtils.m b/Source/WebKitLegacy/mac/Carbon/CarbonUtils.m >index b795e9b42a6e71485dd177ccd9ddc73a4947e0df..058a3b403a0ba8b2b829a693b4d60fb82050dc5a 100644 >--- a/Source/WebKitLegacy/mac/Carbon/CarbonUtils.m >+++ b/Source/WebKitLegacy/mac/Carbon/CarbonUtils.m >@@ -87,10 +87,9 @@ static unsigned getNSAutoreleasePoolCount(void) > PoolCleaner( EventLoopTimerRef inTimer, EventLoopIdleTimerMessage inState, void *inUserData ) > { > if ( inState == kEventLoopIdleTimerStarted ) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wcast-qual" >+ IGNORE_WARNING_CLANG("-Wcast-qual"); > CFStringRef mode = CFRunLoopCopyCurrentMode( (CFRunLoopRef)GetCFRunLoopFromEventLoop( GetCurrentEventLoop() )); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wcast-qual"); > EventLoopRef thisLoop = GetCurrentEventLoop (); > if ( CFEqual( mode, kCFRunLoopDefaultMode ) && thisLoop == poolLoop) { > unsigned currentNumPools = getNSAutoreleasePoolCount()-1; >diff --git a/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm b/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm >index d1522f3f023ef0f6de3362bda3b304947888c0bf..f3d423eb298d473584905ab00f19f1c57bdf4e87 100644 >--- a/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm >+++ b/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm >@@ -177,10 +177,9 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > // But now the non-retained window class is a Carbon secret that's not even in > // WindowsPriv.h; maybe we'll have to revisit this if someone needs to use WebKit > // in a non-retained window. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > backingStoreType = NSBackingStoreRetained; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // Figure out the window's style mask. > styleMask = _NSCarbonWindowMask; >@@ -205,10 +204,9 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > // Do some standard Cocoa initialization. The defer argument's value is YES because we don't want -[NSWindow _commonAwake] to get called. It doesn't appear that any relevant NSWindow code checks _wFlags.deferred, so we should be able to get away with the lie. > self = (CarbonWindowAdapter*)[super _initContent:nullptr styleMask:styleMask backing:backingStoreType defer:YES contentView:carbonWindowContentView]; > if (!self) return nil; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > assert(_contentView); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // Record accurately whether or not this window has a shadow, in case someone asks. > // _auxiliaryStorage->_auxWFlags.hasShadow = (windowAttributes & kWindowNoShadowAttribute) ? NO : YES; >@@ -281,10 +279,9 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > // flushes it. > > if ([self windowNumber] != -1) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef cgContext = (CGContextRef)[[self _threadContext] graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGContextSynchronize(cgContext); > } > } >@@ -374,11 +371,10 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > // Initialize for safe returning. > BOOL reconciliationWasNecessary = NO; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Precondition check. > assert(_contentView); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // Get the Carbon window's bounds, which are expressed in global screen coordinates, with (0,0) at the top-left of the main screen. > osStatus = GetWindowBounds(_windowRef, kWindowStructureRgn, &windowStructureBoundsRect); >@@ -393,28 +389,26 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > newWindowFrameRect.origin.y = NSMaxY([(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame]) - windowStructureBoundsRect.bottom; > newWindowFrameRect.size.width = windowStructureBoundsRect.right - windowStructureBoundsRect.left; > newWindowFrameRect.size.height = windowStructureBoundsRect.bottom - windowStructureBoundsRect.top; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (!NSEqualRects(newWindowFrameRect, _frame)) { > [self _setFrame:newWindowFrameRect]; > [_borderView setFrameSize:newWindowFrameRect.size]; > reconciliationWasNecessary = YES; > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // Set the content view's frame rect from the Carbon window's content region bounds. > newContentFrameRect.origin.x = windowContentBoundsRect.left - windowStructureBoundsRect.left; > newContentFrameRect.origin.y = windowStructureBoundsRect.bottom - windowContentBoundsRect.bottom; > newContentFrameRect.size.width = windowContentBoundsRect.right - windowContentBoundsRect.left; > newContentFrameRect.size.height = windowContentBoundsRect.bottom - windowContentBoundsRect.top; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > oldContentFrameRect = [(NSView *)_contentView frame]; > if (!NSEqualRects(newContentFrameRect, oldContentFrameRect)) { > [(NSView *)_contentView setFrame:newContentFrameRect]; > reconciliationWasNecessary = YES; > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // Done. > return reconciliationWasNecessary; >@@ -595,8 +589,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > // This function is mostly cut-and-pasted from -[NSWindow _termWindowIfOwner]. M.P. Notice - 8/7/00 > - (void)_termWindowIfOwner > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [self _setWindowNumber:-1]; > _wFlags.isTerminating = YES; > if (_windowRef && _windowRefIsOwned) >@@ -606,7 +599,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > // [_borderView setShadowState:kFrameShadowNone]; > // } > _wFlags.isTerminating = NO; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > >@@ -626,10 +619,9 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > [super _windowMovedToRect:actualFrame]; > > // Let Carbon know that the window has been moved, unless this method is being called "early." >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (_wFlags.visible) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > osStatus = _SyncWindowWithCGAfterMove(_windowRef); > if (osStatus!=noErr) NSLog(@"A Carbon window's bounds couldn't be synchronized (%i).", (int)osStatus); > } >@@ -758,11 +750,10 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > Rect windowContentBoundsRect; > > // Precondition check. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > assert(_borderView); > assert([_borderView isKindOfClass:[CarbonWindowFrame class]]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > assert(_windowRef); > > // Parameter check. >@@ -776,8 +767,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > contentFrameRect.size.width = windowContentBoundsRect.right - windowContentBoundsRect.left; > contentFrameRect.size.height = windowContentBoundsRect.bottom - windowContentBoundsRect.top; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // If the content view is still in some other view hierarchy, pry it free. > [_contentView removeFromSuperview]; > assert(![_contentView superview]); >@@ -791,7 +781,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall > > // Tell the content view it's new place in the responder chain. > [_contentView setNextResponder:self]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > >@@ -944,10 +934,9 @@ CleanUp: > HIRect frame; > > HIViewGetFrame(root, &frame); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [_borderView setFrameSize:*(NSSize*)&frame.size]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_handleContentBoundsChanged >@@ -964,13 +953,12 @@ CleanUp: > // Set the content view's frame rect from the Carbon window's content region bounds. > contentFrame.origin.y = rootBounds.size.height - CGRectGetMaxY(contentFrame); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > oldContentFrameRect = [(NSView *)_contentView frame]; > if (!NSEqualRects(*(NSRect*)&contentFrame, oldContentFrameRect)) { > [(NSView *)_contentView setFrame:*(NSRect*)&contentFrame]; > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (OSStatus)_handleCarbonEvent:(EventRef)inEvent callRef:(EventHandlerCallRef)inCallRef >diff --git a/Source/WebKitLegacy/mac/Carbon/CarbonWindowFrame.m b/Source/WebKitLegacy/mac/Carbon/CarbonWindowFrame.m >index e926eb6c21e0fa88f28dc4a061c390225325eb97..7efff165f9e8c7adcac66c53f3ac49c09010451e 100644 >--- a/Source/WebKitLegacy/mac/Carbon/CarbonWindowFrame.m >+++ b/Source/WebKitLegacy/mac/Carbon/CarbonWindowFrame.m >@@ -241,10 +241,9 @@ - (NSString *)title { > windowRef = [carbonWindow windowRef]; > osStatus = CopyWindowTitleAsCFString(windowRef, &windowTitle); > if (osStatus==noErr) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wcast-qual" >+ IGNORE_WARNING_CLANG("-Wcast-qual"); > windowTitleAsNSString = (NSString *)windowTitle; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wcast-qual"); > } else { > NSLog(@"A Carbon window's title couldn't be gotten."); > windowTitleAsNSString = @""; >diff --git a/Source/WebKitLegacy/mac/Carbon/HIViewAdapter.m b/Source/WebKitLegacy/mac/Carbon/HIViewAdapter.m >index f3d9965ab7fd1384abb55e59c5a0944b5e601e70..629b23519178e06e74dc8edb1651a18f06633113 100644 >--- a/Source/WebKitLegacy/mac/Carbon/HIViewAdapter.m >+++ b/Source/WebKitLegacy/mac/Carbon/HIViewAdapter.m >@@ -88,10 +88,9 @@ + (void)bindHIViewToNSView:(HIViewRef)hiView nsView:(NSView*)nsView > > + (HIViewRef)getHIViewForNSView:(NSView*)inView > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wcast-qual" >+ IGNORE_WARNING_CLANG("-Wcast-qual"); > return sViewMap ? (HIViewRef)CFDictionaryGetValue(sViewMap, inView) : NULL; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wcast-qual"); > } > > + (void)unbindNSView:(NSView*)inView >diff --git a/Source/WebKitLegacy/mac/Carbon/HIWebView.mm b/Source/WebKitLegacy/mac/Carbon/HIWebView.mm >index 406b779facf7a3d414bb2dfca3955164e762926a..22f6ce379ad6a901a76bf43c65578efa910823df 100644 >--- a/Source/WebKitLegacy/mac/Carbon/HIWebView.mm >+++ b/Source/WebKitLegacy/mac/Carbon/HIWebView.mm >@@ -288,11 +288,10 @@ static UInt32 GetBehaviors() > > static CGContextRef overrideCGContext(NSWindow *window, CGContextRef context) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSWindowGraphicsContext *graphicsContext = (NSWindowGraphicsContext *)window.graphicsContext; > CGContextRef savedContext = (CGContextRef)graphicsContext.graphicsPort; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGContextRetain(savedContext); > [graphicsContext _web_setGraphicsPort:context]; > return savedContext; >@@ -300,10 +299,9 @@ static CGContextRef overrideCGContext(NSWindow *window, CGContextRef context) > > static void restoreCGContext(NSWindow *window, CGContextRef savedContext) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSWindowGraphicsContext *graphicsContext = (NSWindowGraphicsContext *)window.graphicsContext; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [graphicsContext _web_setGraphicsPort:savedContext]; > CGContextRelease(savedContext); > } >@@ -323,8 +321,7 @@ static void Draw(HIWebView* inView, RgnHandle limitRgn, CGContextRef inContext) > GrafPtr port; > Rect portRect; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > GetPort(&port); > GetPortBounds(port, &portRect); > CreateCGContextForPort(port, &inContext); >diff --git a/Source/WebKitLegacy/mac/DOM/DOM.mm b/Source/WebKitLegacy/mac/DOM/DOM.mm >index 8ebb8a0daf6345f21903d6fecb24d8f14e06c2a1..0f98ad505d4d1ff0f5146cb55aca282315d7be5a 100644 >--- a/Source/WebKitLegacy/mac/DOM/DOM.mm >+++ b/Source/WebKitLegacy/mac/DOM/DOM.mm >@@ -244,8 +244,7 @@ static inline WKQuad zeroQuad() > > @implementation DOMNode (WebCoreInternal) > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wobjc-protocol-method-implementation") > > - (NSString *)description > { >@@ -259,7 +258,7 @@ static inline WKQuad zeroQuad() > return [NSString stringWithFormat:@"<%@ [%@]: %p>", [[self class] description], [self nodeName], _internal]; > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wobjc-protocol-method-implementation") > > - (Bindings::RootObject*)_rootObject > { >diff --git a/Source/WebKitLegacy/mac/History/WebHistory.h b/Source/WebKitLegacy/mac/History/WebHistory.h >index f83c524d19deb7627ec5ed259e1da6b46b11df69..3898b7d9c995fddb43615a7decb160aafb00543c 100644 >--- a/Source/WebKitLegacy/mac/History/WebHistory.h >+++ b/Source/WebKitLegacy/mac/History/WebHistory.h >@@ -128,10 +128,9 @@ WEBKIT_CLASS_DEPRECATED_MAC(10_3, 10_14) > @param calendarDate A date identifying the unique day of interest. > @result Returns an array of WebHistoryItems last visited on the indicated day. > */ >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > - (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate; >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > #endif > > /*! >diff --git a/Source/WebKitLegacy/mac/History/WebHistory.mm b/Source/WebKitLegacy/mac/History/WebHistory.mm >index 90496bbb993642996bf5a2456df8688df865607b..2f404fe08d6a52e61922d0e60125617f5d7d0e7a 100644 >--- a/Source/WebKitLegacy/mac/History/WebHistory.mm >+++ b/Source/WebKitLegacy/mac/History/WebHistory.mm >@@ -446,8 +446,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date) > > // MARK: DATE-BASED RETRIEVAL > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > - (NSArray *)orderedLastVisitedDays > { >@@ -479,7 +478,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date) > return _entriesByDate->get(dateKey).get(); > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > // MARK: URL MATCHING > >@@ -531,8 +530,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date) > return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitHistoryItemLimit"]; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > // Return a date that marks the age limit for history entries saved to or > // loaded from disk. Any entry older than this item should be rejected. >@@ -542,7 +540,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date) > hours:0 minutes:0 seconds:0]; > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > - (BOOL)loadHistoryGutsFromURL:(NSURL *)URL savedItemsCount:(int *)numberOfItemsLoaded collectDiscardedItemsInto:(NSMutableArray *)discardedItems error:(NSError **)error > { >@@ -561,10 +559,9 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date) > return NO; > } > } else { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:URL] returningResponse:nil error:error]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (data.length) > dictionary = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:nullptr error:nullptr]; > } >@@ -768,15 +765,14 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date) > return [_historyPrivate orderedLastVisitedDays]; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > - (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)date > { > return [_historyPrivate orderedItemsLastVisitedOnDay:date]; > } > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > // MARK: URL MATCHING > >diff --git a/Source/WebKitLegacy/mac/History/WebHistoryItem.mm b/Source/WebKitLegacy/mac/History/WebHistoryItem.mm >index cc1857af02baa079ec92a81e46050058923a9c98..df19dfe7b62ff276899e5a45b59a5593c69fc6d4 100644 >--- a/Source/WebKitLegacy/mac/History/WebHistoryItem.mm >+++ b/Source/WebKitLegacy/mac/History/WebHistoryItem.mm >@@ -199,10 +199,9 @@ void WKNotifyHistoryItemChanged(HistoryItem*) > #if !PLATFORM(IOS) > - (NSImage *)icon > { >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_GCC("-Wdeprecated-declarations"); > return [[WebIconDatabase sharedIconDatabase] iconForURL:[self URLString] withSize:WebIconSmallSize]; >-#pragma GCC diagnostic pop >+ IGNORE_WARNING_GCC_END("-Wdeprecated-declarations"); > } > #endif > >diff --git a/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm b/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm >index 7f99502f36b74923f311e0061aebe14d76646cce..61ebebfc76e1020b1d012af3489d60ffb127587f 100644 >--- a/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm >+++ b/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm >@@ -77,10 +77,9 @@ static bool canUseFastRenderer(const UniChar* buffer, unsigned length) > point.y = CGCeiling(point.y); > > NSGraphicsContext *nsContext = [NSGraphicsContext currentContext]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef cgContext = static_cast<CGContextRef>([nsContext graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > GraphicsContext graphicsContext { cgContext }; > > // WebCore requires a flipped graphics context. >diff --git a/Source/WebKitLegacy/mac/Misc/WebNSImageExtras.m b/Source/WebKitLegacy/mac/Misc/WebNSImageExtras.m >index c32643b498fae70fd3124ae5c4569e03e96b2fc1..0f98e3e0e56b0b6446f43ad66194f71cb722fa42 100644 >--- a/Source/WebKitLegacy/mac/Misc/WebNSImageExtras.m >+++ b/Source/WebKitLegacy/mac/Misc/WebNSImageExtras.m >@@ -53,10 +53,9 @@ - (void)_web_scaleToMaxSize:(NSSize)size > > if(resizeDelta > 0.0){ > NSSize newSize = NSMakeSize((originalSize.width * resizeDelta), (originalSize.height * resizeDelta)); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [self setScalesWhenResized:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self setSize:newSize]; > } > } >@@ -65,29 +64,25 @@ - (void)_web_dissolveToFraction:(float)delta > { > NSImage *dissolvedImage = [[NSImage alloc] initWithSize:[self size]]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPoint point = [self isFlipped] ? NSMakePoint(0, [self size].height) : NSZeroPoint; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > // In this case the dragging image is always correct. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [dissolvedImage setFlipped:[self isFlipped]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [dissolvedImage lockFocus]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [self dissolveToPoint:point fraction: delta]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [dissolvedImage unlockFocus]; > > [self lockFocus]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [dissolvedImage compositeToPoint:point operation:NSCompositeCopy]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self unlockFocus]; > > [dissolvedImage release]; >diff --git a/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm b/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm >index fa23c6cbdb146b862cce2eae480aea11996c1bb0..cbb6b3571c032b6490e9cb98ac29519743628c14 100644 >--- a/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm >+++ b/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm >@@ -184,10 +184,9 @@ static NSArray *_writableTypesForImageWithArchive (void) > > + (int)_web_setFindPasteboardString:(NSString *)string withOwner:(id)owner > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPasteboard *findPasteboard = [NSPasteboard pasteboardWithName:NSFindPboard]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [findPasteboard declareTypes:[NSArray arrayWithObject:legacyStringPasteboardType()] owner:owner]; > [findPasteboard setString:string forType:legacyStringPasteboardType()]; > return [findPasteboard changeCount]; >@@ -279,10 +278,9 @@ static CachedImage* imageFromElement(DOMElement *domElement) > archive:(WebArchive *)archive > source:(WebHTMLView *)source > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ASSERT(self == [NSPasteboard pasteboardWithName:NSDragPboard]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > NSString *extension = @""; > RetainPtr<NSMutableArray> types = adoptNS([[NSMutableArray alloc] initWithObjects:legacyFilesPromisePasteboardType(), nil]); >diff --git a/Source/WebKitLegacy/mac/Panels/WebAuthenticationPanel.m b/Source/WebKitLegacy/mac/Panels/WebAuthenticationPanel.m >index 67f18b8f5375eac545b23a63db976f69476b7d4e..2989c5224d25a294e5b5de14a22ddb25adae8ed6 100644 >--- a/Source/WebKitLegacy/mac/Panels/WebAuthenticationPanel.m >+++ b/Source/WebKitLegacy/mac/Panels/WebAuthenticationPanel.m >@@ -104,10 +104,9 @@ - (IBAction)logIn:(id)sender > - (BOOL)loadNib > { > if (!nibLoaded) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if ([NSBundle loadNibNamed:WebAuthenticationPanelNibName owner:self]) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > nibLoaded = YES; > [imageView setImage:[NSImage imageNamed:@"NSApplicationIcon"]]; > } else { >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm >index 0210b066baad2697e09f28e089ad35fa74f369df..847383d26d46aae4992c8ce44c9a6aaac66af6bd 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm >@@ -187,10 +187,9 @@ bool NetscapePluginHostManager::spawnPluginHost(const String& pluginPath, cpu_ty > > ProcessSerialNumber psn; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > GetCurrentProcess(&psn); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > ASSERT(MACH_PORT_VALID(clientPort)); > kr = _WKPHCheckInWithPluginHost(pluginHostPort, static_cast<uint8_t*>(const_cast<void*>([data bytes])), [data length], clientPort, psn.highLongOfPSN, psn.lowLongOfPSN, renderServerPort, >@@ -322,11 +321,10 @@ void NetscapePluginHostManager::didCreateWindow() > if (!hostProxy->isMenuBarVisible()) { > // Make ourselves the front process. > ProcessSerialNumber psn; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > GetCurrentProcess(&psn); > SetFrontProcess(&psn); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return; > } > } >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm >index ec5f0da58a62a9e54478cc2c0f707eb4c71010b6..34a60f02621c8d17d9a6cd1cd106e57df29641ec 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm >@@ -341,32 +341,29 @@ bool NetscapePluginHostProxy::processRequests() > > void NetscapePluginHostProxy::makeCurrentProcessFrontProcess() > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ProcessSerialNumber psn; > GetCurrentProcess(&psn); > SetFrontProcess(&psn); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void NetscapePluginHostProxy::makePluginHostProcessFrontProcess() const > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > SetFrontProcess(&m_pluginHostPSN); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > bool NetscapePluginHostProxy::isPluginHostProcessFrontProcess() const > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > ProcessSerialNumber frontProcess; > GetFrontProcess(&frontProcess); > > Boolean isSameProcess = 0; > SameProcess(&frontProcess, &m_pluginHostPSN, &isSameProcess); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return isSameProcess; > } >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >index e93fb506e5de0a5dae3afa5658cbaf4178e26aa1..21c1d73715a87b861c1081b0aa86f04a14daeb93 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >@@ -423,10 +423,9 @@ void NetscapePluginInstanceProxy::startTimers(bool throttleTimers) > > void NetscapePluginInstanceProxy::mouseEvent(NSView *pluginView, NSEvent *event, NPCocoaEventType type) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPoint screenPoint = [[event window] convertBaseToScreen:[event locationInWindow]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > NSPoint pluginPoint = [pluginView convertPoint:[event locationInWindow] fromView:nil]; > > int clickCount; >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm >index f3e04b4f558061191c86fd6775515914863d1194..935fd290b6ffd3e1dfe978817b183ed0664637c4 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm >@@ -477,8 +477,7 @@ extern "C" { > } > > if (_proxy) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (_softwareRenderer) { > if ([NSGraphicsContext currentContextDrawingToScreen]) { > _softwareRenderer->render((CGContextRef)[[NSGraphicsContext currentContext] graphicsPort], NSRectToCGRect(rect)); >@@ -488,7 +487,7 @@ extern "C" { > } else if (_snapshotting && [self supportsSnapshotting]) { > _proxy->snapshot(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height); > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return; > } >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/WebTextInputWindowController.m b/Source/WebKitLegacy/mac/Plugins/Hosted/WebTextInputWindowController.m >index fbd667b748f8423eee8817ae4d15b5a7662fb519..97e5e5fe503579ada3fcdc5ad03cf2e1ba4c27f7 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/WebTextInputWindowController.m >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/WebTextInputWindowController.m >@@ -106,19 +106,17 @@ - (void)_keyboardInputSourceChanged:(NSNotification *)notification > > - (BOOL)_interpretKeyEvent:(NSEvent *)event string:(NSString **)string > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > BOOL hadMarkedText = [_inputTextView hasMarkedText]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > *string = nil; > > // Let TSM know that a bottom input window would be created for marked text. > // FIXME: Can be removed once we can rely on __NSUsesFloatingInputWindow (or a better API) being available everywhere. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wcast-qual" >+ IGNORE_WARNING_CLANG("-Wcast-qual"); > EventRef carbonEvent = (EventRef)[event eventRef]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wcast-qual"); > if (carbonEvent) { > Boolean ignorePAH = true; > SetEventParameter(carbonEvent, 'iPAH', typeBoolean, sizeof(ignorePAH), &ignorePAH); >@@ -127,10 +125,9 @@ - (BOOL)_interpretKeyEvent:(NSEvent *)event string:(NSString **)string > if (![[_inputTextView inputContext] handleEvent:event]) > return NO; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if ([_inputTextView hasMarkedText]) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > // Don't show the input method window for dead keys > if ([[event characters] length] > 0) > [self orderFront:nil]; >diff --git a/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm b/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm >index 6d85a8c5ea415982b108eeaa6dec47c0c8661994..3292d046d317029ee6087000b602d3d6f119e864 100644 >--- a/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm >+++ b/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm >@@ -729,25 +729,22 @@ using namespace WebCore; > switch (sourceSpace) { > case NPCoordinateSpacePlugin: > sourcePointInScreenSpace = [self convertPoint:sourcePoint toView:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > sourcePointInScreenSpace = [[self currentWindow] convertBaseToScreen:sourcePointInScreenSpace]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > break; > > case NPCoordinateSpaceWindow: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > sourcePointInScreenSpace = [[self currentWindow] convertBaseToScreen:sourcePoint]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > break; > > case NPCoordinateSpaceFlippedWindow: > sourcePoint.y = [[self currentWindow] frame].size.height - sourcePoint.y; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > sourcePointInScreenSpace = [[self currentWindow] convertBaseToScreen:sourcePoint]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > break; > > case NPCoordinateSpaceScreen: >@@ -767,25 +764,22 @@ using namespace WebCore; > // Then convert back to the destination space > switch (destSpace) { > case NPCoordinateSpacePlugin: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > destPoint = [[self currentWindow] convertScreenToBase:sourcePointInScreenSpace]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > destPoint = [self convertPoint:destPoint fromView:nil]; > break; > > case NPCoordinateSpaceWindow: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > destPoint = [[self currentWindow] convertScreenToBase:sourcePointInScreenSpace]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > break; > > case NPCoordinateSpaceFlippedWindow: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > destPoint = [[self currentWindow] convertScreenToBase:sourcePointInScreenSpace]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > destPoint.y = [[self currentWindow] frame].size.height - destPoint.y; > break; > >diff --git a/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginPackage.mm b/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginPackage.mm >index f2289347421904bee3c88666c4e30092fc1050de..bafcda68ad86473e7c4ea4c0609fc733f752e0f5 100644 >--- a/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginPackage.mm >+++ b/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginPackage.mm >@@ -167,14 +167,13 @@ using namespace WebCore; > if (!NP_Initialize || !NP_GetEntryPoints || !NP_Shutdown) > return NO; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Plugins (at least QT) require that you call UseResFile on the resource file before loading it. > resourceRef = [self openResourceFile]; > if (resourceRef != -1) { > UseResFile(resourceRef); > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > browserFuncs.version = NP_VERSION_MINOR; > browserFuncs.size = sizeof(NPNetscapeFuncs); >diff --git a/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm b/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm >index 49dc1c514f72c449ffdae729ca8d9c08164a9e3e..4028ba16ca2340aa4b2bf50f7fd0fb9a20aff109 100644 >--- a/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm >+++ b/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm >@@ -377,10 +377,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) > RgnHandle clipRegion = NewRgn(); > qdPortState->clipRegion = clipRegion; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (currentContext && CGContextGetType(currentContext) == kCGContextTypeBitmap) { > // We check for kCGContextTypeBitmap here, because if we just called CGBitmapContextGetData > // on any context, we'd log to the console every time. But even if currentContext is a >@@ -503,10 +502,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) > > ASSERT([NSView focusView] == self); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef context = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > PortState_CG *cgPortState = (PortState_CG *)malloc(sizeof(PortState_CG)); > portState = (PortState)cgPortState; >@@ -695,10 +693,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) > { > ASSERT(_eventHandler); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef context = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > _eventHandler->drawRect(context, rect); > } > >@@ -1338,10 +1335,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) > if (printedPluginBitmap) { > // Flip the bitmap before drawing because the QuickDraw port is flipped relative > // to this view. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > CGContextSaveGState(cgContext); > NSRect bounds = [self bounds]; > CGContextTranslateCTM(cgContext, 0.0f, NSHeight(bounds)); >diff --git a/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm b/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm >index 290fef63ad916aa618d30a21d9143e218ec90e85..1d3ba55666a8d6f536328051539b9f64dc9ed2b5 100644 >--- a/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm >+++ b/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm >@@ -654,21 +654,19 @@ static alertDidEndIMP original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_ > > static void WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(id object, SEL selector, NSAlert *alert, NSInteger returnCode, void* contextInfo) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[(TSUpdateCheck *)object delegate] autorelease]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(object, selector, alert, returnCode, contextInfo); > } > > static void WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(id object, SEL selector, NSWindow *window, id modalDelegate, SEL didEndSelector, void* contextInfo) > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (isKindOfClass(modalDelegate, @"TSUpdateCheck")) > [[(TSUpdateCheck *)modalDelegate delegate] retain]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(object, selector, window, modalDelegate, didEndSelector, contextInfo); > } >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm b/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm >index 7b1fbeaee10609bec9f3c2fe4d646699dd3d4af8..cbb408c46ca44518e5784e5e53d7ec3e58ce21a1 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm >@@ -113,15 +113,14 @@ void PopupMenuMac::populate() > [menuItem setEnabled:m_client->itemIsEnabled(i)]; > [menuItem setToolTip:m_client->itemToolTip(i)]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Allow the accessible text of the item to be overridden if necessary. > if (AXObjectCache::accessibilityEnabled()) { > NSString *accessibilityOverride = m_client->itemAccessibilityText(i); > if ([accessibilityOverride length]) > [menuItem accessibilitySetOverrideValue:accessibilityOverride forAttribute:NSAccessibilityDescriptionAttribute]; > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > } > >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h >index c8d33eb189a6f31d5ccbde18ed57b6fe54cff7d4..575a348fcb5e575025f38bb4b4817f59dd75ae4d 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h >@@ -50,14 +50,11 @@ public: > #endif > private: > #if PLATFORM(IOS) >-#pragma clang diagnostic push >-#if defined(__has_warning) && __has_warning("-Wunused-private-field") >-#pragma clang diagnostic ignored "-Wunused-private-field" >-#endif >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wunused-private-field") > #endif > WebView* m_webView; > #if PLATFORM(IOS) >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wunused-private-field") > #endif > #if USE(AUTOCORRECTION_PANEL) > CorrectionPanel m_correctionPanel; >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm >index a5924f47e0672ce6a544198814057a6f7d68dce2..060dc56d205cc27045ba72f3cd44db0e8c97070a 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm >@@ -133,10 +133,9 @@ void WebDragClient::startDrag(DragItem dragItem, DataTransfer& dataTransfer, Fra > ReportDiscardedDelegateException(selector, exception); > } > } else >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [topHTMLView dragImage:dragNSImage at:dragLocationInContentCoordinates offset:NSZeroSize event:event pasteboard:pasteboard source:sourceHTMLView slideBack:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > void WebDragClient::beginDrag(DragItem dragItem, Frame& frame, const IntPoint& mouseDownPosition, const IntPoint& mouseDraggedPosition, DataTransfer& dataTransfer, DragSourceAction dragSourceAction) >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm >index 86be6e4e3672b7d1be8e87e5645cd7bc06c5fe8f..cd9584b8f5d3326c75f09dde9d7eae3d3e2d6868 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm >@@ -308,10 +308,9 @@ void WebFrameLoaderClient::convertMainResourceLoadToDownload(DocumentLoader* doc > > if (!mainResourceLoader) { > // The resource has already been cached, or the conversion is being attmpted when not calling SubresourceLoader::didReceiveResponse(). >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > WebDownload *webDownload = [[WebDownload alloc] initWithRequest:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody) delegate:[webView downloadDelegate]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [webDownload autorelease]; > return; > } >@@ -2342,10 +2341,9 @@ static NSImage *webGetNSImage(Image* image, NSSize size) > if (!nsImage) > return nil; > if (!NSEqualSizes([nsImage size], size)) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [nsImage setScalesWhenResized:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [nsImage setSize:size]; > } > return nsImage; >diff --git a/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlight.mm b/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlight.mm >index 91b65bec94bf894f41654be94beda331d9eeed90..fd3b21185a80d781717f24591cad3a17670cf205 100644 >--- a/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlight.mm >+++ b/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlight.mm >@@ -266,10 +266,9 @@ using namespace WebCore; > ASSERT([_targetView window]); > > NSRect highlightWindowFrame = [_targetView convertRect:[_targetView visibleRect] toView:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > highlightWindowFrame.origin = [[_targetView window] convertBaseToScreen:highlightWindowFrame.origin]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return highlightWindowFrame; > } >diff --git a/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlightView.mm b/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlightView.mm >index e7cd5e462df268fad206dda512dd533353b19046..9d163506fcec91363a0ecc1c4f8b966301f85d05 100644 >--- a/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlightView.mm >+++ b/Source/WebKitLegacy/mac/WebInspector/WebNodeHighlightView.mm >@@ -98,10 +98,9 @@ using namespace WebCore; > > ASSERT([[NSGraphicsContext currentContext] isFlipped]); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > GraphicsContext context((PlatformGraphicsContext*)[[NSGraphicsContext currentContext] graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [_webNodeHighlight inspectorController]->drawHighlight(context); > [NSGraphicsContext restoreGraphicsState]; > } >diff --git a/Source/WebKitLegacy/mac/WebView/WebClipView.mm b/Source/WebKitLegacy/mac/WebView/WebClipView.mm >index 5fd5c142702b186ea9407f38fc0e3c936b47b46a..48794ad4e81563645c238a2802ffd5e671e4d724 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebClipView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebClipView.mm >@@ -66,8 +66,7 @@ using namespace WebCore; > if (!self) > return nil; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // In WebHTMLView, we set a clip. This is not typical to do in an > // NSView, and while correct for any one invocation of drawRect:, > // it causes some bad problems if that clip is cached between calls. >@@ -78,7 +77,7 @@ using namespace WebCore; > // See these bugs for more information: > // <rdar://problem/3409315>: REGRESSSION (7B58-7B60)?: Safari draws blank frames on macosx.apple.com perf page > [self releaseGState]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return self; > } >diff --git a/Source/WebKitLegacy/mac/WebView/WebFrame.mm b/Source/WebKitLegacy/mac/WebView/WebFrame.mm >index 4f007d03a0ae5d049871fe4438d3ddac650b2603..dabdf79b389702edfbbe44d8dc22c14f02625fb7 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebFrame.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebFrame.mm >@@ -443,10 +443,9 @@ static NSURL *createUniqueWebDataURL(); > if (FrameView* view = frame->view()) { > view->setTransparent(!drawsBackground); > #if !PLATFORM(IOS) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > Color color = colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #else > Color color = Color(backgroundColor); > #endif >@@ -622,10 +621,9 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) > #if !PLATFORM(IOS) > ASSERT([[NSGraphicsContext currentContext] isFlipped]); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef ctx = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #else > CGContextRef ctx = WKGetCurrentGraphicsContext(); > #endif >@@ -2207,10 +2205,9 @@ static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType) > if (!AXObjectCache::accessibilityEnabled()) { > AXObjectCache::enableAccessibility(); > #if !PLATFORM(IOS) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > AXObjectCache::setEnhancedUserInterfaceAccessibility([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #endif > } > >diff --git a/Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm b/Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm >index 753dceb28d30e6a90f4017d9f01e3d4edfff1539..616fd16e0d47856fd7b4ce92287ea70d9f918679 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm >@@ -207,11 +207,10 @@ static NSRect convertRectToScreen(NSWindow *window, NSRect rect) > RetainPtr<CGImageRef> webViewContents = adoptCF(CGWindowListCreateImage(NSRectToCGRect(webViewFrame), kCGWindowListOptionIncludingWindow, windowID, kCGWindowImageShouldBeOpaque)); > > // Screen updates to be re-enabled in beganEnterFullScreenWithInitialFrame:finalFrame: >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSDisableScreenUpdates(); > [[self window] setAutodisplay:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > NSResponder *webWindowFirstResponder = [[_webView window] firstResponder]; > [[self window] setFrame:screenFrame display:NO]; >@@ -268,11 +267,10 @@ static void setClipRectForWindow(NSWindow *window, NSRect clipRect) > _isEnteringFullScreen = NO; > > if (completed) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled at the end of this block > NSDisableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [self _document]->setAnimatingFullScreen(false); > [self _document]->webkitDidEnterFullScreenForElement(_element.get()); > >@@ -294,10 +292,9 @@ static void setClipRectForWindow(NSWindow *window, NSRect clipRect) > > [_backgroundWindow.get() orderOut:self]; > [_backgroundWindow.get() setFrame:NSZeroRect display:YES]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } else > [_scaleAnimation.get() stopAnimation]; > } >@@ -315,12 +312,11 @@ static void setClipRectForWindow(NSWindow *window, NSRect clipRect) > return; > _isFullScreen = NO; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled in beganExitFullScreenWithInitialFrame:finalFrame: > NSDisableScreenUpdates(); > [[self window] setAutodisplay:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > _finalFrame = screenRectOfContents(_element.get()); > >@@ -360,11 +356,10 @@ static void setClipRectForWindow(NSWindow *window, NSRect clipRect) > > [self _updateMenuAndDockForFullScreen]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates to be re-enabled at the end of this function > NSDisableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [self _document]->setAnimatingFullScreen(false); > [self _document]->webkitDidExitFullScreenForElement(_element.get()); >@@ -391,10 +386,9 @@ static void setClipRectForWindow(NSWindow *window, NSRect clipRect) > > [[_webView window] makeKeyAndOrderFront:self]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)performClose:(id)sender >@@ -513,10 +507,9 @@ static NSRect windowFrameFromApparentFrames(NSRect screenFrame, NSRect initialFr > > // setClipRectForWindow takes window coordinates, so convert from screen coordinates here: > NSRect finalBounds = _finalFrame; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > finalBounds.origin = [[self window] convertScreenToBase:finalBounds.origin]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > setClipRectForWindow(self.window, finalBounds); > > [[self window] makeKeyAndOrderFront:self]; >@@ -543,16 +536,14 @@ static NSRect windowFrameFromApparentFrames(NSRect screenFrame, NSRect initialFr > > [_backgroundWindow.get() orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [[self window] displayIfNeeded]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates disabled in enterFullScreen: > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_startExitFullScreenAnimationWithDuration:(NSTimeInterval)duration >@@ -591,23 +582,20 @@ static NSRect windowFrameFromApparentFrames(NSRect screenFrame, NSRect initialFr > > // setClipRectForWindow takes window coordinates, so convert from screen coordinates here: > NSRect finalBounds = _finalFrame; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > finalBounds.origin = [[self window] convertScreenToBase:finalBounds.origin]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > setClipRectForWindow(self.window, finalBounds); > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [[self window] displayIfNeeded]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Screen updates disabled in exitFullScreen: > NSEnableScreenUpdates(); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > @end >diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >index 6a7b140bd85d3f13de41c6dbfe52a3c448d45253..6b4507d601daa701c039f78969bd997444cb83ff 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >@@ -624,10 +624,9 @@ static std::optional<NSInteger> toTag(ContextMenuAction action) > > - (NSView *)_web_borderView > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > return _borderView; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > @end >@@ -1494,10 +1493,9 @@ static NSControlStateValue kit(TriState state) > { > NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSEventTypeMouseMoved > location:[[self window] >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > convertScreenToBase:[NSEvent mouseLocation]] >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > modifierFlags:[[NSApp currentEvent] modifierFlags] > timestamp:[NSDate timeIntervalSinceReferenceDate] > windowNumber:[[self window] windowNumber] >@@ -1538,19 +1536,17 @@ static NSControlStateValue kit(TriState state) > #if PLATFORM(MAC) > ASSERT(!_private->subviewsSetAside); > ASSERT(_private->savedSubviews == nil); >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > _private->savedSubviews = _subviews; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > // We need to keep the layer-hosting view in the subviews, otherwise the layers flash. > if (_private->layerHostingView) { > NSArray* newSubviews = [[NSArray alloc] initWithObjects:_private->layerHostingView, nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > _subviews = newSubviews; > } else > _subviews = nil; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > _private->subviewsSetAside = YES; > #endif > } >@@ -1560,14 +1556,13 @@ static NSControlStateValue kit(TriState state) > #if PLATFORM(MAC) > ASSERT(_private->subviewsSetAside); > if (_private->layerHostingView) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [_subviews release]; > _subviews = _private->savedSubviews; > } else { > ASSERT(_subviews == nil); > _subviews = _private->savedSubviews; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > _private->savedSubviews = nil; > _private->subviewsSetAside = NO; >@@ -2110,10 +2105,9 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event) > > NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDragged > location:[[self window] >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > convertScreenToBase:[NSEvent mouseLocation]] >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > modifierFlags:[[NSApp currentEvent] modifierFlags] > timestamp:[NSDate timeIntervalSinceReferenceDate] > windowNumber:[[self window] windowNumber] >@@ -3982,10 +3976,9 @@ static BOOL currentScrollIsBlit(NSView *clipView) > #if PLATFORM(MAC) > // Only do the synchronization dance if we're drawing into the window, otherwise > // we risk disabling screen updates when no flush is pending. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if ([NSGraphicsContext currentContext] == [[self window] graphicsContext] && [webView _needsOneShotDrawingSynchronization]) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > // Disable screen updates to minimize the chances of the race between the CA > // display link and AppKit drawing causing flashes. > [[self window] disableScreenUpdatesUntilFlush]; >@@ -4217,12 +4210,11 @@ static BOOL currentScrollIsBlit(NSView *clipView) > if (Frame* coreframe = core([self _frame])) > coreframe->eventHandler().mouseDown(event); > #else >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSInputManager *currentInputManager = [NSInputManager currentInputManager]; > > if (![currentInputManager wantsToHandleMouseEvents] || ![currentInputManager handleMouseEvent:event]) { >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [_private->completionController endRevertingChange:NO moveLeft:NO]; > > // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here. >@@ -4277,12 +4269,11 @@ static BOOL currentScrollIsBlit(NSView *clipView) > // the current event prevents that from causing a problem inside WebKit or AppKit code. > [[event retain] autorelease]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSInputManager *currentInputManager = [NSInputManager currentInputManager]; > if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event]) > return; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [self retain]; > >@@ -4447,12 +4438,11 @@ static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension > [self _setMouseDownEvent:nil]; > > #if PLATFORM(MAC) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSInputManager *currentInputManager = [NSInputManager currentInputManager]; > if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event]) > return; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > #endif > > [self retain]; >@@ -4804,10 +4794,9 @@ static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > - (void)_endPrintModeAndRestoreWindowAutodisplay > { > [self _endPrintMode]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:YES]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > - (void)_delayedEndPrintMode:(NSPrintOperation *)initiatingOperation >@@ -4842,10 +4831,9 @@ static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > // Must do this explicit display here, because otherwise the view might redisplay while the print > // sheet was up, using printer fonts (and looking different). > [self displayIfNeeded]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [[self window] setAutodisplay:NO]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [[self _webView] _adjustPrintingMarginsForHeaderAndFooter]; > NSPrintOperation *printOperation = [NSPrintOperation currentOperation]; >@@ -5033,10 +5021,9 @@ static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > #if PLATFORM(IOS) > return [accTree accessibilityHitTest:point]; > #else >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPoint windowCoord = [[self window] convertScreenToBase:point]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > return [accTree accessibilityHitTest:[self convertPoint:windowCoord fromView:nil]]; > #endif > } >@@ -5074,10 +5061,9 @@ static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > > - (NSDictionary *)_fontAttributesFromFontPasteboard > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPasteboard *fontPasteboard = [NSPasteboard pasteboardWithName:NSFontPboard]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (fontPasteboard == nil) > return nil; > NSData *data = [fontPasteboard dataForType:legacyFontPasteboardType()]; >@@ -5101,10 +5087,9 @@ static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > > - (NSString *)_colorAsString:(NSColor *)color > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSColor *rgbColor = [color colorUsingColorSpaceName:NSDeviceRGBColorSpace]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > // FIXME: If color is non-nil and rgbColor is nil, that means we got some kind > // of fancy color that can't be converted to RGB. Changing that to "transparent" > // might not be great, but it's probably OK. >@@ -5281,10 +5266,9 @@ static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > > // Put RTF with font attributes on the pasteboard. > // Maybe later we should add a pasteboard type that contains CSS text for "native" copy and paste font. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSPasteboard *fontPasteboard = [NSPasteboard pasteboardWithName:NSFontPboard]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [fontPasteboard declareTypes:[NSArray arrayWithObject:legacyFontPasteboardType()] owner:nil]; > [fontPasteboard setData:[self _selectionStartFontAttributesAsRTF] forType:legacyFontPasteboardType()]; > } >@@ -6120,15 +6104,14 @@ static BOOL writingDirectionKeyBindingsEnabled() > const Vector<KeypressCommand>& commands = parameters->event->keypressCommands(); > > for (size_t i = 0; i < commands.size(); ++i) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (commands[i].commandName == "insertText:") > [self insertText:commands[i].text]; > else if (commands[i].commandName == "noop:") > ; // Do nothing. This case can be removed once <rdar://problem/9025012> is fixed. > else > [self doCommandBySelector:NSSelectorFromString(commands[i].commandName)]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > parameters->event->keypressCommands().clear(); > parameters->shouldSaveCommands = wasSavingCommands; >@@ -6324,10 +6307,9 @@ static BOOL writingDirectionKeyBindingsEnabled() > // If we are in a layer-backed view, we need to manually initialize the geometry for our layer. > [viewLayer setBounds:NSRectToCGRect([_private->layerHostingView bounds])]; > [viewLayer setAnchorPoint:CGPointMake(0, [self isFlipped] ? 1 : 0)]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGPoint layerPosition = NSPointToCGPoint([self convertPointToBase:[_private->layerHostingView frame].origin]); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [viewLayer setPosition:layerPosition]; > } > >@@ -6457,10 +6439,9 @@ static BOOL writingDirectionKeyBindingsEnabled() > LOG(TextInput, "textStorage -> nil"); > return nil; > } >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > NSAttributedString *result = [self attributedSubstringFromRange:NSMakeRange(0, UINT_MAX)]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > LOG(TextInput, "textStorage -> \"%@\"", result ? [result string] : @""); > >@@ -6939,15 +6920,14 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde > > unsigned start; > unsigned end; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (coreFrame->editor().getCompositionSelection(start, end)) > [[NSInputManager currentInputManager] markedTextSelectionChanged:NSMakeRange(start, end - start) client:self]; > else { > coreFrame->editor().cancelComposition(); > [[NSInputManager currentInputManager] markedTextAbandoned:self]; > } >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > } > > #endif >diff --git a/Source/WebKitLegacy/mac/WebView/WebPDFView.mm b/Source/WebKitLegacy/mac/WebView/WebPDFView.mm >index 24dac9e3a8fb8934a64d19cb1cd31ab91cb7fd85..f7219f36bb19adecd1559aeb9c87ba319de0f939 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPDFView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPDFView.mm >@@ -126,10 +126,9 @@ static void _applicationInfoForMIMEType(NSString *type, NSString **name, NSImage > { > CFURLRef appURL = nullptr; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > OSStatus error = LSCopyApplicationForMIMEType((__bridge CFStringRef)type, kLSRolesAll, &appURL); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > if (error != noErr) > return; > >@@ -226,10 +225,9 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec > - (void)centerSelectionInVisibleArea:(id)sender > { > // FIXME: Get rid of this once <rdar://problem/25149294> has been fixed. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >+ IGNORE_WARNING_CLANG("-Wnonnull"); > [PDFSubview scrollSelectionToVisible:nil]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wnonnull"); > } > > - (void)scrollPageDown:(id)sender >@@ -370,10 +368,9 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec > > - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > bool allowsSmoothing = CGContextGetAllowsFontSmoothing(context); > bool allowsSubpixelQuantization = CGContextGetAllowsFontSubpixelQuantization(context); >@@ -386,10 +383,9 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec > > - (void)_recursiveDisplayAllDirtyWithLockFocus:(BOOL)needsLockFocus visRect:(NSRect)visRect > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > bool allowsSmoothing = CGContextGetAllowsFontSmoothing(context); > bool allowsSubpixelQuantization = CGContextGetAllowsFontSubpixelQuantization(context); >@@ -402,10 +398,9 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec > > - (void)_recursive:(BOOL)recurse displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)graphicsContext topView:(BOOL)topView > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > CGContextRef context = (CGContextRef)[graphicsContext graphicsPort]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > bool allowsSmoothing = CGContextGetAllowsFontSmoothing(context); > bool allowsSubpixelQuantization = CGContextGetAllowsFontSubpixelQuantization(context); >@@ -669,10 +664,9 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec > [PDFSubview setCurrentSelection:selection]; > > // FIXME: Get rid of this once <rdar://problem/25149294> has been fixed. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >+ IGNORE_WARNING_CLANG("-Wnonnull"); > [PDFSubview scrollSelectionToVisible:nil]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wnonnull"); > return YES; > } > >diff --git a/Source/WebKitLegacy/mac/WebView/WebTextCompletionController.mm b/Source/WebKitLegacy/mac/WebView/WebTextCompletionController.mm >index c6f0e7345f5ee82b71bc1c4aba26c40e21ff03a6..a5bfea68341710560afc252f6924b4d754c147d1 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebTextCompletionController.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebTextCompletionController.mm >@@ -84,10 +84,9 @@ using namespace WebCore; > { > NSRect scrollFrame = NSMakeRect(0, 0, 100, 100); > NSRect tableFrame = NSZeroRect; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > tableFrame.size = [NSScrollView contentSizeForFrameSize:scrollFrame.size hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > NSTableColumn *column = [[NSTableColumn alloc] init]; > [column setWidth:tableFrame.size.width]; > [column setEditable:NO]; >@@ -133,10 +132,9 @@ using namespace WebCore; > > NSRect windowFrame; > NSPoint wordStart = topLeft; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > windowFrame.origin = [[_view window] convertBaseToScreen:[_htmlView convertPoint:wordStart toView:nil]]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > windowFrame.size.height = numberToShow * [_tableView rowHeight] + (numberToShow + 1) * [_tableView intercellSpacing].height; > windowFrame.origin.y -= windowFrame.size.height; > NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:12.0f], NSFontAttributeName, nil]; >@@ -151,10 +149,9 @@ using namespace WebCore; > } > windowFrame.size.width = 100; > if (maxIndex >= 0) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > maxWidth = ceilf([NSScrollView frameSizeForContentSize:NSMakeSize(maxWidth, 100.0f) hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder].width); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > maxWidth = ceilf([NSWindow frameRectForContentRect:NSMakeRect(0.0f, 0.0f, maxWidth, 100.0f) styleMask:NSWindowStyleMaskBorderless].size.width); > maxWidth += 5.0f; > windowFrame.size.width = std::max(maxWidth, windowFrame.size.width); >diff --git a/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm b/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm >index ab43887d1744d753d5003a22e04f427514a1be66..4479453e8bf64866450d71328c15957aa9bb5272 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm >@@ -38,8 +38,7 @@ > #import <wtf/RetainPtr.h> > #import <wtf/SoftLinking.h> > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+IGNORE_WARNING_CLANG_TOP_LEVEL("-Wdeprecated-declarations") > > SOFT_LINK_FRAMEWORK(AVFoundation) > SOFT_LINK_CLASS(AVFoundation, AVPlayerLayer) >@@ -509,6 +508,6 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level) > > @end > >-#pragma clang diagnostic pop >+IGNORE_WARNING_CLANG_TOP_LEVEL_END("-Wdeprecated-declarations") > > #endif >diff --git a/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenHUDWindowController.mm >index e7be86d374e450eee70091c5e32d93b315a5cf39..754f9deddd8104f9c9b5bddb518f969f4bd25104 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenHUDWindowController.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebVideoFullscreenHUDWindowController.mm >@@ -373,10 +373,9 @@ static NSView *createMediaUIBackgroundView() > const CGFloat quickTimePlayerHUDHeight = 59; > const CGFloat quickTimePlayerHUDContentBorderPosition = 38; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > [view setContentBorderPosition:quickTimePlayerHUDContentBorderPosition / quickTimePlayerHUDHeight]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > return view; > } >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index b892734caff365dd78549d87ec0a0394976b6666..6c22d8ee4b94e960145cd27296d7afda1e14fd4a 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -865,15 +865,14 @@ static const NSUInteger orderedListSegment = 2; > [insertListControl setWidth:listControlSegmentWidth forSegment:orderedListSegment]; > insertListControl.font = [NSFont systemFontOfSize:15]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > id segmentElement = NSAccessibilityUnignoredDescendant(insertListControl); > NSArray *segments = [segmentElement accessibilityAttributeValue:NSAccessibilityChildrenAttribute]; > ASSERT(segments.count == 3); > [segments[noListSegment] accessibilitySetOverrideValue:WebCore::insertListTypeNone() forAttribute:NSAccessibilityDescriptionAttribute]; > [segments[unorderedListSegment] accessibilitySetOverrideValue:WebCore::insertListTypeBulletedAccessibilityTitle() forAttribute:NSAccessibilityDescriptionAttribute]; > [segments[orderedListSegment] accessibilitySetOverrideValue:WebCore::insertListTypeNumberedAccessibilityTitle() forAttribute:NSAccessibilityDescriptionAttribute]; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > self.view = insertListControl; > >@@ -2178,11 +2177,10 @@ static NSMutableSet *knownPluginMIMETypes() > return; > } > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (!OSAtomicCompareAndSwap32(0, 1, &_private->didDrawTiles)) > return; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > WebThreadLock(); > >@@ -5892,21 +5890,19 @@ static bool needsWebViewInitThreadWorkaround() > > - (void)encodeWithCoder:(NSCoder *)encoder > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Set asside the subviews before we archive. We don't want to archive any subviews. > // The subviews will always be created in _commonInitializationFrameName:groupName:. > id originalSubviews = _subviews; > _subviews = nil; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > [super encodeWithCoder:encoder]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > // Restore the subviews we set aside. > _subviews = originalSubviews; >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > > BOOL useBackForwardList = _private->page && static_cast<BackForwardList*>(_private->page->backForward().client())->enabled(); > if ([encoder allowsKeyedCoding]) { >@@ -7137,10 +7133,9 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0) > if (auto *icon = _private->_mainFrameIcon.get()) > return icon; > >-#pragma GCC diagnostic push >-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_GCC("-Wdeprecated-declarations"); > return [[WebIconDatabase sharedIconDatabase] defaultIconWithSize:WebIconSmallSize]; >-#pragma GCC diagnostic pop >+ IGNORE_WARNING_GCC_END("-Wdeprecated-declarations"); > } > > - (void)_setMainFrameIcon:(NSImage *)icon >@@ -9308,10 +9303,9 @@ bool LayerFlushController::flushLayers() > // AppKit may have disabled screen updates, thinking an upcoming window flush will re-enable them. > // In case setNeedsDisplayInRect() has prevented the window from needing to be flushed, re-enable screen > // updates here. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ IGNORE_WARNING_CLANG("-Wdeprecated-declarations"); > if (![window isFlushWindowDisabled]) >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wdeprecated-declarations"); > [window _enableScreenUpdatesIfNeeded]; > #endif > >diff --git a/Source/WebKitLegacy/mac/WebView/WebWindowAnimation.mm b/Source/WebKitLegacy/mac/WebView/WebWindowAnimation.mm >index 92358f6b7de3aba964eeaf17425f271b95aa8609..52dfca20a8ffe1cb90561365037c7ed6d497d749 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebWindowAnimation.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebWindowAnimation.mm >@@ -125,10 +125,9 @@ static CGSConnectionID mainWindowServerConnectionID() > static void setScaledFrameForWindow(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame) > { > if (NSEqualRects(scaleFrame, nonScaledFrame)) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >+ IGNORE_WARNING_CLANG("-Wnonnull"); > CGSSetWindowWarp(mainWindowServerConnectionID(), window.windowNumber, 0, 0, nullptr); >-#pragma clang diagnostic pop >+ IGNORE_WARNING_CLANG_END("-Wnonnull"); > return; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188996
:
348180
|
348296
|
348297
|
348780
|
348808
|
348811
|
348812
|
349427
|
349540