WebKit Bugzilla
Attachment 357405 Details for
Bug 192743
: Use warning-ignoring macros more consistently and simply
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192743-20181215134512.patch (text/plain), 35.47 KB, created by
Darin Adler
on 2018-12-15 13:45:13 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-12-15 13:45:13 PST
Size:
35.47 KB
patch
obsolete
>Subversion Revision: 239252 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index a70463f46e3ced863f75393c2b2400eb1ea59850..5be07de9b7ba3cbdd39f38856ce28085bc995107 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * dfg/DFGSpeculativeJIT64.cpp: Use IGNORE_WARNINGS_BEGIN/END instead of >+ IGNORE_CLANG_WARNINGS_BEGIN/END. Other callsites are using the non-clang-specific >+ one for this warning, "implicit-fallthrough", and it seems there is no special >+ need to use the clang-specific one here. >+ * llint/LLIntData.cpp: Ditto, but here it's "missing-noreturn"." >+ * tools/CodeProfiling.cpp: Ditto. >+ > 2018-12-14 Darin Adler <darin@apple.com> > > LiteralParser has a bunch of uses of String::format with untrusted data >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 96bdb908771bef046154a82033a4d84a3b6d9395..0f9a9855448cc1f970b85e62378fb568ef6c6289 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Assertions.h: Use IGNORE_WARNINGS_BEGIN rather than >+ IGNORE_CLANG_WARNINGS_BEGIN since we don't need special handling for >+ non-clang compilers, in part since the code is already inside >+ #if COMPILER(CLANG), but also because it would be harmless to ignore this >+ warning on non-clang; we should almost never use IGNORE_CLANG_WARNINGS_BEGIN. >+ > 2018-12-14 Darin Adler <darin@apple.com> > > Verify size is valid in USE_SYSTEM_MALLOC version of tryAllocateZeroedVirtualPages >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f83f35a05afa6163b2ea4de11dade227b1fd6a50..af10db7f22d45ca9c81f4a9fef876a7081a881c5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,47 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * bridge/objc/WebScriptObject.mm: Use IGNORE_WARNINGS_BEGIN rather than >+ IGNORE_CLANG_WARNINGS_BEGIN here. There is no need to compile Objective-C++ >+ files like this one with non-clang compilers, and no need to worry about >+ them when choosing the macro. >+ >+ * crypto/mac/CryptoKeyRSAMac.cpp: >+ (WebCore::getPublicKeyComponents): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END. >+ >+ * css/makeprop.pl: Use IGNORE_WARNINGS_BEGIN/END, obviating the need for >+ the "unknown-pragmas" trick, which the macro should take care of. >+ * css/makevalues.pl: Ditto. >+ * platform/ColorData.gperf: Ditto. >+ >+ * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: >+ (WebCore::CDMSessionAVStreamSession::update): Use IGNORE_WARNINGS_BEGIN/END >+ (see rationale above for Objective-C++). >+ >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics): Use >+ ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END. >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: >+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics): Ditto. >+ >+ * platform/ios/DragImageIOS.mm: Use IGNORE_WARNINGS_BEGIN/END >+ (see rationale above for Objective-C++). >+ >+ * platform/ios/VideoFullscreenInterfaceAVKit.mm: >+ (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]): >+ Use ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END. >+ >+ * platform/mac/WebPlaybackControlsManager.mm: Use IGNORE_WARNINGS_BEGIN/END >+ (see rationale above for Objective-C++). >+ >+ * platform/network/cocoa/ResourceResponseCocoa.mm: >+ (WebCore::ResourceResponse::platformCertificateInfo const): Use >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END. >+ > 2018-12-15 Youenn Fablet <youenn@apple.com> > > Make RTCRtpSender.setParameters to activate specific encodings >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 53e50089fc5212ddbd1abb2a9613290886bce4d0..951ff3125dd2816d81c86928adbb92532f6265a5 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,14 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * pal/spi/cocoa/AVKitSPI.h: Use IGNORE_WARNINGS_BEGIN instead of >+ IGNORE_CLANG_WARNINGS_BEGIN; there is no special need to accomodate >+ non-clang compilers here. >+ > 2018-12-11 Justin Michaud <justin_michaud@apple.com> > > Implement feature flag for CSS Typed OM >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e888d8b0b2393c8f6493b158bcea84f5b5619353..c90a038e00ea5ec3975cf4d936ea9790fc92dc51 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/ios/WKDrawingView.mm: >+ (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]): >+ Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END. >+ * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: >+ (-[WKFullScreenWindowController _EVOrganizationName]): Ditto. >+ >+ * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Use >+ IGNORE_WARNINGS_BEGIN/END instead of IGNORE_CLANG_WARNINGS_BEGIN/END >+ because there is no need to accomodate non-clang compilers here. >+ Also use #pragma once, add a missing "explicit", and fix conditionals. >+ > 2018-12-14 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, fix the build with recent SDKs. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 3570259861438dfaf540882c263c9945b1099ea6..fb5e2854583ddd2123af36eeab4accafd95aacc2 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,19 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DOM/DOM.mm: Use IGNORE_WARNINGS_BEGIN/END instead of >+ IGNORE_CLANG_WARNINGS_BEGIN since there is no need to accomodate non-clang >+ compilers in Objective-C++ code. >+ >+ * WebCoreSupport/WebAlternativeTextClient.h: Use IGNORE_WARNINGS_BEGIN/END >+ instead of IGNORE_CLANG_WARNINGS_BEGIN/END because there is no need to >+ accomodate non-clang compilers here. Also use #pragma once, add a missing >+ "explicit" and fix conditionals. >+ > 2018-12-12 Ryosuke Niwa <rniwa@webkit.org> > > Make TextInputController.legacyAttributedString take DOM nodes and offsets >diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp >index 6f5a87c0e0327b0a792c5db5a23ee6eda14c6956..18ae7d81ba92ae1dbd4c852eb084f9778f66d0fb 100644 >--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp >+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp >@@ -876,7 +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 >-IGNORE_CLANG_WARNINGS_BEGIN("implicit-fallthrough") >+IGNORE_WARNINGS_BEGIN("implicit-fallthrough") > template<bool strict> > GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnFormat) > { >@@ -1007,7 +1007,7 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF > return InvalidGPRReg; > } > } >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > GPRReg SpeculativeJIT::fillSpeculateInt32(Edge edge, DataFormat& returnFormat) > { >diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp >index fa9a7ed42aaf1ae383ea55a43b1acfca7b5b60c7..58f18e47594e7684493479ed3b2121382291fc92 100644 >--- a/Source/JavaScriptCore/llint/LLIntData.cpp >+++ b/Source/JavaScriptCore/llint/LLIntData.cpp >@@ -74,7 +74,7 @@ void initialize() > #endif // ENABLE(C_LOOP) > } > >-IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn") >+IGNORE_WARNINGS_BEGIN("missing-noreturn") > void Data::performAssertions(VM& vm) > { > UNUSED_PARAM(vm); >@@ -184,6 +184,6 @@ void Data::performAssertions(VM& vm) > STATIC_ASSERT(ArithProfile::observedBinaryIntNumber().rhsObservedType().isOnlyNumber()); > } > } >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > } } // namespace JSC::LLInt >diff --git a/Source/JavaScriptCore/tools/CodeProfiling.cpp b/Source/JavaScriptCore/tools/CodeProfiling.cpp >index e44dc343be7a386e35ec5e09eaabdeaa677d43c3..94ebe8e2ca7e189f8f6d8d5f64d90f9d061c97df 100644 >--- a/Source/JavaScriptCore/tools/CodeProfiling.cpp >+++ b/Source/JavaScriptCore/tools/CodeProfiling.cpp >@@ -44,7 +44,7 @@ volatile CodeProfile* CodeProfiling::s_profileStack = 0; > CodeProfiling::Mode CodeProfiling::s_mode = CodeProfiling::Disabled; > WTF::MetaAllocatorTracker* CodeProfiling::s_tracker = 0; > >-IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn") >+IGNORE_WARNINGS_BEGIN("missing-noreturn") > > #if HAVE(MACHINE_CONTEXT) > // Helper function to start & stop the timer. >@@ -60,7 +60,7 @@ static void setProfileTimer(unsigned usec) > } > #endif > >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > #if HAVE(MACHINE_CONTEXT) > static void profilingTimer(int, siginfo_t*, void* uap) >diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h >index f193996f002f41fd6aa38c5ba2e147cf50c8dce8..650e76541e6e5dd5a082f0da99d54a2f197983f8 100644 >--- a/Source/WTF/wtf/Assertions.h >+++ b/Source/WTF/wtf/Assertions.h >@@ -610,14 +610,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. >-IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn") >+IGNORE_WARNINGS_BEGIN("missing-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(); > } >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > #else > #define UNREACHABLE_FOR_PLATFORM() RELEASE_ASSERT_NOT_REACHED() > #endif >diff --git a/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h >index 58c4c5640c4a42150e883ed9272b5df3d231d9ca..426e01d8592deaa62cf2a1e49c4b9e956ed4ed5b 100644 >--- a/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h >+++ b/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h >@@ -38,9 +38,9 @@ > #endif > > #import <AVKit/AVPlayerController.h> >-IGNORE_CLANG_WARNINGS_BEGIN("objc-property-no-attribute") >+IGNORE_WARNINGS_BEGIN("objc-property-no-attribute") > #import <AVKit/AVPlayerLayerView.h> >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > #import <AVKit/AVPlayerViewController_Private.h> > #import <AVKit/AVPlayerViewController_WebKitOnly.h> > >diff --git a/Source/WebCore/bridge/objc/WebScriptObject.mm b/Source/WebCore/bridge/objc/WebScriptObject.mm >index 18d013ceff2812bb959bc94f5cbcc3193424e541..8434cd4d65f0f6cf77809ac879e67f75ba24a03b 100644 >--- a/Source/WebCore/bridge/objc/WebScriptObject.mm >+++ b/Source/WebCore/bridge/objc/WebScriptObject.mm >@@ -702,12 +702,12 @@ - (id)autorelease > return self; > } > >-IGNORE_CLANG_WARNINGS_BEGIN("objc-missing-super-calls") >+IGNORE_WARNINGS_BEGIN("objc-missing-super-calls") > - (void)dealloc > { > return; > } >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > + (WebUndefined *)undefined > { >diff --git a/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp b/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp >index 142f43992b9189607e76ac508912f092b14af016..e36fa76d2e83d2faf9595dffb7dd6a44b1b89544 100644 >--- a/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp >+++ b/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp >@@ -62,10 +62,9 @@ static CCCryptorStatus getPublicKeyComponents(CCRSACryptorRef rsaKey, Vector<uin > { > ASSERT(CCRSAGetKeyType(rsaKey) == ccRSAKeyPublic || CCRSAGetKeyType(rsaKey) == ccRSAKeyPrivate); > bool keyIsPublic = CCRSAGetKeyType(rsaKey) == ccRSAKeyPublic; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > CCRSACryptorRef publicKey = keyIsPublic ? rsaKey : CCRSACryptorGetPublicKeyFromPrivateKey(rsaKey); >-#pragma clang diagnostic pop >+ ALLOW_DEPRECATED_DECLARATIONS_END > > modulus.resize(16384); > size_t modulusLength = modulus.size(); >diff --git a/Source/WebCore/css/makeprop.pl b/Source/WebCore/css/makeprop.pl >index c05944cdaaae6dbdc777814867a055441cf6c654..e4cb4758bea81fe1b0902dd2fe91e20356142f06 100755 >--- a/Source/WebCore/css/makeprop.pl >+++ b/Source/WebCore/css/makeprop.pl >@@ -248,11 +248,7 @@ print GPERF << "EOF"; > #include <wtf/text/WTFString.h> > #include <string.h> > >-#if defined(__clang__) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored \"-Wunknown-pragmas\" >-#pragma clang diagnostic ignored \"-Wimplicit-fallthrough\" >-#endif >+IGNORE_WARNINGS_BEGIN(\"implicit-fallthrough\") > > // Older versions of gperf like to use the `register` keyword. > #define register >@@ -421,9 +417,7 @@ print GPERF << "EOF"; > > } // namespace WebCore > >-#if defined(__clang__) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNINGS_END > EOF > > close GPERF; >diff --git a/Source/WebCore/css/makevalues.pl b/Source/WebCore/css/makevalues.pl >index 6fc684c348297e60c1759cfc1d311cd8db05bd52..d1e8090d81d6e8c1c6fd8872f0d16b278e6c2217 100755 >--- a/Source/WebCore/css/makevalues.pl >+++ b/Source/WebCore/css/makevalues.pl >@@ -78,11 +78,7 @@ print GPERF << "EOF"; > #include <wtf/text/WTFString.h> > #include <string.h> > >-#if defined(__clang__) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored \"-Wunknown-pragmas\" >-#pragma clang diagnostic ignored \"-Wimplicit-fallthrough\" >-#endif >+IGNORE_WARNINGS_BEGIN(\"implicit-fallthrough\") > > // Older versions of gperf like to use the `register` keyword. > #define register >@@ -155,9 +151,7 @@ String getValueNameString(CSSValueID id) > > } // namespace WebCore > >-#if defined(__clang__) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNINGS_END > EOF > close GPERF; > >diff --git a/Source/WebCore/platform/ColorData.gperf b/Source/WebCore/platform/ColorData.gperf >index 0ac28d3ba9c2f271ee197657151b582867fec43d..5af79c21832541b835b3a1af9bdbd3603f40744c 100644 >--- a/Source/WebCore/platform/ColorData.gperf >+++ b/Source/WebCore/platform/ColorData.gperf >@@ -2,11 +2,7 @@ > #include "HashTools.h" > #include <string.h> > >-#if defined(__clang__) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wimplicit-fallthrough" >-#endif >+IGNORE_WARNINGS_BEGIN("implicit-fallthrough") > > // Older versions of gperf like to use the `register` keyword. > #define register >@@ -184,6 +180,4 @@ const struct NamedColor* findColor(const char* str, unsigned int len) > > } // namespace WebCore > >-#if defined(__clang__) >-#pragma clang diagnostic pop >-#endif >+IGNORE_WARNINGS_END >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >index e00f94db777068b39d15585086d1d930ee9eea8f..99294315d86241b168f28aa72edde0d97cf4a78c 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >@@ -198,11 +198,11 @@ bool CDMSessionAVStreamSession::update(Uint8Array* key, RefPtr<Uint8Array>& next > > RetainPtr<NSData> certificateData = adoptNS([[NSData alloc] initWithBytes:m_certificate->data() length:m_certificate->length()]); > >- IGNORE_CLANG_WARNINGS_BEGIN("objc-literal-conversion") >+ IGNORE_WARNINGS_BEGIN("objc-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]]; >- IGNORE_CLANG_WARNINGS_END >+ IGNORE_WARNINGS_END > m_expiredSession = nullptr; > return true; > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index eee35e14a9384f5f335ea1952402f600fcef9ef0..d05785cae3616dffbe9939e03da5193c6914954f 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -3272,9 +3272,8 @@ std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateAVFoundationObjC::v > #if PLATFORM(WATCHOS) > return std::nullopt; > #else >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN >+ > auto metrics = [m_videoLayer videoPerformanceMetrics]; > if (!metrics) > return std::nullopt; >@@ -3290,7 +3289,8 @@ std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateAVFoundationObjC::v > [metrics totalFrameDelay], > displayCompositedFrames, > }; >-#pragma clang diagnostic pop >+ >+ ALLOW_NEW_API_WITHOUT_GUARDS_END > #endif > } > >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >index d77323df3e83c89f82a016b69b2c9cda240a32d5..2b50c1a0b46c298df8a5e8580fe56d8067a6378e 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >@@ -657,12 +657,10 @@ std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateMediaSourceAVFObjC: > return std::nullopt; > > uint32_t displayCompositedFrames = 0; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN > if ([metrics respondsToSelector:@selector(numberOfDisplayCompositedVideoFrames)]) > displayCompositedFrames = [metrics numberOfDisplayCompositedVideoFrames]; >-#pragma clang diagnostic pop >+ ALLOW_NEW_API_WITHOUT_GUARDS_END > > return VideoPlaybackQualityMetrics { > static_cast<uint32_t>([metrics totalNumberOfVideoFrames]), >diff --git a/Source/WebCore/platform/ios/DragImageIOS.mm b/Source/WebCore/platform/ios/DragImageIOS.mm >index f2effa4c06ab122b3ba51eafb0b460c1977d482d..20b0d921db452dee5382e6216b4be54c7e5c4da0 100644 >--- a/Source/WebCore/platform/ios/DragImageIOS.mm >+++ b/Source/WebCore/platform/ios/DragImageIOS.mm >@@ -52,7 +52,7 @@ > #import <wtf/NeverDestroyed.h> > #import <wtf/SoftLinking.h> > >-IGNORE_CLANG_WARNINGS_BEGIN("nullability-completeness") >+IGNORE_WARNINGS_BEGIN("nullability-completeness") > > SOFT_LINK_FRAMEWORK(UIKit) > SOFT_LINK_CLASS(UIKit, UIFont) >@@ -62,7 +62,7 @@ SOFT_LINK(UIKit, UIGraphicsGetCurrentContext, CGContextRef, (void), ()) > SOFT_LINK(UIKit, UIGraphicsGetImageFromCurrentImageContext, UIImage *, (void), ()) > SOFT_LINK(UIKit, UIGraphicsEndImageContext, void, (void), ()) > >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > namespace WebCore { > >diff --git a/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm b/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm >index 4dc8832acb2cab22c16a747f6b4f8a2327724ab4..9633b3cf19d09a5289053dd37e1d921701f3fb54 100644 >--- a/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm >+++ b/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm >@@ -583,12 +583,10 @@ - (BOOL)playerViewControllerShouldHandleDoneButtonTap:(AVPlayerViewController *) > > - (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID > { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wunknown-pragmas" >-#pragma clang diagnostic ignored "-Wunguarded-availability-new" >+ ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN > if ([_avPlayerViewController respondsToSelector:@selector(setWebKitOverrideRouteSharingPolicy:routingContextUID:)]) > [_avPlayerViewController setWebKitOverrideRouteSharingPolicy:routeSharingPolicy routingContextUID:routingContextUID]; >-#pragma clang diagnostic pop >+ ALLOW_NEW_API_WITHOUT_GUARDS_END > } > > - (void)enterFullScreenAnimated:(BOOL)animated completionHandler:(void (^)(BOOL success, NSError * __nullable error))completionHandler >diff --git a/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm b/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm >index ac08d1fbdf112c65885b9cd895f2efe11173bb63..0446ef6617ab8863ed99d6f0a0fe81673ec5f3a8 100644 >--- a/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm >+++ b/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm >@@ -34,7 +34,8 @@ > #import <wtf/SoftLinking.h> > #import <wtf/text/WTFString.h> > >-IGNORE_CLANG_WARNINGS_BEGIN("nullability-completeness") >+IGNORE_WARNINGS_BEGIN("nullability-completeness") >+ > SOFT_LINK_FRAMEWORK(AVKit) > #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > SOFT_LINK_CLASS_OPTIONAL(AVKit, AVTouchBarMediaSelectionOption) >@@ -343,9 +344,8 @@ - (void)togglePictureInPicture > _playbackSessionInterfaceMac->playbackSessionModel()->togglePictureInPicture(); > } > >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > @end > > #endif // PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) >- >diff --git a/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm b/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm >index 8fe505b28947cfde0f276350f669d923c1d62ac2..f6e242bd1d451b26f73d1ef77d492a65c9617241 100644 >--- a/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm >+++ b/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm >@@ -97,10 +97,9 @@ CertificateInfo ResourceResponse::platformCertificateInfo() const > > if (trustResultType == kSecTrustResultInvalid) { > // FIXME: This is deprecated <rdar://problem/45894288>. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > result = SecTrustEvaluate(trust, &trustResultType); >-#pragma clang diagnostic pop >+ ALLOW_DEPRECATED_DECLARATIONS_END > if (result != errSecSuccess) > return { }; > } >diff --git a/Source/WebKit/UIProcess/ios/WKDrawingView.mm b/Source/WebKit/UIProcess/ios/WKDrawingView.mm >index 522d95eec21e20895b0794c69678c6d42dd83ac5..885fd97856486bef6bc9a684ece7f578e74ba74a 100644 >--- a/Source/WebKit/UIProcess/ios/WKDrawingView.mm >+++ b/Source/WebKit/UIProcess/ios/WKDrawingView.mm >@@ -60,10 +60,10 @@ - (instancetype)initWithEmbeddedViewID:(WebCore::GraphicsLayer::EmbeddedViewID)e > [_pencilView setFingerDrawingEnabled:NO]; > [_pencilView setUserInteractionEnabled:YES]; > [_pencilView setOpaque:NO]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > [_pencilView setDrawingDelegate:self]; >-#pragma clang diagnostic pop >+ ALLOW_DEPRECATED_DECLARATIONS_END > > [self addSubview:_pencilView.get()]; > >diff --git a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm >index 939b5d3560fdfcd45c37e0416867ec7a97d0f43f..aabe284abdf516622dd30e0a49101945dcb52279 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm >+++ b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm >@@ -907,10 +907,9 @@ - (NSString *)_EVOrganizationName > SecTrustResultType result = kSecTrustResultProceed; > > // FIXME: This is deprecated <rdar://problem/45894288>. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > OSStatus err = SecTrustEvaluate(trust, &result); >-#pragma clang diagnostic pop >+ ALLOW_DEPRECATED_DECLARATIONS_END > > if (err == noErr) > infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease]; >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h >index 0775e35e96b17886425c7a33580ae62319621b76..a2f0428c7ce87ce0ec754a95152c78241b108048 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h >@@ -23,9 +23,7 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >- >-#ifndef WebAlternativeTextClient_h >-#define WebAlternativeTextClient_h >+#pragma once > > #include <WebCore/AlternativeTextClient.h> > >@@ -35,7 +33,7 @@ class WebPage; > > class WebAlternativeTextClient : public WebCore::AlternativeTextClient { > public: >- WebAlternativeTextClient(WebPage *); >+ explicit WebAlternativeTextClient(WebPage*); > virtual ~WebAlternativeTextClient(); > void pageDestroyed() override; > #if USE(AUTOCORRECTION_PANEL) >@@ -49,16 +47,15 @@ public: > void removeDictationAlternatives(uint64_t dictationContext) override; > Vector<String> dictationAlternatives(uint64_t dictationContext) override; > #endif >+ > private: >-#if PLATFORM(IOS_FAMILY) >- IGNORE_CLANG_WARNINGS_BEGIN("unused-private-field") >+#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES)) >+ IGNORE_WARNINGS_BEGIN("unused-private-field") > #endif >- WebPage *m_page; >-#if PLATFORM(IOS_FAMILY) >- IGNORE_CLANG_WARNINGS_END >+ WebPage* m_page; >+#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES)) >+ IGNORE_WARNINGS_END > #endif > }; > > } >- >-#endif // WebAlternativeTextClient_h >diff --git a/Source/WebKitLegacy/mac/DOM/DOM.mm b/Source/WebKitLegacy/mac/DOM/DOM.mm >index 55f8a791148f4729b84da4948c2749cf3a83c3e6..f87e61533712f8eed70ceeb9e38635e3aa8f4ad4 100644 >--- a/Source/WebKitLegacy/mac/DOM/DOM.mm >+++ b/Source/WebKitLegacy/mac/DOM/DOM.mm >@@ -244,7 +244,7 @@ @end > > @implementation DOMNode (WebCoreInternal) > >-IGNORE_CLANG_WARNINGS_BEGIN("objc-protocol-method-implementation") >+IGNORE_WARNINGS_BEGIN("objc-protocol-method-implementation") > > - (NSString *)description > { >@@ -258,7 +258,7 @@ - (NSString *)description > return [NSString stringWithFormat:@"<%@ [%@]: %p>", [[self class] description], [self nodeName], _internal]; > } > >-IGNORE_CLANG_WARNINGS_END >+IGNORE_WARNINGS_END > > - (Bindings::RootObject*)_rootObject > { >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h >index 5fe54e2f745e748408a562e76275e4d55471c9f8..3206302af67cea81376b62632a3c9aa61d53bd04 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h >@@ -23,9 +23,7 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >- >-#ifndef WebAlternativeTextClient_h >-#define WebAlternativeTextClient_h >+#pragma once > > #import "CorrectionPanel.h" > #import <WebCore/AlternativeTextClient.h> >@@ -34,7 +32,7 @@ > > class WebAlternativeTextClient : public WebCore::AlternativeTextClient { > public: >- WebAlternativeTextClient(WebView *); >+ explicit WebAlternativeTextClient(WebView *); > virtual ~WebAlternativeTextClient(); > void pageDestroyed() override; > #if USE(AUTOCORRECTION_PANEL) >@@ -48,17 +46,17 @@ public: > void removeDictationAlternatives(uint64_t dictationContext) override; > Vector<String> dictationAlternatives(uint64_t dictationContext) override; > #endif >+ > private: >-#if PLATFORM(IOS_FAMILY) >-IGNORE_CLANG_WARNINGS_BEGIN("unused-private-field") >+#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES)) >+ IGNORE_WARNINGS_BEGIN("unused-private-field") > #endif >- WebView* m_webView; >-#if PLATFORM(IOS_FAMILY) >-IGNORE_CLANG_WARNINGS_END >+ WebView *m_webView; >+#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES)) >+ IGNORE_WARNINGS_END > #endif >+ > #if USE(AUTOCORRECTION_PANEL) > CorrectionPanel m_correctionPanel; > #endif > }; >- >-#endif // WebAlternativeTextClient_h >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index a2a299f4b7305e40996fc64fdf680a0dad3f9bde..4fe1f108961ce2c97b9979b701961e846cef6f8b 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,23 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Use warning-ignoring macros more consistently and simply >+ https://bugs.webkit.org/show_bug.cgi?id=192743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/TestNetscapePlugIn/main.cpp: >+ (handleEventCarbon): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END. >+ * DumpRenderTree/mac/TextInputControllerMac.m: >+ (-[TextInputController interpretKeyEvents:withSender:]): Use >+ IGNORE_WARNINGS_BEGIN/END. >+ * WebKitTestRunner/mac/EventSenderProxy.mm: >+ (WTR::EventSenderProxy::mouseForceClick): Use >+ IGNORE_NULL_CHECK_WARNINGS_BEGIN/END. >+ (WTR::EventSenderProxy::startAndCancelMouseForceClick): Ditto. >+ (WTR::EventSenderProxy::mouseForceDown): Ditto. >+ (WTR::EventSenderProxy::mouseForceUp): Ditto. >+ (WTR::EventSenderProxy::mouseForceChanged): Ditto. >+ > 2018-12-14 Alexey Proskuryakov <ap@apple.com> > > Add a style checker rule for Xcode version macros use >diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp >index 4cd1a62805538189e4353fa52d2b0b5852922118..8d82c4981f6ea3d5ce8a67591bf2b5bc26ef0af5 100644 >--- a/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp >+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp >@@ -471,14 +471,9 @@ static int16_t handleEventCarbon(NPP instance, PluginObject* obj, EventRecord* e > break; > case mouseDown: > if (obj->eventLogging) { >-#if __clang__ >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >-#endif >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > GlobalToLocal(&pt); >-#if __clang__ >-#pragma clang diagnostic pop >-#endif >+ ALLOW_DEPRECATED_DECLARATIONS_END > pluginLog(instance, "mouseDown at (%d, %d)", pt.h, pt.v); > } > if (obj->evaluateScriptOnMouseDownOrKeyDown && obj->mouseDownForEvaluateScript) >@@ -486,14 +481,9 @@ static int16_t handleEventCarbon(NPP instance, PluginObject* obj, EventRecord* e > break; > case mouseUp: > if (obj->eventLogging) { >-#if __clang__ >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >-#endif >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > GlobalToLocal(&pt); >-#if __clang__ >-#pragma clang diagnostic pop >-#endif >+ ALLOW_DEPRECATED_DECLARATIONS_END > pluginLog(instance, "mouseUp at (%d, %d)", pt.h, pt.v); > } > break; >diff --git a/Tools/DumpRenderTree/mac/TextInputControllerMac.m b/Tools/DumpRenderTree/mac/TextInputControllerMac.m >index 227c9637eab1a7e7908c1b8b6732f9945a1f3ca5..b1b0db236aebb4c0402138068f741dbb5162098e 100644 >--- a/Tools/DumpRenderTree/mac/TextInputControllerMac.m >+++ b/Tools/DumpRenderTree/mac/TextInputControllerMac.m >@@ -541,10 +541,9 @@ - (BOOL)interpretKeyEvents:(NSArray *)eventArray withSender:(WebHTMLView *)sende > > id result = [inputMethodHandler callWebScriptMethod:@"call" withArguments:[NSArray arrayWithObjects:inputMethodHandler, eventParam, nil]]; > if (![result respondsToSelector:@selector(boolValue)] || ![result boolValue]) { >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wundeclared-selector" >+ IGNORE_WARNINGS_BEGIN("undeclared-selector") > [sender doCommandBySelector:@selector(noop:)]; // AppKit sends noop: if the ime does not handle an event >-#pragma clang diagnostic pop >+ IGNORE_WARNINGS_END > } > > inputMethodView = nil; >diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm >index 9643d52c3c0c10a4ab2c6fdce349a5cf8789507c..3985e1493a0ad230691f14514da968d72c2853ed 100644 >--- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm >+++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm >@@ -417,11 +417,10 @@ void EventSenderProxy::mouseForceClick() > [NSApp sendEvent:mouseUp]; > > [NSApp _setCurrentEvent:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" > // WKView caches the most recent pressure event, so send it a nil event to clear the cache. >+ IGNORE_NULL_CHECK_WARNINGS_BEGIN > [targetView pressureChangeWithEvent:nil]; >-#pragma clang diagnostic pop >+ IGNORE_NULL_CHECK_WARNINGS_END > } > > void EventSenderProxy::startAndCancelMouseForceClick() >@@ -453,11 +452,10 @@ void EventSenderProxy::startAndCancelMouseForceClick() > [NSApp sendEvent:mouseUp]; > > [NSApp _setCurrentEvent:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" > // WKView caches the most recent pressure event, so send it a nil event to clear the cache. >+ IGNORE_NULL_CHECK_WARNINGS_BEGIN > [targetView pressureChangeWithEvent:nil]; >-#pragma clang diagnostic pop >+ IGNORE_NULL_CHECK_WARNINGS_END > } > > void EventSenderProxy::mouseForceDown() >@@ -479,11 +477,10 @@ void EventSenderProxy::mouseForceDown() > [forceMouseDown _postDelayed]; > > [NSApp _setCurrentEvent:nil]; >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" > // WKView caches the most recent pressure event, so send it a nil event to clear the cache. >+ IGNORE_NULL_CHECK_WARNINGS_BEGIN > [targetView pressureChangeWithEvent:nil]; >-#pragma clang diagnostic pop >+ IGNORE_NULL_CHECK_WARNINGS_END > } > > void EventSenderProxy::mouseForceUp() >@@ -503,12 +500,10 @@ void EventSenderProxy::mouseForceUp() > ASSERT(targetView); > > [NSApp _setCurrentEvent:nil]; >- >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" >-// WKView caches the most recent pressure event, so send it a nil event to clear the cache. >+ // WKView caches the most recent pressure event, so send it a nil event to clear the cache. >+ IGNORE_NULL_CHECK_WARNINGS_BEGIN > [targetView pressureChangeWithEvent:nil]; >-#pragma clang diagnostic pop >+ IGNORE_NULL_CHECK_WARNINGS_END > } > > void EventSenderProxy::mouseForceChanged(float force) >@@ -525,11 +520,10 @@ void EventSenderProxy::mouseForceChanged(float force) > [NSApp sendEvent:beginPressure.get()]; > [NSApp sendEvent:pressureChangedEvent.get()]; > >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wnonnull" > // WKView caches the most recent pressure event, so send it a nil event to clear the cache. >+ IGNORE_NULL_CHECK_WARNINGS_BEGIN > [targetView pressureChangeWithEvent:nil]; >-#pragma clang diagnostic pop >+ IGNORE_NULL_CHECK_WARNINGS_END > } > #else >
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
Flags:
mark.lam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192743
: 357405