Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (239254 => 239255)
--- trunk/Source/_javascript_Core/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,5 +1,19 @@
2018-12-15 Darin Adler <[email protected]>
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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-15 Darin Adler <[email protected]>
+
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (239254 => 239255)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2018-12-16 00:21:25 UTC (rev 239255)
@@ -876,7 +876,7 @@
// 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 @@
return InvalidGPRReg;
}
}
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
GPRReg SpeculativeJIT::fillSpeculateInt32(Edge edge, DataFormat& returnFormat)
{
Modified: trunk/Source/_javascript_Core/llint/LLIntData.cpp (239254 => 239255)
--- trunk/Source/_javascript_Core/llint/LLIntData.cpp 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/_javascript_Core/llint/LLIntData.cpp 2018-12-16 00:21:25 UTC (rev 239255)
@@ -74,7 +74,7 @@
#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 @@
STATIC_ASSERT(ArithProfile::observedBinaryIntNumber().rhsObservedType().isOnlyNumber());
}
}
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
} } // namespace JSC::LLInt
Modified: trunk/Source/_javascript_Core/tools/CodeProfiling.cpp (239254 => 239255)
--- trunk/Source/_javascript_Core/tools/CodeProfiling.cpp 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/_javascript_Core/tools/CodeProfiling.cpp 2018-12-16 00:21:25 UTC (rev 239255)
@@ -44,7 +44,7 @@
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 @@
}
#endif
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
#if HAVE(MACHINE_CONTEXT)
static void profilingTimer(int, siginfo_t*, void* uap)
Modified: trunk/Source/WTF/ChangeLog (239254 => 239255)
--- trunk/Source/WTF/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WTF/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,5 +1,18 @@
2018-12-15 Darin Adler <[email protected]>
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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-15 Darin Adler <[email protected]>
+
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Modified: trunk/Source/WTF/wtf/Assertions.h (239254 => 239255)
--- trunk/Source/WTF/wtf/Assertions.h 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WTF/wtf/Assertions.h 2018-12-16 00:21:25 UTC (rev 239255)
@@ -610,7 +610,7 @@
#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
@@ -617,7 +617,7 @@
// going.
RELEASE_ASSERT_NOT_REACHED();
}
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
#else
#define UNREACHABLE_FOR_PLATFORM() RELEASE_ASSERT_NOT_REACHED()
#endif
Modified: trunk/Source/WebCore/ChangeLog (239254 => 239255)
--- trunk/Source/WebCore/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,5 +1,49 @@
2018-12-15 Darin Adler <[email protected]>
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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 Darin Adler <[email protected]>
+
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Modified: trunk/Source/WebCore/PAL/ChangeLog (239254 => 239255)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,5 +1,16 @@
2018-12-15 Darin Adler <[email protected]>
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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-15 Darin Adler <[email protected]>
+
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h (239254 => 239255)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2018-12-16 00:21:25 UTC (rev 239255)
@@ -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>
Modified: trunk/Source/WebCore/bridge/objc/WebScriptObject.mm (239254 => 239255)
--- trunk/Source/WebCore/bridge/objc/WebScriptObject.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/bridge/objc/WebScriptObject.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -702,12 +702,12 @@
return self;
}
-IGNORE_CLANG_WARNINGS_BEGIN("objc-missing-super-calls")
+IGNORE_WARNINGS_BEGIN("objc-missing-super-calls")
- (void)dealloc
{
- return;
+ // Intentionally not calling [super dealloc] since we never want to deallocate our single instance.
}
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
+ (WebUndefined *)undefined
{
Modified: trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp (239254 => 239255)
--- trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp 2018-12-16 00:21:25 UTC (rev 239255)
@@ -62,10 +62,9 @@
{
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();
Modified: trunk/Source/WebCore/css/makeprop.pl (239254 => 239255)
--- trunk/Source/WebCore/css/makeprop.pl 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/css/makeprop.pl 2018-12-16 00:21:25 UTC (rev 239255)
@@ -248,11 +248,7 @@
#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 @@
} // namespace WebCore
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
+IGNORE_WARNINGS_END
EOF
close GPERF;
Modified: trunk/Source/WebCore/css/makevalues.pl (239254 => 239255)
--- trunk/Source/WebCore/css/makevalues.pl 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/css/makevalues.pl 2018-12-16 00:21:25 UTC (rev 239255)
@@ -78,11 +78,7 @@
#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 @@
} // namespace WebCore
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
+IGNORE_WARNINGS_END
EOF
close GPERF;
Modified: trunk/Source/WebCore/platform/ColorData.gperf (239254 => 239255)
--- trunk/Source/WebCore/platform/ColorData.gperf 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/ColorData.gperf 2018-12-16 00:21:25 UTC (rev 239255)
@@ -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 @@
} // namespace WebCore
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
+IGNORE_WARNINGS_END
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -198,11 +198,11 @@
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;
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -3272,9 +3272,8 @@
#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 @@
[metrics totalFrameDelay],
displayCompositedFrames,
};
-#pragma clang diagnostic pop
+
+ ALLOW_NEW_API_WITHOUT_GUARDS_END
#endif
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -657,12 +657,10 @@
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]),
Modified: trunk/Source/WebCore/platform/ios/DragImageIOS.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/ios/DragImageIOS.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/ios/DragImageIOS.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -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, UIGraphicsGetImageFromCurrentImageContext, UIImage *, (void), ())
SOFT_LINK(UIKit, UIGraphicsEndImageContext, void, (void), ())
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
namespace WebCore {
Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -583,12 +583,10 @@
- (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
Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -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 @@
_playbackSessionInterfaceMac->playbackSessionModel()->togglePictureInPicture();
}
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
@end
#endif // PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-
Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm (239254 => 239255)
--- trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -97,10 +97,9 @@
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 { };
}
Modified: trunk/Source/WebKit/ChangeLog (239254 => 239255)
--- trunk/Source/WebKit/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKit/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,5 +1,23 @@
2018-12-15 Darin Adler <[email protected]>
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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-15 Darin Adler <[email protected]>
+
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Modified: trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm (239254 => 239255)
--- trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -60,10 +60,10 @@
[_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()];
Modified: trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm (239254 => 239255)
--- trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -907,10 +907,9 @@
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];
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h (239254 => 239255)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h 2018-12-16 00:21:25 UTC (rev 239255)
@@ -23,10 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#pragma once
-#ifndef WebAlternativeTextClient_h
-#define WebAlternativeTextClient_h
-
#include <WebCore/AlternativeTextClient.h>
namespace WebKit {
@@ -35,7 +33,7 @@
class WebAlternativeTextClient : public WebCore::AlternativeTextClient {
public:
- WebAlternativeTextClient(WebPage *);
+ explicit WebAlternativeTextClient(WebPage*);
virtual ~WebAlternativeTextClient();
void pageDestroyed() override;
#if USE(AUTOCORRECTION_PANEL)
@@ -49,16 +47,15 @@
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
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (239254 => 239255)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,3 +1,19 @@
+2018-12-15 Darin Adler <[email protected]>
+
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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 <[email protected]>
Make TextInputController.legacyAttributedString take DOM nodes and offsets
Modified: trunk/Source/WebKitLegacy/mac/DOM/DOM.mm (239254 => 239255)
--- trunk/Source/WebKitLegacy/mac/DOM/DOM.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKitLegacy/mac/DOM/DOM.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -244,7 +244,7 @@
@implementation DOMNode (WebCoreInternal)
-IGNORE_CLANG_WARNINGS_BEGIN("objc-protocol-method-implementation")
+IGNORE_WARNINGS_BEGIN("objc-protocol-method-implementation")
- (NSString *)description
{
@@ -258,7 +258,7 @@
return [NSString stringWithFormat:@"<%@ [%@]: %p>", [[self class] description], [self nodeName], _internal];
}
-IGNORE_CLANG_WARNINGS_END
+IGNORE_WARNINGS_END
- (Bindings::RootObject*)_rootObject
{
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h (239254 => 239255)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h 2018-12-16 00:21:25 UTC (rev 239255)
@@ -23,10 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#pragma once
-#ifndef WebAlternativeTextClient_h
-#define WebAlternativeTextClient_h
-
#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 @@
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
+#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES))
+ IGNORE_WARNINGS_END
#endif
+
#if USE(AUTOCORRECTION_PANEL)
CorrectionPanel m_correctionPanel;
#endif
};
-
-#endif // WebAlternativeTextClient_h
Modified: trunk/Tools/ChangeLog (239254 => 239255)
--- trunk/Tools/ChangeLog 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Tools/ChangeLog 2018-12-16 00:21:25 UTC (rev 239255)
@@ -1,5 +1,25 @@
2018-12-15 Darin Adler <[email protected]>
+ Use warning-ignoring macros more consistently and simply
+ https://bugs.webkit.org/show_bug.cgi?id=192743
+
+ Reviewed by Mark Lam.
+
+ * 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-15 Darin Adler <[email protected]>
+
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp (239254 => 239255)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp 2018-12-16 00:21:25 UTC (rev 239255)
@@ -471,14 +471,9 @@
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 @@
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;
Modified: trunk/Tools/DumpRenderTree/mac/TextInputControllerMac.m (239254 => 239255)
--- trunk/Tools/DumpRenderTree/mac/TextInputControllerMac.m 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Tools/DumpRenderTree/mac/TextInputControllerMac.m 2018-12-16 00:21:25 UTC (rev 239255)
@@ -541,10 +541,9 @@
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;
Modified: trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm (239254 => 239255)
--- trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm 2018-12-16 00:09:32 UTC (rev 239254)
+++ trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm 2018-12-16 00:21:25 UTC (rev 239255)
@@ -417,11 +417,10 @@
[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 @@
[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 @@
[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 @@
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 @@
[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