Changeset 239255 in webkit


Ignore:
Timestamp:
Dec 15, 2018 4:21:25 PM (5 years ago)
Author:
Darin Adler
Message:

Use warning-ignoring macros more consistently and simply
https://bugs.webkit.org/show_bug.cgi?id=192743

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • 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.

Source/WebCore:

  • 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.

Source/WebCore/PAL:

  • 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.

Source/WebKit:

  • 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.

Source/WebKitLegacy/mac:

  • 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.

Source/WTF:

  • 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.

Tools:

  • 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.

Location:
trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r239254 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * dfg/DFGSpeculativeJIT64.cpp: Use IGNORE_WARNINGS_BEGIN/END instead of
     9        IGNORE_CLANG_WARNINGS_BEGIN/END. Other callsites are using the non-clang-specific
     10        one for this warning, "implicit-fallthrough", and it seems there is no special
     11        need to use the clang-specific one here.
     12        * llint/LLIntData.cpp: Ditto, but here it's "missing-noreturn"."
     13        * tools/CodeProfiling.cpp: Ditto.
     14
    1152018-12-15  Darin Adler  <darin@apple.com>
    216
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r239231 r239255  
    877877// Clang should allow unreachable [[clang::fallthrough]] in template functions if any template expansion uses it
    878878// http://llvm.org/bugs/show_bug.cgi?id=18619
    879 IGNORE_CLANG_WARNINGS_BEGIN("implicit-fallthrough")
     879IGNORE_WARNINGS_BEGIN("implicit-fallthrough")
    880880template<bool strict>
    881881GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnFormat)
     
    10081008    }
    10091009}
    1010 IGNORE_CLANG_WARNINGS_END
     1010IGNORE_WARNINGS_END
    10111011
    10121012GPRReg SpeculativeJIT::fillSpeculateInt32(Edge edge, DataFormat& returnFormat)
  • trunk/Source/JavaScriptCore/llint/LLIntData.cpp

    r238414 r239255  
    7575}
    7676
    77 IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn")
     77IGNORE_WARNINGS_BEGIN("missing-noreturn")
    7878void Data::performAssertions(VM& vm)
    7979{
     
    185185    }
    186186}
    187 IGNORE_CLANG_WARNINGS_END
     187IGNORE_WARNINGS_END
    188188
    189189} } // namespace JSC::LLInt
  • trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp

    r235935 r239255  
    4545WTF::MetaAllocatorTracker* CodeProfiling::s_tracker = 0;
    4646
    47 IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn")
     47IGNORE_WARNINGS_BEGIN("missing-noreturn")
    4848
    4949#if HAVE(MACHINE_CONTEXT)
     
    6161#endif
    6262
    63 IGNORE_CLANG_WARNINGS_END
     63IGNORE_WARNINGS_END
    6464
    6565#if HAVE(MACHINE_CONTEXT)
  • trunk/Source/WTF/ChangeLog

    r239254 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * wtf/Assertions.h: Use IGNORE_WARNINGS_BEGIN rather than
     9        IGNORE_CLANG_WARNINGS_BEGIN since we don't need special handling for
     10        non-clang compilers, in part since the code is already inside
     11        #if COMPILER(CLANG), but also because it would be harmless to ignore this
     12        warning on non-clang; we should almost never use IGNORE_CLANG_WARNINGS_BEGIN.
     13
    1142018-12-15  Darin Adler  <darin@apple.com>
    215
  • trunk/Source/WTF/wtf/Assertions.h

    r239012 r239255  
    611611// This would be a macro except that its use of #pragma works best around
    612612// a function. Hence it uses macro naming convention.
    613 IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn")
     613IGNORE_WARNINGS_BEGIN("missing-noreturn")
    614614static inline void UNREACHABLE_FOR_PLATFORM()
    615615{
     
    618618    RELEASE_ASSERT_NOT_REACHED();
    619619}
    620 IGNORE_CLANG_WARNINGS_END
     620IGNORE_WARNINGS_END
    621621#else
    622622#define UNREACHABLE_FOR_PLATFORM() RELEASE_ASSERT_NOT_REACHED()
  • trunk/Source/WebCore/ChangeLog

    r239254 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * bridge/objc/WebScriptObject.mm: Use IGNORE_WARNINGS_BEGIN rather than
     9        IGNORE_CLANG_WARNINGS_BEGIN here. There is no need to compile Objective-C++
     10        files like this one with non-clang compilers, and no need to worry about
     11        them when choosing the macro.
     12
     13        * crypto/mac/CryptoKeyRSAMac.cpp:
     14        (WebCore::getPublicKeyComponents): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
     15
     16        * css/makeprop.pl: Use IGNORE_WARNINGS_BEGIN/END, obviating the need for
     17        the "unknown-pragmas" trick, which the macro should take care of.
     18        * css/makevalues.pl: Ditto.
     19        * platform/ColorData.gperf: Ditto.
     20
     21        * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
     22        (WebCore::CDMSessionAVStreamSession::update): Use IGNORE_WARNINGS_BEGIN/END
     23        (see rationale above for Objective-C++).
     24
     25        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     26        (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics): Use
     27        ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END.
     28        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
     29        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics): Ditto.
     30
     31        * platform/ios/DragImageIOS.mm: Use IGNORE_WARNINGS_BEGIN/END
     32        (see rationale above for Objective-C++).
     33
     34        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
     35        (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]):
     36        Use ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END.
     37
     38        * platform/mac/WebPlaybackControlsManager.mm: Use IGNORE_WARNINGS_BEGIN/END
     39        (see rationale above for Objective-C++).
     40
     41        * platform/network/cocoa/ResourceResponseCocoa.mm:
     42        (WebCore::ResourceResponse::platformCertificateInfo const): Use
     43        ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
     44
    1452018-12-15  Darin Adler  <darin@apple.com>
    246
  • trunk/Source/WebCore/PAL/ChangeLog

    r239254 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * pal/spi/cocoa/AVKitSPI.h: Use IGNORE_WARNINGS_BEGIN instead of
     9        IGNORE_CLANG_WARNINGS_BEGIN; there is no special need to accomodate
     10        non-clang compilers here.
     11
    1122018-12-15  Darin Adler  <darin@apple.com>
    213
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h

    r238560 r239255  
    3939
    4040#import <AVKit/AVPlayerController.h>
    41 IGNORE_CLANG_WARNINGS_BEGIN("objc-property-no-attribute")
     41IGNORE_WARNINGS_BEGIN("objc-property-no-attribute")
    4242#import <AVKit/AVPlayerLayerView.h>
    43 IGNORE_CLANG_WARNINGS_END
     43IGNORE_WARNINGS_END
    4444#import <AVKit/AVPlayerViewController_Private.h>
    4545#import <AVKit/AVPlayerViewController_WebKitOnly.h>
  • trunk/Source/WebCore/bridge/objc/WebScriptObject.mm

    r235935 r239255  
    703703}
    704704
    705 IGNORE_CLANG_WARNINGS_BEGIN("objc-missing-super-calls")
     705IGNORE_WARNINGS_BEGIN("objc-missing-super-calls")
    706706- (void)dealloc
    707707{
    708     return;
    709 }
    710 IGNORE_CLANG_WARNINGS_END
     708    // Intentionally not calling [super dealloc] since we never want to deallocate our single instance.
     709}
     710IGNORE_WARNINGS_END
    711711
    712712+ (WebUndefined *)undefined
  • trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp

    r238754 r239255  
    6363    ASSERT(CCRSAGetKeyType(rsaKey) == ccRSAKeyPublic || CCRSAGetKeyType(rsaKey) == ccRSAKeyPrivate);
    6464    bool keyIsPublic = CCRSAGetKeyType(rsaKey) == ccRSAKeyPublic;
    65 #pragma clang diagnostic push
    66 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
     65    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    6766    CCRSACryptorRef publicKey = keyIsPublic ? rsaKey : CCRSACryptorGetPublicKeyFromPrivateKey(rsaKey);
    68 #pragma clang diagnostic pop
     67    ALLOW_DEPRECATED_DECLARATIONS_END
    6968
    7069    modulus.resize(16384);
  • trunk/Source/WebCore/css/makeprop.pl

    r238262 r239255  
    249249#include <string.h>
    250250
    251 #if defined(__clang__)
    252 #pragma clang diagnostic push
    253 #pragma clang diagnostic ignored \"-Wunknown-pragmas\"
    254 #pragma clang diagnostic ignored \"-Wimplicit-fallthrough\"
    255 #endif
     251IGNORE_WARNINGS_BEGIN(\"implicit-fallthrough\")
    256252
    257253// Older versions of gperf like to use the `register` keyword.
     
    422418} // namespace WebCore
    423419
    424 #if defined(__clang__)
    425 #pragma clang diagnostic pop
    426 #endif
     420IGNORE_WARNINGS_END
    427421EOF
    428422
  • trunk/Source/WebCore/css/makevalues.pl

    r236091 r239255  
    7979#include <string.h>
    8080
    81 #if defined(__clang__)
    82 #pragma clang diagnostic push
    83 #pragma clang diagnostic ignored \"-Wunknown-pragmas\"
    84 #pragma clang diagnostic ignored \"-Wimplicit-fallthrough\"
    85 #endif
     81IGNORE_WARNINGS_BEGIN(\"implicit-fallthrough\")
    8682
    8783// Older versions of gperf like to use the `register` keyword.
     
    156152} // namespace WebCore
    157153
    158 #if defined(__clang__)
    159 #pragma clang diagnostic pop
    160 #endif
     154IGNORE_WARNINGS_END
    161155EOF
    162156close GPERF;
  • trunk/Source/WebCore/platform/ColorData.gperf

    r231753 r239255  
    33#include <string.h>
    44
    5 #if defined(__clang__)
    6 #pragma clang diagnostic push
    7 #pragma clang diagnostic ignored "-Wunknown-pragmas"
    8 #pragma clang diagnostic ignored "-Wimplicit-fallthrough"
    9 #endif
     5IGNORE_WARNINGS_BEGIN("implicit-fallthrough")
    106
    117// Older versions of gperf like to use the `register` keyword.
     
    185181} // namespace WebCore
    186182
    187 #if defined(__clang__)
    188 #pragma clang diagnostic pop
    189 #endif
     183IGNORE_WARNINGS_END
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm

    r237009 r239255  
    199199        RetainPtr<NSData> certificateData = adoptNS([[NSData alloc] initWithBytes:m_certificate->data() length:m_certificate->length()]);
    200200
    201         IGNORE_CLANG_WARNINGS_BEGIN("objc-literal-conversion")
     201        IGNORE_WARNINGS_BEGIN("objc-literal-conversion")
    202202        String storagePath = this->storagePath();
    203203        if (!storagePath.isEmpty() && [getAVStreamSessionClass() respondsToSelector:@selector(removePendingExpiredSessionReports:withAppIdentifier:storageDirectoryAtURL:)])
    204204            [getAVStreamSessionClass() removePendingExpiredSessionReports:@[m_expiredSession.get()] withAppIdentifier:certificateData.get() storageDirectoryAtURL:[NSURL fileURLWithPath:storagePath]];
    205         IGNORE_CLANG_WARNINGS_END
     205        IGNORE_WARNINGS_END
    206206        m_expiredSession = nullptr;
    207207        return true;
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r239230 r239255  
    32733273    return std::nullopt;
    32743274#else
    3275 #pragma clang diagnostic push
    3276 #pragma clang diagnostic ignored "-Wunknown-pragmas"
    3277 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
     3275    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
     3276
    32783277    auto metrics = [m_videoLayer videoPerformanceMetrics];
    32793278    if (!metrics)
     
    32913290        displayCompositedFrames,
    32923291    };
    3293 #pragma clang diagnostic pop
     3292
     3293    ALLOW_NEW_API_WITHOUT_GUARDS_END
    32943294#endif
    32953295}
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

    r239230 r239255  
    658658
    659659    uint32_t displayCompositedFrames = 0;
    660 #pragma clang diagnostic push
    661 #pragma clang diagnostic ignored "-Wunknown-pragmas"
    662 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
     660    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
    663661    if ([metrics respondsToSelector:@selector(numberOfDisplayCompositedVideoFrames)])
    664662        displayCompositedFrames = [metrics numberOfDisplayCompositedVideoFrames];
    665 #pragma clang diagnostic pop
     663    ALLOW_NEW_API_WITHOUT_GUARDS_END
    666664
    667665    return VideoPlaybackQualityMetrics {
  • trunk/Source/WebCore/platform/ios/DragImageIOS.mm

    r237266 r239255  
    5353#import <wtf/SoftLinking.h>
    5454
    55 IGNORE_CLANG_WARNINGS_BEGIN("nullability-completeness")
     55IGNORE_WARNINGS_BEGIN("nullability-completeness")
    5656
    5757SOFT_LINK_FRAMEWORK(UIKit)
     
    6363SOFT_LINK(UIKit, UIGraphicsEndImageContext, void, (void), ())
    6464
    65 IGNORE_CLANG_WARNINGS_END
     65IGNORE_WARNINGS_END
    6666
    6767namespace WebCore {
  • trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm

    r238528 r239255  
    584584- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID
    585585{
    586 #pragma clang diagnostic push
    587 #pragma clang diagnostic ignored "-Wunknown-pragmas"
    588 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
     586    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
    589587    if ([_avPlayerViewController respondsToSelector:@selector(setWebKitOverrideRouteSharingPolicy:routingContextUID:)])
    590588        [_avPlayerViewController setWebKitOverrideRouteSharingPolicy:routeSharingPolicy routingContextUID:routingContextUID];
    591 #pragma clang diagnostic pop
     589    ALLOW_NEW_API_WITHOUT_GUARDS_END
    592590}
    593591
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm

    r236748 r239255  
    3535#import <wtf/text/WTFString.h>
    3636
    37 IGNORE_CLANG_WARNINGS_BEGIN("nullability-completeness")
     37IGNORE_WARNINGS_BEGIN("nullability-completeness")
     38
    3839SOFT_LINK_FRAMEWORK(AVKit)
    3940#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     
    344345}
    345346
    346 IGNORE_CLANG_WARNINGS_END
     347IGNORE_WARNINGS_END
    347348
    348349@end
    349350
    350351#endif // PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
    351 
  • trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm

    r238144 r239255  
    9898    if (trustResultType == kSecTrustResultInvalid) {
    9999        // FIXME: This is deprecated <rdar://problem/45894288>.
    100 #pragma clang diagnostic push
    101 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
     100        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    102101        result = SecTrustEvaluate(trust, &trustResultType);
    103 #pragma clang diagnostic pop
     102        ALLOW_DEPRECATED_DECLARATIONS_END
    104103        if (result != errSecSuccess)
    105104            return { };
  • trunk/Source/WebKit/ChangeLog

    r239254 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * UIProcess/ios/WKDrawingView.mm:
     9        (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
     10        Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
     11        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
     12        (-[WKFullScreenWindowController _EVOrganizationName]): Ditto.
     13
     14        * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Use
     15        IGNORE_WARNINGS_BEGIN/END instead of IGNORE_CLANG_WARNINGS_BEGIN/END
     16        because there is no need to accomodate non-clang compilers here.
     17        Also use #pragma once, add a missing "explicit", and fix conditionals.
     18
    1192018-12-15  Darin Adler  <darin@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm

    r239241 r239255  
    6161    [_pencilView setUserInteractionEnabled:YES];
    6262    [_pencilView setOpaque:NO];
    63 #pragma clang diagnostic push
    64 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
     63
     64    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    6565    [_pencilView setDrawingDelegate:self];
    66 #pragma clang diagnostic pop
     66    ALLOW_DEPRECATED_DECLARATIONS_END
    6767
    6868    [self addSubview:_pencilView.get()];
  • trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

    r239128 r239255  
    908908
    909909        // FIXME: This is deprecated <rdar://problem/45894288>.
    910 #pragma clang diagnostic push
    911 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
     910        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    912911        OSStatus err = SecTrustEvaluate(trust, &result);
    913 #pragma clang diagnostic pop
     912        ALLOW_DEPRECATED_DECLARATIONS_END
    914913
    915914        if (err == noErr)
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebAlternativeTextClient.h

    r237266 r239255  
    2424 */
    2525
    26 
    27 #ifndef WebAlternativeTextClient_h
    28 #define WebAlternativeTextClient_h
     26#pragma once
    2927
    3028#include <WebCore/AlternativeTextClient.h>
     
    3634class WebAlternativeTextClient : public WebCore::AlternativeTextClient {
    3735public:
    38     WebAlternativeTextClient(WebPage *);
     36    explicit WebAlternativeTextClient(WebPage*);
    3937    virtual ~WebAlternativeTextClient();
    4038    void pageDestroyed() override;
     
    5048    Vector<String> dictationAlternatives(uint64_t dictationContext) override;
    5149#endif
     50
    5251private:
    53 #if PLATFORM(IOS_FAMILY)
    54     IGNORE_CLANG_WARNINGS_BEGIN("unused-private-field")
     52#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES))
     53    IGNORE_WARNINGS_BEGIN("unused-private-field")
    5554#endif
    56     WebPage *m_page;
    57 #if PLATFORM(IOS_FAMILY)
    58     IGNORE_CLANG_WARNINGS_END
     55    WebPage* m_page;
     56#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES))
     57    IGNORE_WARNINGS_END
    5958#endif
    6059};
    6160
    6261}
    63 
    64 #endif // WebAlternativeTextClient_h
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r239149 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * DOM/DOM.mm: Use IGNORE_WARNINGS_BEGIN/END instead of
     9        IGNORE_CLANG_WARNINGS_BEGIN since there is no need to accomodate non-clang
     10        compilers in Objective-C++ code.
     11
     12        * WebCoreSupport/WebAlternativeTextClient.h: Use IGNORE_WARNINGS_BEGIN/END
     13        instead of IGNORE_CLANG_WARNINGS_BEGIN/END because there is no need to
     14        accomodate non-clang compilers here. Also use #pragma once, add a missing
     15        "explicit" and fix conditionals.
     16
    1172018-12-12  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/Source/WebKitLegacy/mac/DOM/DOM.mm

    r237266 r239255  
    245245@implementation DOMNode (WebCoreInternal)
    246246
    247 IGNORE_CLANG_WARNINGS_BEGIN("objc-protocol-method-implementation")
     247IGNORE_WARNINGS_BEGIN("objc-protocol-method-implementation")
    248248
    249249- (NSString *)description
     
    259259}
    260260
    261 IGNORE_CLANG_WARNINGS_END
     261IGNORE_WARNINGS_END
    262262
    263263- (Bindings::RootObject*)_rootObject
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h

    r237266 r239255  
    2424 */
    2525
    26 
    27 #ifndef WebAlternativeTextClient_h
    28 #define WebAlternativeTextClient_h
     26#pragma once
    2927
    3028#import "CorrectionPanel.h"
     
    3533class WebAlternativeTextClient : public WebCore::AlternativeTextClient {
    3634public:
    37     WebAlternativeTextClient(WebView *);
     35    explicit WebAlternativeTextClient(WebView*);
    3836    virtual ~WebAlternativeTextClient();
    3937    void pageDestroyed() override;
     
    4947    Vector<String> dictationAlternatives(uint64_t dictationContext) override;
    5048#endif
     49
    5150private:
    52 #if PLATFORM(IOS_FAMILY)
    53 IGNORE_CLANG_WARNINGS_BEGIN("unused-private-field")
     51#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES))
     52    IGNORE_WARNINGS_BEGIN("unused-private-field")
    5453#endif
    5554    WebView* m_webView;
    56 #if PLATFORM(IOS_FAMILY)
    57 IGNORE_CLANG_WARNINGS_END
     55#if !(USE(AUTOCORRECTION_PANEL) || USE(DICTATION_ALTERNATIVES))
     56    IGNORE_WARNINGS_END
    5857#endif
     58
    5959#if USE(AUTOCORRECTION_PANEL)
    6060    CorrectionPanel m_correctionPanel;
    6161#endif
    6262};
    63 
    64 #endif // WebAlternativeTextClient_h
  • trunk/Tools/ChangeLog

    r239254 r239255  
     12018-12-15  Darin Adler  <darin@apple.com>
     2
     3        Use warning-ignoring macros more consistently and simply
     4        https://bugs.webkit.org/show_bug.cgi?id=192743
     5
     6        Reviewed by Mark Lam.
     7
     8        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
     9        (handleEventCarbon): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
     10        * DumpRenderTree/mac/TextInputControllerMac.m:
     11        (-[TextInputController interpretKeyEvents:withSender:]): Use
     12        IGNORE_WARNINGS_BEGIN/END.
     13        * WebKitTestRunner/mac/EventSenderProxy.mm:
     14        (WTR::EventSenderProxy::mouseForceClick): Use
     15        IGNORE_NULL_CHECK_WARNINGS_BEGIN/END.
     16        (WTR::EventSenderProxy::startAndCancelMouseForceClick): Ditto.
     17        (WTR::EventSenderProxy::mouseForceDown): Ditto.
     18        (WTR::EventSenderProxy::mouseForceUp): Ditto.
     19        (WTR::EventSenderProxy::mouseForceChanged): Ditto.
     20
    1212018-12-15  Darin Adler  <darin@apple.com>
    222
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp

    r221609 r239255  
    472472        case mouseDown:
    473473            if (obj->eventLogging) {
    474 #if __clang__
    475 #pragma clang diagnostic push
    476 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    477 #endif
     474                ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    478475                GlobalToLocal(&pt);
    479 #if __clang__
    480 #pragma clang diagnostic pop
    481 #endif
     476                ALLOW_DEPRECATED_DECLARATIONS_END
    482477                pluginLog(instance, "mouseDown at (%d, %d)", pt.h, pt.v);
    483478            }
     
    487482        case mouseUp:
    488483            if (obj->eventLogging) {
    489 #if __clang__
    490 #pragma clang diagnostic push
    491 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    492 #endif
     484                ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    493485                GlobalToLocal(&pt);
    494 #if __clang__
    495 #pragma clang diagnostic pop
    496 #endif
     486                ALLOW_DEPRECATED_DECLARATIONS_END
    497487                pluginLog(instance, "mouseUp at (%d, %d)", pt.h, pt.v);
    498488            }
  • trunk/Tools/DumpRenderTree/mac/TextInputControllerMac.m

    r239149 r239255  
    542542    id result = [inputMethodHandler callWebScriptMethod:@"call" withArguments:[NSArray arrayWithObjects:inputMethodHandler, eventParam, nil]];
    543543    if (![result respondsToSelector:@selector(boolValue)] || ![result boolValue]) {
    544 #pragma clang diagnostic push
    545 #pragma clang diagnostic ignored "-Wundeclared-selector"
     544        IGNORE_WARNINGS_BEGIN("undeclared-selector")
    546545        [sender doCommandBySelector:@selector(noop:)]; // AppKit sends noop: if the ime does not handle an event
    547 #pragma clang diagnostic pop
     546        IGNORE_WARNINGS_END
    548547    }
    549548
  • trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm

    r237405 r239255  
    418418
    419419    [NSApp _setCurrentEvent:nil];
    420 #pragma clang diagnostic push
    421 #pragma clang diagnostic ignored "-Wnonnull"
    422420    // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
     421    IGNORE_NULL_CHECK_WARNINGS_BEGIN
    423422    [targetView pressureChangeWithEvent:nil];
    424 #pragma clang diagnostic pop
     423    IGNORE_NULL_CHECK_WARNINGS_END
    425424}
    426425
     
    454453
    455454    [NSApp _setCurrentEvent:nil];
    456 #pragma clang diagnostic push
    457 #pragma clang diagnostic ignored "-Wnonnull"
    458455    // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
     456    IGNORE_NULL_CHECK_WARNINGS_BEGIN
    459457    [targetView pressureChangeWithEvent:nil];
    460 #pragma clang diagnostic pop
     458    IGNORE_NULL_CHECK_WARNINGS_END
    461459}
    462460
     
    480478
    481479    [NSApp _setCurrentEvent:nil];
    482 #pragma clang diagnostic push
    483 #pragma clang diagnostic ignored "-Wnonnull"
    484480    // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
     481    IGNORE_NULL_CHECK_WARNINGS_BEGIN
    485482    [targetView pressureChangeWithEvent:nil];
    486 #pragma clang diagnostic pop
     483    IGNORE_NULL_CHECK_WARNINGS_END
    487484}
    488485
     
    504501
    505502    [NSApp _setCurrentEvent:nil];
    506 
    507 #pragma clang diagnostic push
    508 #pragma clang diagnostic ignored "-Wnonnull"
    509 // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
     503    // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
     504    IGNORE_NULL_CHECK_WARNINGS_BEGIN
    510505    [targetView pressureChangeWithEvent:nil];
    511 #pragma clang diagnostic pop
     506    IGNORE_NULL_CHECK_WARNINGS_END
    512507}
    513508
     
    526521    [NSApp sendEvent:pressureChangedEvent.get()];
    527522
    528 #pragma clang diagnostic push
    529 #pragma clang diagnostic ignored "-Wnonnull"
    530523    // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
     524    IGNORE_NULL_CHECK_WARNINGS_BEGIN
    531525    [targetView pressureChangeWithEvent:nil];
    532 #pragma clang diagnostic pop
     526    IGNORE_NULL_CHECK_WARNINGS_END
    533527}
    534528#else
Note: See TracChangeset for help on using the changeset viewer.