WebInspectorUI and WebKitLegacy parts of [Xcode] Update some build settings as recomm...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 20:36:56 +0000 (20:36 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 20:36:56 +0000 (20:36 +0000)
commit4769a4bebcceedbbb2d72dcf29459c28fae10049
treefdb32437fa2c62f4c8b711925bc84e200a00a7b6
parenta48ee6ddde064584632118284967e30ffca66ca9
WebInspectorUI and WebKitLegacy parts of [Xcode] Update some build settings as recommended by Xcode 10
https://bugs.webkit.org/show_bug.cgi?id=190250

Reviewed by Andy Estes.

Source/WebCore/PAL:

* pal/spi/mac/NSWindowSPI.h: Added a private API declaration.

Source/WebInspectorUI:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_INFINITE_RECURSION,
  CLANG_WARN_SUSPICIOUS_MOVE, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, and
  CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.

* WebInspectorUI.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.

Source/WebKitLegacy/mac:
WebKitLegacy part of [Xcode] Update some build settings as recommended by Xcode 10
https://bugs.webkit.org/show_bug.cgi?id=190250

Reviewed by Andy Estes.

* Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF,
  CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, and CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED.
  Also enabled GCC_WARN_UNDECLARED_SELECTOR by deleting the line that set it to NO, which let
  an earlier line set it to YES.

Enabling -Wundeclared-selector exposed some long-standing mistakes and required the most
changes below.

* DefaultDelegates/WebDefaultContextMenuDelegate.mm: Imported an internal header that
  provides some missing method declarations.

* Misc/WebDownload.mm:
(-[WebDownload initWithRequest:delegate:]): Suppressed warning about this implementation of
  a deprecated method.

* Misc/WebIconDatabase.mm: Suppressed warning around our implementation of a deprecated class.

* Misc/WebNSObjectExtras.mm: Declare a category that is implemented in this file, because
  other code in the file uses a method from it.

* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView renewGState]): Suppressed warning about this implementation of
  a deprecated method.

* Plugins/WebPluginController.mm:
(installFlip4MacPlugInWorkaroundIfNecessary): Suppressed the undeclared selector warning
  around use of a selector that may be present in some WebKit client.

* Plugins/WebPluginDatabase.mm: Imported an internal header that provides some missing
  method declarations.

* WebCoreSupport/PopupMenuMac.mm: Imported a header that delcares delegate methods we call
  from here.

* WebCoreSupport/WebCachedFramePlatformData.h: Imported an internal header that provides some
  missing method declarations.

* WebCoreSupport/WebChromeClient.mm: Imported a header that declares delegate methods we call
  from here.

* WebCoreSupport/WebFrameLoaderClient.mm: Imported headers that declare delegate methods we
  call from here.
(WebFrameLoaderClient::setTitle): Suppressed the undeclared selector warning around use of
  an obsolete delegate method for binary compatibility.
(pluginView): Ditto.

* WebCoreSupport/WebVisitedLinkStore.mm: Imported a header that declares delegate methods we
  call from here.

* WebView/WebDeviceOrientationInternal.h: Declared -setController in a new
  WebDeviceOrientationProviderMock protocol.

* WebView/WebDeviceOrientationProviderMock.mm:
(-[WebDeviceOrientationProviderMock setController:]): Moved from an internal category to the
  main @implementation.

* WebView/WebDeviceOrientationProviderMockInternal.h: Declared that
  WebDeviceOrientationProviderMock conforms to WebDeviceOrientationProviderMock.

* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView accessibilityIsIgnored]): Suppressed warning about this implementation
  of a deprecated method.

* WebView/WebHTMLView.mm:
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Suppressed the undeclared
  selector warning around action methods that are not declared anywhere in WebKit.

(-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Suppressed warning
  about implementing this deprecated method.
(-[WebHTMLView draggingSourceOperationMaskForLocal:]): Ditto.
(-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
(-[WebHTMLView accessibilityAttributeValue:]): Ditto.
(-[WebHTMLView characterIndexForPoint:]): Ditto.
(-[WebHTMLView firstRectForCharacterRange:]): Ditto.
(-[WebHTMLView attributedSubstringFromRange:]): Ditto.
(-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
(-[WebHTMLView doCommandBySelector:]): Ditto.
(-[WebHTMLView insertText:]): Ditto.

* WebView/WebHTMLViewInternal.h: Declared an internal method that’s used from another file.

* WebView/WebJSPDFDoc.mm: Imported a header that declares delegate methods we call from here.

* WebView/WebPDFView.h: Removed previewView ivar.

* WebView/WebPDFView.mm:
  Removed declaration of FileInternal category and merged its implementation with the main
  implementation.
(-[WebPDFView dealloc]): Removed previewView ivar.
(-[WebPDFView initWithFrame:]): Removed code to deal with PDFPreviewView, which doesn’t
  exist in macOS versions we support.
(+[WebPDFView _PDFPreviewViewClass]): Deleted. PDFPreviewView doesn’t exist anymore.
(-[WebPDFView _canLookUpInDictionary]): Suppressed undeclared selector warning around use of
  action methods internal to PDFKit.
(-[WebPDFView _lookUpInDictionaryFromMenu:]): Ditto.
(-[WebPDFView _menuItemsFromPDFKitForEvent:]): Ditto.

* WebView/WebUIDelegatePrivate.h: Restored declarations of the delegate methods we actually
  call on macOS, even though in r86988 we started calling different methods on iOS.

* WebView/WebView.mm:
- Imported headers that declare delegate methods that we call.
- Removed declaration of WebFileInternal category and merged its implementation with the
  main implementation.
- Many internal methods were inexplicibly implemented as part of the WebViewEditingInMail
  category, which made them impossible to call from the main implementation. Moved those
  into the main implementation. One of those had to be declared in a class extension,
  because it is called from a method implemented in the WebPrivate category, and that
  category’s implementation appears first in the file.

(-[WebView _cacheHistoryDelegateImplementations]): Suppressed undeclared selector warning
  around use of obsolete delegate method for binary compatibility.

* WebView/WebViewInternal.h: Declared an internal method that’s used from another file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Configurations/Base.xcconfig
Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm
Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm
Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/Base.xcconfig
Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
Source/WebKitLegacy/mac/Misc/WebDownload.mm
Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm
Source/WebKitLegacy/mac/Misc/WebNSObjectExtras.mm
Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm
Source/WebKitLegacy/mac/Plugins/WebPluginController.mm
Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm
Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebCachedFramePlatformData.h
Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm
Source/WebKitLegacy/mac/WebView/WebDeviceOrientationInternal.h
Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.mm
Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMockInternal.h
Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h
Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
Source/WebKitLegacy/mac/WebView/WebHTMLViewInternal.h
Source/WebKitLegacy/mac/WebView/WebJSPDFDoc.mm
Source/WebKitLegacy/mac/WebView/WebPDFView.h
Source/WebKitLegacy/mac/WebView/WebPDFView.mm
Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/mac/WebView/WebViewInternal.h
Source/WebKitLegacy/mac/WebView/WebViewPrivate.h