Title: [236846] trunk/Source
Revision
236846
Author
[email protected]
Date
2018-10-04 13:36:56 -0700 (Thu, 04 Oct 2018)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (236845 => 236846)


--- trunk/Source/WebCore/PAL/ChangeLog	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-10-04 20:36:56 UTC (rev 236846)
@@ -1,5 +1,14 @@
 2018-10-04  Dan Bernstein  <[email protected]>
 
+        PAL change for the 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.
+
+        * pal/spi/mac/NSWindowSPI.h: Added a private API declaration.
+
+2018-10-04  Dan Bernstein  <[email protected]>
+
         PAL part of [Xcode] Update some build settings as recommended by Xcode 10
         https://bugs.webkit.org/show_bug.cgi?id=190250
 

Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h (236845 => 236846)


--- trunk/Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -38,6 +38,7 @@
 @interface NSWindow ()
 
 - (id)_newFirstResponderAfterResigning;
+- (void)_setCursorForMouseLocation:(NSPoint)point;
 
 @end
 

Modified: trunk/Source/WebInspectorUI/ChangeLog (236845 => 236846)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-10-04 20:36:56 UTC (rev 236846)
@@ -1,3 +1,16 @@
+2018-10-04  Dan Bernstein  <[email protected]>
+
+        WebInspectorUI 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_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.
+
 2018-10-04  Devin Rousso  <[email protected]>
 
         Web Inspector: merge ProbeManager into DebuggerManager

Modified: trunk/Source/WebInspectorUI/Configurations/Base.xcconfig (236845 => 236846)


--- trunk/Source/WebInspectorUI/Configurations/Base.xcconfig	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebInspectorUI/Configurations/Base.xcconfig	2018-10-04 20:36:56 UTC (rev 236846)
@@ -19,14 +19,17 @@
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_COMMA = YES;
 CLANG_WARN_CONSTANT_CONVERSION = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
 CLANG_WARN_EMPTY_BODY = YES;
 CLANG_WARN_ENUM_CONVERSION = YES;
+CLANG_WARN_INFINITE_RECURSION = YES;
 CLANG_WARN_INT_CONVERSION = YES;
 CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
 CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+CLANG_WARN_SUSPICIOUS_MOVE = YES;
 CLANG_WARN_STRICT_PROTOTYPES = YES;
 CLANG_WARN_UNREACHABLE_CODE = YES;
 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -52,7 +55,9 @@
 GCC_WARN_ABOUT_RETURN_TYPE = YES
 GCC_WARN_ABOUT_RETURN_TYPE = YES;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 GCC_WARN_UNINITIALIZED_AUTOS = YES
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES

Modified: trunk/Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj (236845 => 236846)


--- trunk/Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj	2018-10-04 20:36:56 UTC (rev 236846)
@@ -104,7 +104,7 @@
 			isa = PBXProject;
 			attributes = {
 				LastSwiftUpdateCheck = 0700;
-				LastUpgradeCheck = 0700;
+				LastUpgradeCheck = 1000;
 				ORGANIZATIONNAME = Apple;
 			};
 			buildConfigurationList = A54C2250148B23DE00373FA3 /* Build configuration list for PBXProject "WebInspectorUI" */;

Modified: trunk/Source/WebKitLegacy/ChangeLog (236845 => 236846)


--- trunk/Source/WebKitLegacy/ChangeLog	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/ChangeLog	2018-10-04 20:36:56 UTC (rev 236846)
@@ -1,3 +1,12 @@
+2018-10-04  Dan Bernstein  <[email protected]>
+
+        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.
+
+        * WebKitLegacy.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.
+
 2018-10-01  Dean Jackson  <[email protected]>
 
         [macOS] Switching to discrete GPU should be done in the UI process

Modified: trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj (236845 => 236846)


--- trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2018-10-04 20:36:56 UTC (rev 236846)
@@ -3222,7 +3222,7 @@
 			isa = PBXProject;
 			attributes = {
 				LastSwiftUpdateCheck = 0700;
-				LastUpgradeCheck = 0700;
+				LastUpgradeCheck = 1000;
 			};
 			buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKitLegacy" */;
 			compatibilityVersion = "Xcode 3.2";

Modified: trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -30,6 +30,7 @@
 #import "WebDelegateImplementationCaching.h"
 #import "WebGeolocationCoreLocationProvider.h"
 #import <WebGeolocationPosition.h>
+#import <WebUIDelegatePrivate.h>
 #import <WebCore/GeolocationPosition.h>
 #import <WebCore/WebCoreThread.h>
 #import <WebCore/WebCoreThreadRun.h>

Modified: trunk/Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -52,10 +52,6 @@
 
 using namespace WebCore;
 
-@interface WebPDFView (Secrets)
-+ (Class)_representationClassForWebFrame:(WebFrame *)webFrame;
-@end
-
 #pragma mark Constants
 
 static const float PAGE_WIDTH_INSET = 4.0f * 2.0f;

Modified: trunk/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -715,7 +715,9 @@
 
 
 // Do the right thing for a Carbon window.
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (id)initWithCoder:(NSCoder *)coder
+IGNORE_WARNINGS_END
 {
 
     // Actually, this will probably never be implemented.  M.P. Notice - 8/2/00
@@ -817,6 +819,7 @@
     // Initialize with the default return value.
     UInt32 hiCommandID = 0;
 
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     // Pretty simple, if tedious.
     if (inActionSelector == @selector(clear:))
         hiCommandID = kHICommandClear;
@@ -832,6 +835,7 @@
         hiCommandID = kHICommandSelectAll;
     else if (inActionSelector == @selector(undo:))
         hiCommandID = kHICommandUndo;
+IGNORE_WARNINGS_END
 
     // Done.
     return hiCommandID;

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2018-10-04 20:36:56 UTC (rev 236846)
@@ -1,3 +1,126 @@
+2018-10-04  Dan Bernstein  <[email protected]>
+
+        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.
+
 2018-10-04  YUHAN WU  <[email protected]>
 
         Runtime flag and IDL for MediaRecorder

Modified: trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig	2018-10-04 20:36:56 UTC (rev 236846)
@@ -37,6 +37,7 @@
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_COMMA = YES;
 CLANG_WARN_CONSTANT_CONVERSION = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
 CLANG_WARN_EMPTY_BODY = YES;
@@ -51,6 +52,7 @@
 CLANG_WARN_UNREACHABLE_CODE = YES;
 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 COMBINE_HIDPI_IMAGES = NO;
 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
 ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -76,13 +78,14 @@
 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
 GCC_WARN_ABOUT_RETURN_TYPE = YES;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 GCC_WARN_SIGN_COMPARE = YES;
-GCC_WARN_UNDECLARED_SELECTOR = NO;
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
+CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 PREBINDING = NO;
 WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
 

Modified: trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -35,7 +35,7 @@
 #import "WebDefaultUIDelegate.h"
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
-#import "WebHTMLViewPrivate.h"
+#import "WebHTMLViewInternal.h"
 #import "WebLocalizableStringsInternal.h"
 #import "WebNSPasteboardExtras.h"
 #import "WebNSURLRequestExtras.h"

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -181,25 +181,31 @@
     [super dealloc];
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (id)initWithRequest:(NSURLRequest *)request delegate:(id<NSURLDownloadDelegate>)delegate
+IGNORE_WARNINGS_END
 {
     [self _setRealDelegate:delegate];
     return [super initWithRequest:request delegate:_webInternal];
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (id)_initWithLoadingConnection:(NSURLConnection *)connection
                          request:(NSURLRequest *)request
                         response:(NSURLResponse *)response
                         delegate:(id)delegate
                            proxy:(NSURLConnectionDelegateProxy *)proxy
+IGNORE_WARNINGS_END
 {
     [self _setRealDelegate:delegate];
     return [super _initWithLoadingConnection:connection request:request response:response delegate:_webInternal proxy:proxy];
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (id)_initWithRequest:(NSURLRequest *)request
               delegate:(id)delegate
              directory:(NSString *)directory
+IGNORE_WARNINGS_END
 {
     [self _setRealDelegate:delegate];
     return [super _initWithRequest:request delegate:_webInternal directory:directory];

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -91,7 +91,9 @@
     0x00, 0x00, 0x01, 0x52, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x0A, 
     0xFC, 0x80, 0x00, 0x00, 0x27, 0x10, 0x00, 0x0A, 0xFC, 0x80, 0x00, 0x00, 0x27, 0x10 };
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 @implementation WebIconDatabase
+IGNORE_WARNINGS_END
 
 + (void)initialize
 {

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebNSObjectExtras.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Misc/WebNSObjectExtras.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebNSObjectExtras.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -37,6 +37,10 @@
 }
 @end
 
+@interface NSInvocation (WebMainThreadInvoker)
+- (void)_webkit_invokeAndHandleException:(WebMainThreadInvoker *)exceptionHandler;
+@end
+
 static bool returnTypeIsObject(NSInvocation *invocation)
 {
     // Could use either _C_ID or NSObjCObjectType, but it seems that neither is

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -613,7 +613,9 @@
     }
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (void)renewGState
+IGNORE_WARNINGS_END
 {
     [super renewGState];
     

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -679,7 +679,9 @@
         if (!TSUpdateCheck)
             return;
 
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
         Method methodToPatch = class_getInstanceMethod(TSUpdateCheck, @selector(alertDidEnd:returnCode:contextInfo:));
+IGNORE_WARNINGS_END
         if (!methodToPatch)
             return;
 

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -34,7 +34,7 @@
 #import "WebFrame.h"
 #import "WebFrameViewInternal.h"
 #import "WebHTMLRepresentation.h"
-#import "WebHTMLView.h"
+#import "WebHTMLViewInternal.h"
 #import "WebKitLogging.h"
 #import "WebNSFileManagerExtras.h"
 #import "WebNetscapePluginPackage.h"

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -22,6 +22,7 @@
 
 #import "WebDelegateImplementationCaching.h"
 #import "WebFrameInternal.h"
+#import "WebUIDelegatePrivate.h"
 #import <WebCore/IntRect.h>
 #import <WebCore/AXObjectCache.h>
 #import <WebCore/Chrome.h>

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebCachedFramePlatformData.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebCachedFramePlatformData.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebCachedFramePlatformData.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -26,6 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#import "WebHTMLViewInternal.h"
 #import <WebCore/CachedFramePlatformData.h>
 #import <wtf/ObjcRuntimeExtras.h>
 #import <wtf/RetainPtr.h>

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -160,8 +160,10 @@
     bool shouldReplaceWithGeneratedFileForUpload(const String& path, String &generatedFilename) final;
     String generateReplacementFile(const String& path) final;
 
+#if !PLATFORM(IOS)
     void elementDidFocus(WebCore::Element&) override;
     void elementDidBlur(WebCore::Element&) override;
+#endif
 
     bool shouldPaintEntireContents() const final;
 

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -38,6 +38,7 @@
 #import "WebDefaultUIDelegate.h"
 #import "WebDelegateImplementationCaching.h"
 #import "WebElementDictionary.h"
+#import "WebFormDelegate.h"
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
 #import "WebHTMLViewInternal.h"
@@ -876,6 +877,7 @@
     return [[m_webView _UIDelegateForwarder] webView:m_webView generateReplacementFile:path];
 }
 
+#if !PLATFORM(IOS)
 void WebChromeClient::elementDidFocus(WebCore::Element& element)
 {
     CallUIDelegate(m_webView, @selector(webView:formDidFocusNode:), kit(&element));
@@ -885,6 +887,7 @@
 {
     CallUIDelegate(m_webView, @selector(webView:formDidBlurNode:), kit(&element));
 }
+#endif
 
 bool WebChromeClient::selectItemWritingDirectionIsNatural()
 {

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -843,6 +843,7 @@
         return @selector(moveUp:);
     if (key == "Down")
         return @selector(moveDown:);
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     if (key == "U+001B")
         return @selector(cancel:);
     if (key == "U+0009") {
@@ -852,6 +853,7 @@
     }
     if (key == "Enter")
         return @selector(insertNewline:);
+IGNORE_WARNINGS_END
     return 0;
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -44,11 +44,12 @@
 #import "WebElementDictionary.h"
 #import "WebFormDelegate.h"
 #import "WebFrameInternal.h"
-#import "WebFrameLoadDelegate.h"
+#import "WebFrameLoadDelegatePrivate.h"
 #import "WebFrameNetworkingContext.h"
 #import "WebFrameViewInternal.h"
 #import "WebHTMLRepresentationPrivate.h"
 #import "WebHTMLViewInternal.h"
+#import "WebHistoryDelegate.h"
 #import "WebHistoryInternal.h"
 #import "WebHistoryItemInternal.h"
 #import "WebKitErrorsPrivate.h"
@@ -67,6 +68,7 @@
 #import "WebPolicyDelegatePrivate.h"
 #import "WebPreferences.h"
 #import "WebResourceLoadDelegate.h"
+#import "WebResourceLoadDelegatePrivate.h"
 #import "WebScriptWorldInternal.h"
 #import "WebSecurityOriginInternal.h"
 #import "WebUIDelegate.h"
@@ -1365,8 +1367,11 @@
         // FIXME: Use direction of title.
         if (implementations->setTitleFunc)
             CallHistoryDelegate(implementations->setTitleFunc, view, @selector(webView:updateHistoryTitle:forURL:inFrame:), (NSString *)title.string, (NSString *)url, m_webFrame.get());
-        else if (implementations->deprecatedSetTitleFunc)
+        else if (implementations->deprecatedSetTitleFunc) {
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
             CallHistoryDelegate(implementations->deprecatedSetTitleFunc, view, @selector(webView:updateHistoryTitle:forURL:), (NSString *)title.string, (NSString *)url);
+IGNORE_WARNINGS_END
+        }
         return;
     }
 
@@ -1749,7 +1754,9 @@
             element, WebPlugInContainingElementKey,
             nil];
         LOG(Plugins, "arguments:\n%@", arguments);
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     } else if ([viewFactory respondsToSelector:@selector(pluginViewWithArguments:)]) {
+IGNORE_WARNINGS_END
         arguments = [NSDictionary dictionaryWithObjectsAndKeys:
             baseURL, WebPluginBaseURLKey,
             attributes, WebPluginAttributesKey,

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -27,6 +27,7 @@
 
 #import "WebDelegateImplementationCaching.h"
 #import "WebFrameInternal.h"
+#import "WebHistoryDelegate.h"
 #import "WebHistoryInternal.h"
 #import "WebViewInternal.h"
 #import <WebCore/PageCache.h>

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationInternal.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationInternal.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationInternal.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -25,6 +25,8 @@
 
 #import "WebDeviceOrientation.h"
 
+#import "WebDeviceOrientationProvider.h"
+#import <WebCore/DeviceOrientationClientMock.h>
 #import <WebCore/DeviceOrientationData.h>
 #import <wtf/RefPtr.h>
 
@@ -43,3 +45,7 @@
 @end
 
 WebCore::DeviceOrientationData* core(WebDeviceOrientation*);
+
+@protocol WebDeviceOrientationProviderMock <WebDeviceOrientationProvider>
+- (void)setController:(WebCore::DeviceOrientationController*)controller;
+@end

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -67,15 +67,6 @@
 
 @end
 
-@implementation WebDeviceOrientationProviderMock (Internal)
-
-- (void)setController:(WebCore::DeviceOrientationController*)controller
-{
-   [m_internal setController:controller];
-}
-
-@end
-
 @implementation WebDeviceOrientationProviderMock
 
 + (WebDeviceOrientationProviderMock *)shared
@@ -119,4 +110,9 @@
     return [m_internal lastOrientation];
 }
 
+- (void)setController:(WebCore::DeviceOrientationController*)controller
+{
+   [m_internal setController:controller];
+}
+
 @end

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMockInternal.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMockInternal.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMockInternal.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#import "WebDeviceOrientationInternal.h"
 #import "WebDeviceOrientationProviderMock.h"
 #import <WebCore/DeviceOrientationClientMock.h>
 
@@ -41,6 +42,5 @@
 - (WebDeviceOrientation*)lastOrientation;
 @end
 
-@interface WebDeviceOrientationProviderMock (Internal)
-- (void)setController:(WebCore::DeviceOrientationController*)controller;
+@interface WebDeviceOrientationProviderMock () <WebDeviceOrientationProviderMock>
 @end

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -27,6 +27,7 @@
  */
 
 #import <WebKitLegacy/WebDocument.h>
+#import <WebKitLegacy/WebFrame.h>
 #import <WebKitLegacy/WebHTMLView.h>
 
 @class DOMDocument;
@@ -102,6 +103,7 @@
     @result Array of strings representing the supported MIME types.
 */
 + (NSArray *)supportedMIMETypes;
++ (Class)_representationClassForWebFrame:(WebFrame *)webFrame;
 @end
 
 @protocol WebPDFDocumentView <WebDocumentView>

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -580,7 +580,9 @@
 }
 
 // This object will be the parent of the web area in WK1, so it should not be ignored.
-- (BOOL)accessibilityIsIgnored 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
+- (BOOL)accessibilityIsIgnored
+IGNORE_WARNINGS_END
 {
     return NO;
 }

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -2900,9 +2900,10 @@
             return NO;
         }
     }
-
     if (action == @selector(changeSpelling:)
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
             || action == @selector(_changeSpellingFromMenu:)
+IGNORE_WARNINGS_END
             || action == @selector(checkSpelling:)
             || action == @selector(complete:)
             || action == @selector(pasteFont:))
@@ -2978,8 +2979,10 @@
     if (action == @selector(changeDocumentBackgroundColor:))
         return [[self _webView] isEditable] && [self _canEditRichly];
 
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     if (action == @selector(_ignoreSpellingFromMenu:)
             || action == @selector(_learnSpellingFromMenu:)
+IGNORE_WARNINGS_END
             || action == @selector(takeFindStringFromSelection:))
         return [self _hasSelection];
 
@@ -4251,6 +4254,7 @@
 #endif
 
 #if ENABLE(DRAG_SUPPORT) && PLATFORM(MAC)
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (void)dragImage:(NSImage *)dragImage
                at:(NSPoint)at
            offset:(NSSize)offset
@@ -4258,6 +4262,7 @@
        pasteboard:(NSPasteboard *)pasteboard
            source:(id)source
         slideBack:(BOOL)slideBack
+IGNORE_WARNINGS_END
 {
     ASSERT(self == [self _topHTMLView]);
     [pasteboard setString:@"" forType:[WebHTMLView _dummyPasteboardType]];
@@ -4290,7 +4295,9 @@
     [self release];
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
+IGNORE_WARNINGS_END
 {
     ASSERT(![self _webView] || [self _isTopHTMLView]);
     
@@ -4301,7 +4308,9 @@
     return (NSDragOperation)page->dragController().sourceDragOperation();
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
+IGNORE_WARNINGS_END
 {
     ASSERT(![self _webView] || [self _isTopHTMLView]);
     
@@ -4338,7 +4347,9 @@
         && [filename _webkit_hasCaseInsensitiveSuffix:@".jpg"]);
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
+IGNORE_WARNINGS_END
 {
     NSFileWrapper *wrapper = nil;
     NSURL *draggingElementURL = nil;
@@ -4996,7 +5007,9 @@
     [super flagsChanged:event];
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (id)accessibilityAttributeValue:(NSString*)attributeName
+IGNORE_WARNINGS_END
 {
     if ([attributeName isEqualToString: NSAccessibilityChildrenAttribute]) {
         id accTree = [[self _frame] accessibilityRoot];
@@ -5668,6 +5681,73 @@
 
 #endif
 
+#if PLATFORM(IOS)
+- (void)markedTextUpdate:(NSNotification *)notification
+{
+    NSString *text = [notification object];
+    NSRange range = NSMakeRange(0, [text length]);
+    [self setMarkedText:text selectedRange:range];
+}
+#endif
+
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
+- (void)setMarkedText:(id)string selectedRange:(NSRange)newSelRange
+IGNORE_WARNINGS_END
+{
+    [self _executeSavedKeypressCommands];
+
+#if PLATFORM(MAC)
+    BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]];
+    ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]);
+
+    LOG(TextInput, "setMarkedText:\"%@\" selectedRange:(%u, %u)", isAttributedString ? [string string] : string, newSelRange.location, newSelRange.length);
+#endif
+
+    // Use pointer to get parameters passed to us by the caller of interpretKeyEvents.
+    auto* parameters = _private->interpretKeyEventsParameters;
+
+    if (parameters) {
+        parameters->eventInterpretationHadSideEffects = true;
+        parameters->consumedByIM = false;
+    }
+    
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return;
+
+    if (![self _isEditable])
+        return;
+
+    Vector<CompositionUnderline> underlines;
+    NSString *text;
+    NSRange replacementRange = { NSNotFound, 0 };
+
+#if PLATFORM(MAC)
+    if (isAttributedString) {
+        // FIXME: We ignore most attributes from the string, so an input method cannot specify e.g. a font or a glyph variation.
+        text = [string string];
+        NSString *rangeString = [string attribute:NSTextInputReplacementRangeAttributeName atIndex:0 longestEffectiveRange:0 inRange:NSMakeRange(0, [text length])];
+        LOG(TextInput, "    ReplacementRange: %@", rangeString);
+        // The AppKit adds a 'secret' property to the string that contains the replacement range.
+        // The replacement range is the range of the text that should be replaced with the new string.
+        if (rangeString)
+            replacementRange = NSRangeFromString(rangeString);
+
+        extractUnderlines(string, underlines);
+    } else {
+        text = string;
+        underlines.append(CompositionUnderline(0, [text length], CompositionUnderlineColor::TextColor, Color::black, false));
+    }
+#else
+    text = string;
+#endif
+
+    if (replacementRange.location != NSNotFound)
+        [[self _frame] _selectNSRange:replacementRange];
+
+    coreFrame->editor().setComposition(text, underlines, newSelRange.location, NSMaxRange(newSelRange));
+}
+
 @end
 
 @implementation WebHTMLView (WebInternal)
@@ -6242,7 +6322,9 @@
 
 #if PLATFORM(MAC)
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSArray *)validAttributesForMarkedText
+IGNORE_WARNINGS_END
 {
     static NSArray *validAttributes = [[NSArray alloc] initWithObjects:
         NSUnderlineStyleAttributeName,
@@ -6283,7 +6365,9 @@
 
 #endif // PLATFORM(MAC)
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
+IGNORE_WARNINGS_END
 {
     [self _executeSavedKeypressCommands];
 
@@ -6307,7 +6391,9 @@
     return result;
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSRect)firstRectForCharacterRange:(NSRange)theRange
+IGNORE_WARNINGS_END
 {
     [self _executeSavedKeypressCommands];
 
@@ -6339,7 +6425,9 @@
     return resultRect;
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSRange)selectedRange
+IGNORE_WARNINGS_END
 {
     [self _executeSavedKeypressCommands];
 
@@ -6353,7 +6441,9 @@
     return result;
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSRange)markedRange
+IGNORE_WARNINGS_END
 {
     [self _executeSavedKeypressCommands];
 
@@ -6369,7 +6459,9 @@
 
 #if PLATFORM(MAC)
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSAttributedString *)attributedSubstringFromRange:(NSRange)nsRange
+IGNORE_WARNINGS_END
 {
     [self _executeSavedKeypressCommands];
 
@@ -6401,7 +6493,9 @@
 
 #endif
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (NSInteger)conversationIdentifier
+IGNORE_WARNINGS_END
 {
     return (NSInteger)self;
 }
@@ -6421,7 +6515,9 @@
     return result;
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (void)unmarkText
+IGNORE_WARNINGS_END
 {
     [self _executeSavedKeypressCommands];
 
@@ -6466,72 +6562,9 @@
 
 #endif
 
-- (void)setMarkedText:(id)string selectedRange:(NSRange)newSelRange
-{
-    [self _executeSavedKeypressCommands];
-
-#if PLATFORM(MAC)
-    BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]];
-    ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]);
-
-    LOG(TextInput, "setMarkedText:\"%@\" selectedRange:(%u, %u)", isAttributedString ? [string string] : string, newSelRange.location, newSelRange.length);
-#endif
-
-    // Use pointer to get parameters passed to us by the caller of interpretKeyEvents.
-    auto* parameters = _private->interpretKeyEventsParameters;
-
-    if (parameters) {
-        parameters->eventInterpretationHadSideEffects = true;
-        parameters->consumedByIM = false;
-    }
-    
-    Frame* coreFrame = core([self _frame]);
-    if (!coreFrame)
-        return;
-
-    if (![self _isEditable])
-        return;
-
-    Vector<CompositionUnderline> underlines;
-    NSString *text;
-    NSRange replacementRange = { NSNotFound, 0 };
-
-#if PLATFORM(MAC)
-    if (isAttributedString) {
-        // FIXME: We ignore most attributes from the string, so an input method cannot specify e.g. a font or a glyph variation.
-        text = [string string];
-        NSString *rangeString = [string attribute:NSTextInputReplacementRangeAttributeName atIndex:0 longestEffectiveRange:0 inRange:NSMakeRange(0, [text length])];
-        LOG(TextInput, "    ReplacementRange: %@", rangeString);
-        // The AppKit adds a 'secret' property to the string that contains the replacement range.
-        // The replacement range is the range of the text that should be replaced with the new string.
-        if (rangeString)
-            replacementRange = NSRangeFromString(rangeString);
-
-        extractUnderlines(string, underlines);
-    } else {
-        text = string;
-        underlines.append(CompositionUnderline(0, [text length], CompositionUnderlineColor::TextColor, Color::black, false));
-    }
-#else
-    text = string;
-#endif
-
-    if (replacementRange.location != NSNotFound)
-        [[self _frame] _selectNSRange:replacementRange];
-
-    coreFrame->editor().setComposition(text, underlines, newSelRange.location, NSMaxRange(newSelRange));
-}
-
-#if PLATFORM(IOS)
-- (void)markedTextUpdate:(NSNotification *)notification
-{
-    NSString *text = [notification object];
-    NSRange range = NSMakeRange(0, [text length]);
-    [self setMarkedText:text selectedRange:range];
-}
-#endif
-
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (void)doCommandBySelector:(SEL)selector
+IGNORE_WARNINGS_END
 {
     LOG(TextInput, "doCommandBySelector:\"%s\"", sel_getName(selector));
 
@@ -6589,7 +6622,9 @@
     }
 }
 
+IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 - (void)insertText:(id)string
+IGNORE_WARNINGS_END
 {
 #if PLATFORM(MAC)
     BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]];

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewInternal.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewInternal.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewInternal.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -57,6 +57,7 @@
 - (BOOL)_canSmartCopyOrDelete;
 
 - (WebFrame *)_frame;
+- (void)closeIfNotCurrentView;
 
 #if PLATFORM(MAC)
 - (void)_lookUpInDictionaryFromMenu:(id)sender;
@@ -98,6 +99,8 @@
 
 - (WebPluginController *)_pluginController;
 
+- (void)_executeSavedKeypressCommands;
+
 @end
 
 @interface WebHTMLView (RemovedAppKitSuperclassMethods)

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebJSPDFDoc.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebJSPDFDoc.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebJSPDFDoc.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -28,6 +28,7 @@
 #import "WebDataSource.h"
 #import "WebDelegateImplementationCaching.h"
 #import "WebFrame.h"
+#import "WebUIDelegate.h"
 #import "WebView.h"
 #import <_javascript_Core/JSObjectRef.h>
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -40,7 +40,6 @@
 
 @interface WebPDFView : NSView <PDFViewDelegate, WebDocumentView, WebDocumentSearching, WebDocumentIncrementalSearching, WebMultipleTextMatches, WebDocumentSelection, WebDocumentElement, WebDocumentPDF, _WebDocumentViewState, _WebDocumentZooming>
 {
-    NSView *previewView;
     PDFView *PDFSubview;
     NSString *path;
     BOOL firstResponderIsPDFDocumentView;

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -84,27 +84,6 @@
 
 extern "C" NSString *_NSPathForSystemFramework(NSString *framework);
 
-@interface WebPDFView (FileInternal)
-+ (Class)_PDFPreviewViewClass;
-+ (Class)_PDFViewClass;
-- (void)_applyPDFDefaults;
-- (BOOL)_canLookUpInDictionary;
-- (NSClipView *)_clipViewForPDFDocumentView;
-- (NSEvent *)_fakeKeyEventWithFunctionKey:(unichar)functionKey;
-- (NSMutableArray *)_menuItemsFromPDFKitForEvent:(NSEvent *)theEvent;
-- (PDFSelection *)_nextMatchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag fromSelection:(PDFSelection *)initialSelection startInSelection:(BOOL)startInSelection;
-- (void)_openWithFinder:(id)sender;
-- (NSString *)_path;
-- (void)_PDFDocumentViewMightHaveScrolled:(NSNotification *)notification;
-- (BOOL)_pointIsInSelection:(NSPoint)point;
-- (NSAttributedString *)_scaledAttributedString:(NSAttributedString *)unscaledAttributedString;
-- (void)_setTextMatches:(NSArray *)array;
-- (NSString *)_temporaryPDFDirectoryPath;
-- (void)_trackFirstResponder;
-- (void)_updatePreferencesSoon;
-- (NSSet *)_visiblePDFPages;
-@end;
-
 @interface NSView ()
 - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView;
 - (void)_recursiveDisplayAllDirtyWithLockFocus:(BOOL)needsLockFocus visRect:(NSRect)visRect;
@@ -211,7 +190,6 @@
 - (void)dealloc
 {
     [dataSource release];
-    [previewView release];
     [PDFSubview setDelegate:nil];
     [PDFSubview release];
     [path release];
@@ -327,31 +305,12 @@
     if (self) {
         [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
         
-        Class previewViewClass = [[self class] _PDFPreviewViewClass];
-        
-        // We might not have found a previewViewClass, but if we did find it
-        // then we should be able to create an instance.
-        if (previewViewClass) {
-            previewView = [[previewViewClass alloc] initWithFrame:frame];
-            ASSERT(previewView);
-        }
-        
-        NSView *topLevelPDFKitView = nil;
-        if (previewView) {
-            // We'll retain the PDFSubview here so that it is equally retained in all
-            // code paths. That way we don't need to worry about conditionally releasing
-            // it later.
-            PDFSubview = [[previewView performSelector:@selector(pdfView)] retain];
-            topLevelPDFKitView = previewView;
-        } else {
-            PDFSubview = [[[[self class] _PDFViewClass] alloc] initWithFrame:frame];
-            topLevelPDFKitView = PDFSubview;
-        }
-        
+        PDFSubview = [[[[self class] _PDFViewClass] alloc] initWithFrame:frame];
+
         ASSERT(PDFSubview);
         
-        [topLevelPDFKitView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
-        [self addSubview:topLevelPDFKitView];
+        [PDFSubview setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+        [self addSubview:PDFSubview];
         
         [PDFSubview setDelegate:self];
         written = NO;
@@ -1060,24 +1019,6 @@
     CallUIDelegate([self _webView], @selector(webView:saveFrameView:showingPanel:), [[dataSource webFrame] frameView], NO);
 }
 
-@end
-
-@implementation WebPDFView (FileInternal)
-
-+ (Class)_PDFPreviewViewClass
-{
-    static Class PDFPreviewViewClass = nil;
-    static BOOL checkedForPDFPreviewViewClass = NO;
-    
-    if (!checkedForPDFPreviewViewClass) {
-        checkedForPDFPreviewViewClass = YES;
-        PDFPreviewViewClass = [[WebPDFView PDFKitBundle] classNamed:@"PDFPreviewView"];
-    }
-    
-    // This class might not be available; callers need to deal with a nil return here.
-    return PDFPreviewViewClass;
-}
-
 + (Class)_PDFViewClass
 {
     static Class PDFViewClass = nil;
@@ -1116,7 +1057,9 @@
 
 - (BOOL)_canLookUpInDictionary
 {
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     return [PDFSubview respondsToSelector:@selector(_searchInDictionary:)];
+IGNORE_WARNINGS_END
 }
 
 - (NSClipView *)_clipViewForPDFDocumentView
@@ -1152,8 +1095,10 @@
     // This method is used by WebKit's context menu item. Here we map to the method that
     // PDFView uses. Since the PDFView method isn't API, and isn't available on all versions
     // of PDFKit, we use performSelector after a respondsToSelector check, rather than calling it directly.
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     if ([self _canLookUpInDictionary])
         [PDFSubview performSelector:@selector(_searchInDictionary:) withObject:sender];
+IGNORE_WARNINGS_END
 }
 
 static void removeUselessMenuItemSeparators(NSMutableArray *menuItems)
@@ -1185,6 +1130,7 @@
 {
     NSMutableArray *copiedItems = [NSMutableArray array];
     NSDictionary *actionsToTags = [[NSDictionary alloc] initWithObjectsAndKeys:
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
         [NSNumber numberWithInt:WebMenuItemPDFActualSize], NSStringFromSelector(@selector(_setActualSize:)),
         [NSNumber numberWithInt:WebMenuItemPDFZoomIn], NSStringFromSelector(@selector(zoomIn:)),
         [NSNumber numberWithInt:WebMenuItemPDFZoomOut], NSStringFromSelector(@selector(zoomOut:)),
@@ -1196,6 +1142,7 @@
         [NSNumber numberWithInt:WebMenuItemPDFContinuous], NSStringFromSelector(@selector(_toggleContinuous:)),
         [NSNumber numberWithInt:WebMenuItemPDFNextPage], NSStringFromSelector(@selector(goToNextPage:)),
         [NSNumber numberWithInt:WebMenuItemPDFPreviousPage], NSStringFromSelector(@selector(goToPreviousPage:)),
+IGNORE_WARNINGS_END
         nil];
     
     // Leave these menu items out, since WebKit inserts equivalent ones. Note that we leave out PDFKit's "Look Up in Dictionary"
@@ -1202,9 +1149,11 @@
     // item here because WebKit already includes an item with the same title and purpose. We map WebKit's to PDFKit's 
     // "Look Up in Dictionary" via the implementation of -[WebPDFView _lookUpInDictionaryFromMenu:].
     NSSet *unwantedActions = [[NSSet alloc] initWithObjects:
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
                               NSStringFromSelector(@selector(_searchInSpotlight:)),
                               NSStringFromSelector(@selector(_searchInGoogle:)),
                               NSStringFromSelector(@selector(_searchInDictionary:)),
+IGNORE_WARNINGS_END
                               NSStringFromSelector(@selector(copy:)),
                               nil];
     

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -265,8 +265,13 @@
 - (void)webView:(WebView *)webView decidePolicyForUserMediaRequestFromOrigin:(WebSecurityOrigin *)origin listener:(id<WebAllowDenyPolicyListener>)listener;
 - (void)webView:(WebView *)webView checkPolicyForUserMediaRequestFromOrigin:(WebSecurityOrigin *)origin listener:(id<WebAllowDenyPolicyListener>)listener;
 
+#if !TARGET_OS_IPHONE
+- (void)webView:(WebView *)sender formDidFocusNode:(DOMNode *)node;
+- (void)webView:(WebView *)sender formDidBlurNode:(DOMNode *)node;
+#else
 - (void)webView:(WebView *)sender elementDidFocusNode:(DOMNode *)node;
 - (void)webView:(WebView *)sender elementDidBlurNode:(DOMNode *)node;
+#endif
 
 /*!
     @method webView:printFrame:
@@ -278,9 +283,10 @@
 - (void)webView:(WebView *)sender printFrame:(WebFrame *)frame;
 
 #if ENABLE_FULLSCREEN_API
-- (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element;
-- (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element;
-- (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element;
+- (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element withKeyboard:(BOOL)withKeyboard;
+- (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element listener:(id <WebKitFullScreenListener>)listener;
+- (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element listener:(id <WebKitFullScreenListener>)listener;
+- (void)webView:(WebView *)sender closeFullScreenWithListener:(id <WebKitFullScreenListener>)listener;
 #endif
 
 - (void)webView:(WebView *)sender didDrawFrame:(WebFrame *)frame;

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2018-10-04 20:36:56 UTC (rev 236846)
@@ -64,6 +64,7 @@
 #import "WebEditorClient.h"
 #import "WebFormDelegatePrivate.h"
 #import "WebFrameInternal.h"
+#import "WebFrameLoadDelegatePrivate.h"
 #import "WebFrameLoaderClient.h"
 #import "WebFrameNetworkingContext.h"
 #import "WebFrameViewInternal.h"
@@ -71,6 +72,7 @@
 #import "WebGeolocationPositionInternal.h"
 #import "WebHTMLRepresentation.h"
 #import "WebHTMLViewInternal.h"
+#import "WebHistoryDelegate.h"
 #import "WebHistoryItemInternal.h"
 #import "WebIconDatabase.h"
 #import "WebInspector.h"
@@ -99,6 +101,8 @@
 #import "WebPreferenceKeysPrivate.h"
 #import "WebPreferencesPrivate.h"
 #import "WebProgressTrackerClient.h"
+#import "WebResourceLoadDelegate.h"
+#import "WebResourceLoadDelegatePrivate.h"
 #import "WebResourceLoadScheduler.h"
 #import "WebScriptDebugDelegate.h"
 #import "WebScriptWorldInternal.h"
@@ -392,9 +396,12 @@
 macro(capitalizeWord) \
 macro(centerSelectionInVisibleArea) \
 macro(changeAttributes) \
+_Pragma("clang diagnostic push") \
+_Pragma("clang diagnostic ignored \"-Wundeclared-selector\"") \
 macro(changeBaseWritingDirection) \
 macro(changeBaseWritingDirectionToLTR) \
 macro(changeBaseWritingDirectionToRTL) \
+_Pragma("clang diagnostic pop") \
 macro(changeColor) \
 macro(changeDocumentBackgroundColor) \
 macro(changeFont) \
@@ -503,7 +510,10 @@
 macro(subscript) \
 macro(superscript) \
 macro(swapWithMark) \
+_Pragma("clang diagnostic push") \
+_Pragma("clang diagnostic ignored \"-Wundeclared-selector\"") \
 macro(takeFindStringFromSelection) \
+_Pragma("clang diagnostic pop") \
 macro(toggleBaseWritingDirection) \
 macro(transpose) \
 macro(underline) \
@@ -510,7 +520,10 @@
 macro(unscript) \
 macro(uppercaseWord) \
 macro(yank) \
+_Pragma("clang diagnostic push") \
+_Pragma("clang diagnostic ignored \"-Wundeclared-selector\"") \
 macro(yankAndSelect) \
+_Pragma("clang diagnostic pop") \
 
 #define WebKitOriginalTopPrintingMarginKey @"WebKitOriginalTopMargin"
 #define WebKitOriginalBottomPrintingMarginKey @"WebKitOriginalBottomMargin"
@@ -727,18 +740,6 @@
 @end
 #endif // ENABLE(DATA_INTERACTION)
 
-@interface WebView (WebFileInternal)
-#if !PLATFORM(IOS)
-- (float)_deviceScaleFactor;
-#endif
-- (BOOL)_isLoading;
-- (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point;
-- (WebFrame *)_focusedFrame;
-+ (void)_preflightSpellChecker;
-- (BOOL)_continuousCheckingAllowed;
-- (NSResponder *)_responderForResponderOperations;
-@end
-
 NSString *WebElementDOMNodeKey =            @"WebElementDOMNode";
 NSString *WebElementFrameKey =              @"WebElementFrame";
 NSString *WebElementImageKey =              @"WebElementImage";
@@ -1097,6 +1098,15 @@
 
 #endif // HAVE(TOUCH_BAR)
 
+@interface WebView ()
+#if PLATFORM(IOS)
+- (void)_wakWindowScreenScaleChanged:(NSNotification *)notification;
+- (void)_wakWindowVisibilityChanged:(NSNotification *)notification;
+#else
+- (float)_deviceScaleFactor;
+#endif
+@end
+
 @implementation WebView (AllWebViews)
 
 static CFSetCallBacks NonRetainingSetCallbacks = {
@@ -3339,7 +3349,9 @@
     cache->navigatedFunc = getMethod(delegate, @selector(webView:didNavigateWithNavigationData:inFrame:));
     cache->clientRedirectFunc = getMethod(delegate, @selector(webView:didPerformClientRedirectFromURL:toURL:inFrame:));
     cache->serverRedirectFunc = getMethod(delegate, @selector(webView:didPerformServerRedirectFromURL:toURL:inFrame:));
+IGNORE_WARNINGS_BEGIN("undeclared-selector")
     cache->deprecatedSetTitleFunc = getMethod(delegate, @selector(webView:updateHistoryTitle:forURL:));
+IGNORE_WARNINGS_END
     cache->setTitleFunc = getMethod(delegate, @selector(webView:updateHistoryTitle:forURL:inFrame:));
     cache->populateVisitedLinksFunc = getMethod(delegate, @selector(populateVisitedLinksForWebView:));
 }
@@ -3397,11 +3409,6 @@
     return _private->editingDelegateForwarder;
 }
 
-- (void)_closeWindow
-{
-    [[self _UIDelegateForwarder] webViewClose:self];
-}
-
 + (void)_unregisterViewClassAndRepresentationClassForMIMEType:(NSString *)MIMEType
 {
     [[WebFrameView _viewTypesAllowImageTypeOmission:NO] removeObjectForKey:MIMEType];
@@ -7344,6 +7351,155 @@
 
 #endif // HAVE(TOUCH_BAR)
 
+static WebFrameView *containingFrameView(NSView *view)
+{
+    while (view && ![view isKindOfClass:[WebFrameView class]])
+        view = [view superview];
+    return (WebFrameView *)view;
+}
+
+#if !PLATFORM(IOS)
+- (float)_deviceScaleFactor
+{
+    if (_private->customDeviceScaleFactor != 0)
+        return _private->customDeviceScaleFactor;
+
+    NSWindow *window = [self window];
+    NSWindow *hostWindow = [self hostWindow];
+    if (window)
+        return [window backingScaleFactor];
+    if (hostWindow)
+        return [hostWindow backingScaleFactor];
+    return [[NSScreen mainScreen] backingScaleFactor];
+}
+#endif
+
++ (BOOL)_didSetCacheModel
+{
+    return s_didSetCacheModel;
+}
+
++ (WebCacheModel)_maxCacheModelInAnyInstance
+{
+    WebCacheModel cacheModel = WebCacheModelDocumentViewer;
+    NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];
+    while (WebPreferences *preferences = [[enumerator nextObject] preferences])
+        cacheModel = std::max(cacheModel, [preferences cacheModel]);
+    return cacheModel;
+}
+
++ (void)_cacheModelChangedNotification:(NSNotification *)notification
+{
+#if PLATFORM(IOS)
+    // This needs to happen on the Web Thread
+    WebThreadRun(^{
+#endif
+    WebPreferences *preferences = (WebPreferences *)[notification object];
+    ASSERT([preferences isKindOfClass:[WebPreferences class]]);
+
+    WebCacheModel cacheModel = [preferences cacheModel];
+    if (![self _didSetCacheModel] || cacheModel > [self _cacheModel])
+        [self _setCacheModel:cacheModel];
+    else if (cacheModel < [self _cacheModel])
+        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
+#if PLATFORM(IOS)
+    });
+#endif
+}
+
++ (void)_preferencesRemovedNotification:(NSNotification *)notification
+{
+    WebPreferences *preferences = (WebPreferences *)[notification object];
+    ASSERT([preferences isKindOfClass:[WebPreferences class]]);
+
+    if ([preferences cacheModel] == [self _cacheModel])
+        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
+}
+
+- (WebFrame *)_focusedFrame
+{
+    NSResponder *resp = [[self window] firstResponder];
+    if (resp && [resp isKindOfClass:[NSView class]] && [(NSView *)resp isDescendantOf:[[self mainFrame] frameView]]) {
+        WebFrameView *frameView = containingFrameView((NSView *)resp);
+        ASSERT(frameView != nil);
+        return [frameView webFrame];
+    }
+
+    return nil;
+}
+
+- (BOOL)_isLoading
+{
+    WebFrame *mainFrame = [self mainFrame];
+    return [[mainFrame _dataSource] isLoading]
+        || [[mainFrame provisionalDataSource] isLoading];
+}
+
+- (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point
+{
+    if (_private->closed)
+        return nil;
+#if !PLATFORM(IOS)
+    NSView *view = [self hitTest:[[self superview] convertPoint:point fromView:nil]];
+#else
+    //[WebView superview] on iOS is nil, don't do a convertPoint
+    NSView *view = [self hitTest:point];
+#endif
+    if (![view isDescendantOf:[[self mainFrame] frameView]])
+        return nil;
+    WebFrameView *frameView = containingFrameView(view);
+    ASSERT(frameView);
+    return frameView;
+}
+
++ (void)_preflightSpellCheckerNow:(id)sender
+{
+#if !PLATFORM(IOS)
+    [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer];
+#endif
+}
+
++ (void)_preflightSpellChecker
+{
+#if !PLATFORM(IOS)
+    // As AppKit does, we wish to delay tickling the shared spellchecker into existence on application launch.
+    if ([NSSpellChecker sharedSpellCheckerExists]) {
+        [self _preflightSpellCheckerNow:self];
+    } else {
+        [self performSelector:@selector(_preflightSpellCheckerNow:) withObject:self afterDelay:2.0];
+    }
+#endif
+}
+
+- (BOOL)_continuousCheckingAllowed
+{
+    static BOOL allowContinuousSpellChecking = YES;
+    static BOOL readAllowContinuousSpellCheckingDefault = NO;
+    if (!readAllowContinuousSpellCheckingDefault) {
+        if ([[NSUserDefaults standardUserDefaults] objectForKey:@"NSAllowContinuousSpellChecking"]) {
+            allowContinuousSpellChecking = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSAllowContinuousSpellChecking"];
+        }
+        readAllowContinuousSpellCheckingDefault = YES;
+    }
+    return allowContinuousSpellChecking;
+}
+
+- (NSResponder *)_responderForResponderOperations
+{
+    NSResponder *responder = [[self window] firstResponder];
+    WebFrameView *mainFrameView = [[self mainFrame] frameView];
+
+    // If the current responder is outside of the webview, use our main frameView or its
+    // document view. We also do this for subviews of self that are siblings of the main
+    // frameView since clients might insert non-webview-related views there (see 4552713).
+    if (responder != self && ![mainFrameView _web_firstResponderIsSelfOrDescendantView]) {
+        responder = [mainFrameView documentView];
+        if (!responder)
+            responder = mainFrameView;
+    }
+    return responder;
+}
+
 @end
 
 @implementation WebView (WebIBActions)
@@ -8676,33 +8832,6 @@
     return coreFrame->editor().simplifyMarkup(coreStartNode, core(endNode));
 }
 
-@end
-
-static WebFrameView *containingFrameView(NSView *view)
-{
-    while (view && ![view isKindOfClass:[WebFrameView class]])
-        view = [view superview];
-    return (WebFrameView *)view;    
-}
-
-@implementation WebView (WebFileInternal)
-
-#if !PLATFORM(IOS)
-- (float)_deviceScaleFactor
-{
-    if (_private->customDeviceScaleFactor != 0)
-        return _private->customDeviceScaleFactor;
-
-    NSWindow *window = [self window];
-    NSWindow *hostWindow = [self hostWindow];
-    if (window)
-        return [window backingScaleFactor];
-    if (hostWindow)
-        return [hostWindow backingScaleFactor];
-    return [[NSScreen mainScreen] backingScaleFactor];
-}
-#endif
-
 + (void)_setCacheModel:(WebCacheModel)cacheModel
 {
     if (s_didSetCacheModel && cacheModel == s_cacheModel)
@@ -8931,133 +9060,7 @@
     return s_cacheModel;
 }
 
-+ (BOOL)_didSetCacheModel
-{
-    return s_didSetCacheModel;
-}
-
-+ (WebCacheModel)_maxCacheModelInAnyInstance
-{
-    WebCacheModel cacheModel = WebCacheModelDocumentViewer;
-    NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];
-    while (WebPreferences *preferences = [[enumerator nextObject] preferences])
-        cacheModel = std::max(cacheModel, [preferences cacheModel]);
-    return cacheModel;
-}
-
-+ (void)_cacheModelChangedNotification:(NSNotification *)notification
-{
-#if PLATFORM(IOS)
-    // This needs to happen on the Web Thread
-    WebThreadRun(^{
-#endif    
-    WebPreferences *preferences = (WebPreferences *)[notification object];
-    ASSERT([preferences isKindOfClass:[WebPreferences class]]);
-
-    WebCacheModel cacheModel = [preferences cacheModel];
-    if (![self _didSetCacheModel] || cacheModel > [self _cacheModel])
-        [self _setCacheModel:cacheModel];
-    else if (cacheModel < [self _cacheModel])
-        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
-#if PLATFORM(IOS)
-    });
-#endif
-}
-
-+ (void)_preferencesRemovedNotification:(NSNotification *)notification
-{
-    WebPreferences *preferences = (WebPreferences *)[notification object];
-    ASSERT([preferences isKindOfClass:[WebPreferences class]]);
-
-    if ([preferences cacheModel] == [self _cacheModel])
-        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
-}
-
-- (WebFrame *)_focusedFrame
-{
-    NSResponder *resp = [[self window] firstResponder];
-    if (resp && [resp isKindOfClass:[NSView class]] && [(NSView *)resp isDescendantOf:[[self mainFrame] frameView]]) {
-        WebFrameView *frameView = containingFrameView((NSView *)resp);
-        ASSERT(frameView != nil);
-        return [frameView webFrame];
-    }
-    
-    return nil;
-}
-
-- (BOOL)_isLoading
-{
-    WebFrame *mainFrame = [self mainFrame];
-    return [[mainFrame _dataSource] isLoading]
-        || [[mainFrame provisionalDataSource] isLoading];
-}
-
-- (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point
-{
-    if (_private->closed)
-        return nil;
 #if !PLATFORM(IOS)
-    NSView *view = [self hitTest:[[self superview] convertPoint:point fromView:nil]];
-#else
-    //[WebView superview] on iOS is nil, don't do a convertPoint
-    NSView *view = [self hitTest:point];    
-#endif
-    if (![view isDescendantOf:[[self mainFrame] frameView]])
-        return nil;
-    WebFrameView *frameView = containingFrameView(view);
-    ASSERT(frameView);
-    return frameView;
-}
-
-+ (void)_preflightSpellCheckerNow:(id)sender
-{
-#if !PLATFORM(IOS)
-    [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer];
-#endif
-}
-
-+ (void)_preflightSpellChecker
-{
-#if !PLATFORM(IOS)
-    // As AppKit does, we wish to delay tickling the shared spellchecker into existence on application launch.
-    if ([NSSpellChecker sharedSpellCheckerExists]) {
-        [self _preflightSpellCheckerNow:self];
-    } else {
-        [self performSelector:@selector(_preflightSpellCheckerNow:) withObject:self afterDelay:2.0];
-    }
-#endif
-}
-
-- (BOOL)_continuousCheckingAllowed
-{
-    static BOOL allowContinuousSpellChecking = YES;
-    static BOOL readAllowContinuousSpellCheckingDefault = NO;
-    if (!readAllowContinuousSpellCheckingDefault) {
-        if ([[NSUserDefaults standardUserDefaults] objectForKey:@"NSAllowContinuousSpellChecking"]) {
-            allowContinuousSpellChecking = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSAllowContinuousSpellChecking"];
-        }
-        readAllowContinuousSpellCheckingDefault = YES;
-    }
-    return allowContinuousSpellChecking;
-}
-
-- (NSResponder *)_responderForResponderOperations
-{
-    NSResponder *responder = [[self window] firstResponder];
-    WebFrameView *mainFrameView = [[self mainFrame] frameView];
-    
-    // If the current responder is outside of the webview, use our main frameView or its
-    // document view. We also do this for subviews of self that are siblings of the main
-    // frameView since clients might insert non-webview-related views there (see 4552713).
-    if (responder != self && ![mainFrameView _web_firstResponderIsSelfOrDescendantView]) {
-        responder = [mainFrameView documentView];
-        if (!responder)
-            responder = mainFrameView;
-    }
-    return responder;
-}
-
-#if !PLATFORM(IOS)
 - (void)_openFrameInNewWindowFromMenu:(NSMenuItem *)sender
 {
     ASSERT_ARG(sender, [sender isKindOfClass:[NSMenuItem class]]);
@@ -10063,6 +10066,11 @@
     [self _updateVisibilityState];
 }
 
+- (void)_closeWindow
+{
+    [[self _UIDelegateForwarder] webViewClose:self];
+}
+
 @end
 
 @implementation WebView (WebViewDeviceOrientation)

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -148,6 +148,8 @@
 
 - (void)_windowVisibilityChanged:(NSNotification *)notification;
 
+- (void)_closeWindow;
+
 @end
 
 #endif

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h (236845 => 236846)


--- trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h	2018-10-04 20:27:45 UTC (rev 236845)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h	2018-10-04 20:36:56 UTC (rev 236846)
@@ -1085,6 +1085,10 @@
 
 - (void)webView:(WebView *)sender didLayout:(WebLayoutMilestones)milestones;
 
+#if TARGET_OS_IPHONE
+- (void)webThreadWebView:(WebView *)sender didLayout:(WebLayoutMilestones)milestones;
+#endif
+
 // For implementing the WebInspector's test harness
 - (void)webView:(WebView *)webView didClearInspectorWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to