Changeset 236846 in webkit
- Timestamp:
- Oct 4, 2018, 1:36:56 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r236832 r236846 1 2018-10-04 Dan Bernstein <mitz@apple.com> 2 3 PAL change for the WebKitLegacy part of [Xcode] Update some build settings as recommended by Xcode 10 4 https://bugs.webkit.org/show_bug.cgi?id=190250 5 6 Reviewed by Andy Estes. 7 8 * pal/spi/mac/NSWindowSPI.h: Added a private API declaration. 9 1 10 2018-10-04 Dan Bernstein <mitz@apple.com> 2 11 -
trunk/Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h
r221473 r236846 39 39 40 40 - (id)_newFirstResponderAfterResigning; 41 - (void)_setCursorForMouseLocation:(NSPoint)point; 41 42 42 43 @end -
trunk/Source/WebInspectorUI/ChangeLog
r236845 r236846 1 2018-10-04 Dan Bernstein <mitz@apple.com> 2 3 WebInspectorUI part of [Xcode] Update some build settings as recommended by Xcode 10 4 https://bugs.webkit.org/show_bug.cgi?id=190250 5 6 Reviewed by Andy Estes. 7 8 * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_INFINITE_RECURSION, 9 CLANG_WARN_SUSPICIOUS_MOVE, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, and 10 CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF. 11 12 * WebInspectorUI.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck. 13 1 14 2018-10-04 Devin Rousso <drousso@apple.com> 2 15 -
trunk/Source/WebInspectorUI/Configurations/Base.xcconfig
r235412 r236846 20 20 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 21 21 CLANG_WARN_BOOL_CONVERSION = YES; 22 CLANG_WARN_COMMA = YES; 22 23 CLANG_WARN_CONSTANT_CONVERSION = YES; 23 24 CLANG_WARN_CXX0X_EXTENSIONS = NO; 24 25 CLANG_WARN_EMPTY_BODY = YES; 25 26 CLANG_WARN_ENUM_CONVERSION = YES; 27 CLANG_WARN_INFINITE_RECURSION = YES; 26 28 CLANG_WARN_INT_CONVERSION = YES; 27 29 CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 28 30 CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 29 31 CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 32 CLANG_WARN_SUSPICIOUS_MOVE = YES; 30 33 CLANG_WARN_STRICT_PROTOTYPES = YES; 31 34 CLANG_WARN_UNREACHABLE_CODE = YES; … … 53 56 GCC_WARN_ABOUT_RETURN_TYPE = YES; 54 57 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 58 CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 55 59 GCC_WARN_UNDECLARED_SELECTOR = YES; 60 CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 56 61 GCC_WARN_UNINITIALIZED_AUTOS = YES 57 62 GCC_WARN_UNUSED_FUNCTION = YES; -
trunk/Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj
r205692 r236846 105 105 attributes = { 106 106 LastSwiftUpdateCheck = 0700; 107 LastUpgradeCheck = 0700;107 LastUpgradeCheck = 1000; 108 108 ORGANIZATIONNAME = Apple; 109 109 }; -
trunk/Source/WebKitLegacy/ChangeLog
r236773 r236846 1 2018-10-04 Dan Bernstein <mitz@apple.com> 2 3 WebKitLegacy part of [Xcode] Update some build settings as recommended by Xcode 10 4 https://bugs.webkit.org/show_bug.cgi?id=190250 5 6 Reviewed by Andy Estes. 7 8 * WebKitLegacy.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck. 9 1 10 2018-10-01 Dean Jackson <dino@apple.com> 2 11 -
trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
r236773 r236846 3223 3223 attributes = { 3224 3224 LastSwiftUpdateCheck = 0700; 3225 LastUpgradeCheck = 0700;3225 LastUpgradeCheck = 1000; 3226 3226 }; 3227 3227 buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKitLegacy" */; -
trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm
r229963 r236846 31 31 #import "WebGeolocationCoreLocationProvider.h" 32 32 #import <WebGeolocationPosition.h> 33 #import <WebUIDelegatePrivate.h> 33 34 #import <WebCore/GeolocationPosition.h> 34 35 #import <WebCore/WebCoreThread.h> -
trunk/Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm
r236066 r236846 53 53 using namespace WebCore; 54 54 55 @interface WebPDFView (Secrets)56 + (Class)_representationClassForWebFrame:(WebFrame *)webFrame;57 @end58 59 55 #pragma mark Constants 60 56 -
trunk/Source/WebKitLegacy/mac/Carbon/CarbonWindowAdapter.mm
r235935 r236846 716 716 717 717 // Do the right thing for a Carbon window. 718 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 718 719 - (id)initWithCoder:(NSCoder *)coder 720 IGNORE_WARNINGS_END 719 721 { 720 722 … … 818 820 UInt32 hiCommandID = 0; 819 821 822 IGNORE_WARNINGS_BEGIN("undeclared-selector") 820 823 // Pretty simple, if tedious. 821 824 if (inActionSelector == @selector(clear:)) … … 833 836 else if (inActionSelector == @selector(undo:)) 834 837 hiCommandID = kHICommandUndo; 838 IGNORE_WARNINGS_END 835 839 836 840 // Done. -
trunk/Source/WebKitLegacy/mac/ChangeLog
r236840 r236846 1 2018-10-04 Dan Bernstein <mitz@apple.com> 2 3 WebKitLegacy part of [Xcode] Update some build settings as recommended by Xcode 10 4 https://bugs.webkit.org/show_bug.cgi?id=190250 5 6 Reviewed by Andy Estes. 7 8 * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF, 9 CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, and CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED. 10 Also enabled GCC_WARN_UNDECLARED_SELECTOR by deleting the line that set it to NO, which let 11 an earlier line set it to YES. 12 13 Enabling -Wundeclared-selector exposed some long-standing mistakes and required the most 14 changes below. 15 16 * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Imported an internal header that 17 provides some missing method declarations. 18 19 * Misc/WebDownload.mm: 20 (-[WebDownload initWithRequest:delegate:]): Suppressed warning about this implementation of 21 a deprecated method. 22 23 * Misc/WebIconDatabase.mm: Suppressed warning around our implementation of a deprecated class. 24 25 * Misc/WebNSObjectExtras.mm: Declare a category that is implemented in this file, because 26 other code in the file uses a method from it. 27 28 * Plugins/WebBaseNetscapePluginView.mm: 29 (-[WebBaseNetscapePluginView renewGState]): Suppressed warning about this implementation of 30 a deprecated method. 31 32 * Plugins/WebPluginController.mm: 33 (installFlip4MacPlugInWorkaroundIfNecessary): Suppressed the undeclared selector warning 34 around use of a selector that may be present in some WebKit client. 35 36 * Plugins/WebPluginDatabase.mm: Imported an internal header that provides some missing 37 method declarations. 38 39 * WebCoreSupport/PopupMenuMac.mm: Imported a header that delcares delegate methods we call 40 from here. 41 42 * WebCoreSupport/WebCachedFramePlatformData.h: Imported an internal header that provides some 43 missing method declarations. 44 45 * WebCoreSupport/WebChromeClient.mm: Imported a header that declares delegate methods we call 46 from here. 47 48 * WebCoreSupport/WebFrameLoaderClient.mm: Imported headers that declare delegate methods we 49 call from here. 50 (WebFrameLoaderClient::setTitle): Suppressed the undeclared selector warning around use of 51 an obsolete delegate method for binary compatibility. 52 (pluginView): Ditto. 53 54 * WebCoreSupport/WebVisitedLinkStore.mm: Imported a header that declares delegate methods we 55 call from here. 56 57 * WebView/WebDeviceOrientationInternal.h: Declared -setController in a new 58 WebDeviceOrientationProviderMock protocol. 59 60 * WebView/WebDeviceOrientationProviderMock.mm: 61 (-[WebDeviceOrientationProviderMock setController:]): Moved from an internal category to the 62 main @implementation. 63 64 * WebView/WebDeviceOrientationProviderMockInternal.h: Declared that 65 WebDeviceOrientationProviderMock conforms to WebDeviceOrientationProviderMock. 66 67 * WebView/WebDynamicScrollBarsView.mm: 68 (-[WebDynamicScrollBarsView accessibilityIsIgnored]): Suppressed warning about this implementation 69 of a deprecated method. 70 71 * WebView/WebHTMLView.mm: 72 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Suppressed the undeclared 73 selector warning around action methods that are not declared anywhere in WebKit. 74 75 (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Suppressed warning 76 about implementing this deprecated method. 77 (-[WebHTMLView draggingSourceOperationMaskForLocal:]): Ditto. 78 (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto. 79 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto. 80 (-[WebHTMLView accessibilityAttributeValue:]): Ditto. 81 (-[WebHTMLView characterIndexForPoint:]): Ditto. 82 (-[WebHTMLView firstRectForCharacterRange:]): Ditto. 83 (-[WebHTMLView attributedSubstringFromRange:]): Ditto. 84 (-[WebHTMLView setMarkedText:selectedRange:]): Ditto. 85 (-[WebHTMLView doCommandBySelector:]): Ditto. 86 (-[WebHTMLView insertText:]): Ditto. 87 88 * WebView/WebHTMLViewInternal.h: Declared an internal method that’s used from another file. 89 90 * WebView/WebJSPDFDoc.mm: Imported a header that declares delegate methods we call from here. 91 92 * WebView/WebPDFView.h: Removed previewView ivar. 93 94 * WebView/WebPDFView.mm: 95 Removed declaration of FileInternal category and merged its implementation with the main 96 implementation. 97 (-[WebPDFView dealloc]): Removed previewView ivar. 98 (-[WebPDFView initWithFrame:]): Removed code to deal with PDFPreviewView, which doesn’t 99 exist in macOS versions we support. 100 (+[WebPDFView _PDFPreviewViewClass]): Deleted. PDFPreviewView doesn’t exist anymore. 101 (-[WebPDFView _canLookUpInDictionary]): Suppressed undeclared selector warning around use of 102 action methods internal to PDFKit. 103 (-[WebPDFView _lookUpInDictionaryFromMenu:]): Ditto. 104 (-[WebPDFView _menuItemsFromPDFKitForEvent:]): Ditto. 105 106 * WebView/WebUIDelegatePrivate.h: Restored declarations of the delegate methods we actually 107 call on macOS, even though in r86988 we started calling different methods on iOS. 108 109 * WebView/WebView.mm: 110 - Imported headers that declare delegate methods that we call. 111 - Removed declaration of WebFileInternal category and merged its implementation with the 112 main implementation. 113 - Many internal methods were inexplicibly implemented as part of the WebViewEditingInMail 114 category, which made them impossible to call from the main implementation. Moved those 115 into the main implementation. One of those had to be declared in a class extension, 116 because it is called from a method implemented in the WebPrivate category, and that 117 category’s implementation appears first in the file. 118 119 (-[WebView _cacheHistoryDelegateImplementations]): Suppressed undeclared selector warning 120 around use of obsolete delegate method for binary compatibility. 121 122 * WebView/WebViewInternal.h: Declared an internal method that’s used from another file. 123 1 124 2018-10-04 YUHAN WU <yuhan_wu@apple.com> 2 125 -
trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig
r235412 r236846 38 38 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 39 39 CLANG_WARN_BOOL_CONVERSION = YES; 40 CLANG_WARN_COMMA = YES; 40 41 CLANG_WARN_CONSTANT_CONVERSION = YES; 41 42 CLANG_WARN_CXX0X_EXTENSIONS = NO; … … 52 53 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 53 54 GCC_WARN_UNDECLARED_SELECTOR = YES; 55 CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 54 56 COMBINE_HIDPI_IMAGES = NO; 55 57 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym; … … 77 79 GCC_WARN_ABOUT_RETURN_TYPE = YES; 78 80 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 81 CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 79 82 GCC_WARN_SIGN_COMPARE = YES; 80 GCC_WARN_UNDECLARED_SELECTOR = NO;81 83 GCC_WARN_UNINITIALIZED_AUTOS = YES; 82 84 GCC_WARN_UNUSED_FUNCTION = YES; … … 84 86 CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 85 87 OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR); 88 CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 86 89 PREBINDING = NO; 87 90 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; -
trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
r222896 r236846 36 36 #import "WebFrameInternal.h" 37 37 #import "WebFrameView.h" 38 #import "WebHTMLView Private.h"38 #import "WebHTMLViewInternal.h" 39 39 #import "WebLocalizableStringsInternal.h" 40 40 #import "WebNSPasteboardExtras.h" -
trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm
r235585 r236846 182 182 } 183 183 184 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 184 185 - (id)initWithRequest:(NSURLRequest *)request delegate:(id<NSURLDownloadDelegate>)delegate 186 IGNORE_WARNINGS_END 185 187 { 186 188 [self _setRealDelegate:delegate]; … … 188 190 } 189 191 192 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 190 193 - (id)_initWithLoadingConnection:(NSURLConnection *)connection 191 194 request:(NSURLRequest *)request … … 193 196 delegate:(id)delegate 194 197 proxy:(NSURLConnectionDelegateProxy *)proxy 198 IGNORE_WARNINGS_END 195 199 { 196 200 [self _setRealDelegate:delegate]; … … 198 202 } 199 203 204 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 200 205 - (id)_initWithRequest:(NSURLRequest *)request 201 206 delegate:(id)delegate 202 207 directory:(NSString *)directory 208 IGNORE_WARNINGS_END 203 209 { 204 210 [self _setRealDelegate:delegate]; -
trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm
r228218 r236846 92 92 0xFC, 0x80, 0x00, 0x00, 0x27, 0x10, 0x00, 0x0A, 0xFC, 0x80, 0x00, 0x00, 0x27, 0x10 }; 93 93 94 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 94 95 @implementation WebIconDatabase 96 IGNORE_WARNINGS_END 95 97 96 98 + (void)initialize -
trunk/Source/WebKitLegacy/mac/Misc/WebNSObjectExtras.mm
r165676 r236846 36 36 id exception; 37 37 } 38 @end 39 40 @interface NSInvocation (WebMainThreadInvoker) 41 - (void)_webkit_invokeAndHandleException:(WebMainThreadInvoker *)exceptionHandler; 38 42 @end 39 43 -
trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm
r235935 r236846 614 614 } 615 615 616 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 616 617 - (void)renewGState 618 IGNORE_WARNINGS_END 617 619 { 618 620 [super renewGState]; -
trunk/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm
r235935 r236846 680 680 return; 681 681 682 IGNORE_WARNINGS_BEGIN("undeclared-selector") 682 683 Method methodToPatch = class_getInstanceMethod(TSUpdateCheck, @selector(alertDidEnd:returnCode:contextInfo:)); 684 IGNORE_WARNINGS_END 683 685 if (!methodToPatch) 684 686 return; -
trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm
r234685 r236846 35 35 #import "WebFrameViewInternal.h" 36 36 #import "WebHTMLRepresentation.h" 37 #import "WebHTMLView .h"37 #import "WebHTMLViewInternal.h" 38 38 #import "WebKitLogging.h" 39 39 #import "WebNSFileManagerExtras.h" -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm
r235935 r236846 23 23 #import "WebDelegateImplementationCaching.h" 24 24 #import "WebFrameInternal.h" 25 #import "WebUIDelegatePrivate.h" 25 26 #import <WebCore/IntRect.h> 26 27 #import <WebCore/AXObjectCache.h> -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebCachedFramePlatformData.h
r165676 r236846 27 27 */ 28 28 29 #import "WebHTMLViewInternal.h" 29 30 #import <WebCore/CachedFramePlatformData.h> 30 31 #import <wtf/ObjcRuntimeExtras.h> -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h
r235489 r236846 161 161 String generateReplacementFile(const String& path) final; 162 162 163 #if !PLATFORM(IOS) 163 164 void elementDidFocus(WebCore::Element&) override; 164 165 void elementDidBlur(WebCore::Element&) override; 166 #endif 165 167 166 168 bool shouldPaintEntireContents() const final; -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm
r235489 r236846 39 39 #import "WebDelegateImplementationCaching.h" 40 40 #import "WebElementDictionary.h" 41 #import "WebFormDelegate.h" 41 42 #import "WebFrameInternal.h" 42 43 #import "WebFrameView.h" … … 877 878 } 878 879 880 #if !PLATFORM(IOS) 879 881 void WebChromeClient::elementDidFocus(WebCore::Element& element) 880 882 { … … 886 888 CallUIDelegate(m_webView, @selector(webView:formDidBlurNode:), kit(&element)); 887 889 } 890 #endif 888 891 889 892 bool WebChromeClient::selectItemWritingDirectionIsNatural() -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm
r235775 r236846 844 844 if (key == "Down") 845 845 return @selector(moveDown:); 846 IGNORE_WARNINGS_BEGIN("undeclared-selector") 846 847 if (key == "U+001B") 847 848 return @selector(cancel:); … … 853 854 if (key == "Enter") 854 855 return @selector(insertNewline:); 856 IGNORE_WARNINGS_END 855 857 return 0; 856 858 } -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
r235935 r236846 45 45 #import "WebFormDelegate.h" 46 46 #import "WebFrameInternal.h" 47 #import "WebFrameLoadDelegate .h"47 #import "WebFrameLoadDelegatePrivate.h" 48 48 #import "WebFrameNetworkingContext.h" 49 49 #import "WebFrameViewInternal.h" 50 50 #import "WebHTMLRepresentationPrivate.h" 51 51 #import "WebHTMLViewInternal.h" 52 #import "WebHistoryDelegate.h" 52 53 #import "WebHistoryInternal.h" 53 54 #import "WebHistoryItemInternal.h" … … 68 69 #import "WebPreferences.h" 69 70 #import "WebResourceLoadDelegate.h" 71 #import "WebResourceLoadDelegatePrivate.h" 70 72 #import "WebScriptWorldInternal.h" 71 73 #import "WebSecurityOriginInternal.h" … … 1366 1368 if (implementations->setTitleFunc) 1367 1369 CallHistoryDelegate(implementations->setTitleFunc, view, @selector(webView:updateHistoryTitle:forURL:inFrame:), (NSString *)title.string, (NSString *)url, m_webFrame.get()); 1368 else if (implementations->deprecatedSetTitleFunc) 1370 else if (implementations->deprecatedSetTitleFunc) { 1371 IGNORE_WARNINGS_BEGIN("undeclared-selector") 1369 1372 CallHistoryDelegate(implementations->deprecatedSetTitleFunc, view, @selector(webView:updateHistoryTitle:forURL:), (NSString *)title.string, (NSString *)url); 1373 IGNORE_WARNINGS_END 1374 } 1370 1375 return; 1371 1376 } … … 1750 1755 nil]; 1751 1756 LOG(Plugins, "arguments:\n%@", arguments); 1757 IGNORE_WARNINGS_BEGIN("undeclared-selector") 1752 1758 } else if ([viewFactory respondsToSelector:@selector(pluginViewWithArguments:)]) { 1759 IGNORE_WARNINGS_END 1753 1760 arguments = [NSDictionary dictionaryWithObjectsAndKeys: 1754 1761 baseURL, WebPluginBaseURLKey, -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm
r222664 r236846 28 28 #import "WebDelegateImplementationCaching.h" 29 29 #import "WebFrameInternal.h" 30 #import "WebHistoryDelegate.h" 30 31 #import "WebHistoryInternal.h" 31 32 #import "WebViewInternal.h" -
trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationInternal.h
r216816 r236846 26 26 #import "WebDeviceOrientation.h" 27 27 28 #import "WebDeviceOrientationProvider.h" 29 #import <WebCore/DeviceOrientationClientMock.h> 28 30 #import <WebCore/DeviceOrientationData.h> 29 31 #import <wtf/RefPtr.h> … … 44 46 45 47 WebCore::DeviceOrientationData* core(WebDeviceOrientation*); 48 49 @protocol WebDeviceOrientationProviderMock <WebDeviceOrientationProvider> 50 - (void)setController:(WebCore::DeviceOrientationController*)controller; 51 @end -
trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.mm
r199960 r236846 68 68 @end 69 69 70 @implementation WebDeviceOrientationProviderMock (Internal)71 72 - (void)setController:(WebCore::DeviceOrientationController*)controller73 {74 [m_internal setController:controller];75 }76 77 @end78 79 70 @implementation WebDeviceOrientationProviderMock 80 71 … … 120 111 } 121 112 113 - (void)setController:(WebCore::DeviceOrientationController*)controller 114 { 115 [m_internal setController:controller]; 116 } 117 122 118 @end -
trunk/Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMockInternal.h
r183172 r236846 24 24 */ 25 25 26 #import "WebDeviceOrientationInternal.h" 26 27 #import "WebDeviceOrientationProviderMock.h" 27 28 #import <WebCore/DeviceOrientationClientMock.h> … … 42 43 @end 43 44 44 @interface WebDeviceOrientationProviderMock (Internal) 45 - (void)setController:(WebCore::DeviceOrientationController*)controller; 45 @interface WebDeviceOrientationProviderMock () <WebDeviceOrientationProviderMock> 46 46 @end -
trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h
r168047 r236846 28 28 29 29 #import <WebKitLegacy/WebDocument.h> 30 #import <WebKitLegacy/WebFrame.h> 30 31 #import <WebKitLegacy/WebHTMLView.h> 31 32 … … 103 104 */ 104 105 + (NSArray *)supportedMIMETypes; 106 + (Class)_representationClassForWebFrame:(WebFrame *)webFrame; 105 107 @end 106 108 -
trunk/Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm
r226008 r236846 581 581 582 582 // This object will be the parent of the web area in WK1, so it should not be ignored. 583 - (BOOL)accessibilityIsIgnored 583 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 584 - (BOOL)accessibilityIsIgnored 585 IGNORE_WARNINGS_END 584 586 { 585 587 return NO; -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
r236445 r236846 2901 2901 } 2902 2902 } 2903 2904 2903 if (action == @selector(changeSpelling:) 2904 IGNORE_WARNINGS_BEGIN("undeclared-selector") 2905 2905 || action == @selector(_changeSpellingFromMenu:) 2906 IGNORE_WARNINGS_END 2906 2907 || action == @selector(checkSpelling:) 2907 2908 || action == @selector(complete:) … … 2979 2980 return [[self _webView] isEditable] && [self _canEditRichly]; 2980 2981 2982 IGNORE_WARNINGS_BEGIN("undeclared-selector") 2981 2983 if (action == @selector(_ignoreSpellingFromMenu:) 2982 2984 || action == @selector(_learnSpellingFromMenu:) 2985 IGNORE_WARNINGS_END 2983 2986 || action == @selector(takeFindStringFromSelection:)) 2984 2987 return [self _hasSelection]; … … 4252 4255 4253 4256 #if ENABLE(DRAG_SUPPORT) && PLATFORM(MAC) 4257 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 4254 4258 - (void)dragImage:(NSImage *)dragImage 4255 4259 at:(NSPoint)at … … 4259 4263 source:(id)source 4260 4264 slideBack:(BOOL)slideBack 4265 IGNORE_WARNINGS_END 4261 4266 { 4262 4267 ASSERT(self == [self _topHTMLView]); … … 4291 4296 } 4292 4297 4298 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 4293 4299 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal 4300 IGNORE_WARNINGS_END 4294 4301 { 4295 4302 ASSERT(![self _webView] || [self _isTopHTMLView]); … … 4302 4309 } 4303 4310 4311 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 4304 4312 - (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation 4313 IGNORE_WARNINGS_END 4305 4314 { 4306 4315 ASSERT(![self _webView] || [self _isTopHTMLView]); … … 4339 4348 } 4340 4349 4350 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 4341 4351 - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination 4352 IGNORE_WARNINGS_END 4342 4353 { 4343 4354 NSFileWrapper *wrapper = nil; … … 4997 5008 } 4998 5009 5010 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 4999 5011 - (id)accessibilityAttributeValue:(NSString*)attributeName 5012 IGNORE_WARNINGS_END 5000 5013 { 5001 5014 if ([attributeName isEqualToString: NSAccessibilityChildrenAttribute]) { … … 5668 5681 5669 5682 #endif 5683 5684 #if PLATFORM(IOS) 5685 - (void)markedTextUpdate:(NSNotification *)notification 5686 { 5687 NSString *text = [notification object]; 5688 NSRange range = NSMakeRange(0, [text length]); 5689 [self setMarkedText:text selectedRange:range]; 5690 } 5691 #endif 5692 5693 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 5694 - (void)setMarkedText:(id)string selectedRange:(NSRange)newSelRange 5695 IGNORE_WARNINGS_END 5696 { 5697 [self _executeSavedKeypressCommands]; 5698 5699 #if PLATFORM(MAC) 5700 BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]]; 5701 ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]); 5702 5703 LOG(TextInput, "setMarkedText:\"%@\" selectedRange:(%u, %u)", isAttributedString ? [string string] : string, newSelRange.location, newSelRange.length); 5704 #endif 5705 5706 // Use pointer to get parameters passed to us by the caller of interpretKeyEvents. 5707 auto* parameters = _private->interpretKeyEventsParameters; 5708 5709 if (parameters) { 5710 parameters->eventInterpretationHadSideEffects = true; 5711 parameters->consumedByIM = false; 5712 } 5713 5714 Frame* coreFrame = core([self _frame]); 5715 if (!coreFrame) 5716 return; 5717 5718 if (![self _isEditable]) 5719 return; 5720 5721 Vector<CompositionUnderline> underlines; 5722 NSString *text; 5723 NSRange replacementRange = { NSNotFound, 0 }; 5724 5725 #if PLATFORM(MAC) 5726 if (isAttributedString) { 5727 // FIXME: We ignore most attributes from the string, so an input method cannot specify e.g. a font or a glyph variation. 5728 text = [string string]; 5729 NSString *rangeString = [string attribute:NSTextInputReplacementRangeAttributeName atIndex:0 longestEffectiveRange:0 inRange:NSMakeRange(0, [text length])]; 5730 LOG(TextInput, " ReplacementRange: %@", rangeString); 5731 // The AppKit adds a 'secret' property to the string that contains the replacement range. 5732 // The replacement range is the range of the text that should be replaced with the new string. 5733 if (rangeString) 5734 replacementRange = NSRangeFromString(rangeString); 5735 5736 extractUnderlines(string, underlines); 5737 } else { 5738 text = string; 5739 underlines.append(CompositionUnderline(0, [text length], CompositionUnderlineColor::TextColor, Color::black, false)); 5740 } 5741 #else 5742 text = string; 5743 #endif 5744 5745 if (replacementRange.location != NSNotFound) 5746 [[self _frame] _selectNSRange:replacementRange]; 5747 5748 coreFrame->editor().setComposition(text, underlines, newSelRange.location, NSMaxRange(newSelRange)); 5749 } 5670 5750 5671 5751 @end … … 6243 6323 #if PLATFORM(MAC) 6244 6324 6325 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6245 6326 - (NSArray *)validAttributesForMarkedText 6327 IGNORE_WARNINGS_END 6246 6328 { 6247 6329 static NSArray *validAttributes = [[NSArray alloc] initWithObjects: … … 6284 6366 #endif // PLATFORM(MAC) 6285 6367 6368 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6286 6369 - (NSUInteger)characterIndexForPoint:(NSPoint)thePoint 6370 IGNORE_WARNINGS_END 6287 6371 { 6288 6372 [self _executeSavedKeypressCommands]; … … 6308 6392 } 6309 6393 6394 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6310 6395 - (NSRect)firstRectForCharacterRange:(NSRange)theRange 6396 IGNORE_WARNINGS_END 6311 6397 { 6312 6398 [self _executeSavedKeypressCommands]; … … 6340 6426 } 6341 6427 6428 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6342 6429 - (NSRange)selectedRange 6430 IGNORE_WARNINGS_END 6343 6431 { 6344 6432 [self _executeSavedKeypressCommands]; … … 6354 6442 } 6355 6443 6444 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6356 6445 - (NSRange)markedRange 6446 IGNORE_WARNINGS_END 6357 6447 { 6358 6448 [self _executeSavedKeypressCommands]; … … 6370 6460 #if PLATFORM(MAC) 6371 6461 6462 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6372 6463 - (NSAttributedString *)attributedSubstringFromRange:(NSRange)nsRange 6464 IGNORE_WARNINGS_END 6373 6465 { 6374 6466 [self _executeSavedKeypressCommands]; … … 6402 6494 #endif 6403 6495 6496 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6404 6497 - (NSInteger)conversationIdentifier 6498 IGNORE_WARNINGS_END 6405 6499 { 6406 6500 return (NSInteger)self; … … 6422 6516 } 6423 6517 6518 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6424 6519 - (void)unmarkText 6520 IGNORE_WARNINGS_END 6425 6521 { 6426 6522 [self _executeSavedKeypressCommands]; … … 6467 6563 #endif 6468 6564 6469 - (void)setMarkedText:(id)string selectedRange:(NSRange)newSelRange 6470 { 6471 [self _executeSavedKeypressCommands]; 6472 6473 #if PLATFORM(MAC) 6474 BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]]; 6475 ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]); 6476 6477 LOG(TextInput, "setMarkedText:\"%@\" selectedRange:(%u, %u)", isAttributedString ? [string string] : string, newSelRange.location, newSelRange.length); 6478 #endif 6479 6480 // Use pointer to get parameters passed to us by the caller of interpretKeyEvents. 6481 auto* parameters = _private->interpretKeyEventsParameters; 6482 6483 if (parameters) { 6484 parameters->eventInterpretationHadSideEffects = true; 6485 parameters->consumedByIM = false; 6486 } 6487 6488 Frame* coreFrame = core([self _frame]); 6489 if (!coreFrame) 6490 return; 6491 6492 if (![self _isEditable]) 6493 return; 6494 6495 Vector<CompositionUnderline> underlines; 6496 NSString *text; 6497 NSRange replacementRange = { NSNotFound, 0 }; 6498 6499 #if PLATFORM(MAC) 6500 if (isAttributedString) { 6501 // FIXME: We ignore most attributes from the string, so an input method cannot specify e.g. a font or a glyph variation. 6502 text = [string string]; 6503 NSString *rangeString = [string attribute:NSTextInputReplacementRangeAttributeName atIndex:0 longestEffectiveRange:0 inRange:NSMakeRange(0, [text length])]; 6504 LOG(TextInput, " ReplacementRange: %@", rangeString); 6505 // The AppKit adds a 'secret' property to the string that contains the replacement range. 6506 // The replacement range is the range of the text that should be replaced with the new string. 6507 if (rangeString) 6508 replacementRange = NSRangeFromString(rangeString); 6509 6510 extractUnderlines(string, underlines); 6511 } else { 6512 text = string; 6513 underlines.append(CompositionUnderline(0, [text length], CompositionUnderlineColor::TextColor, Color::black, false)); 6514 } 6515 #else 6516 text = string; 6517 #endif 6518 6519 if (replacementRange.location != NSNotFound) 6520 [[self _frame] _selectNSRange:replacementRange]; 6521 6522 coreFrame->editor().setComposition(text, underlines, newSelRange.location, NSMaxRange(newSelRange)); 6523 } 6524 6525 #if PLATFORM(IOS) 6526 - (void)markedTextUpdate:(NSNotification *)notification 6527 { 6528 NSString *text = [notification object]; 6529 NSRange range = NSMakeRange(0, [text length]); 6530 [self setMarkedText:text selectedRange:range]; 6531 } 6532 #endif 6533 6565 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6534 6566 - (void)doCommandBySelector:(SEL)selector 6567 IGNORE_WARNINGS_END 6535 6568 { 6536 6569 LOG(TextInput, "doCommandBySelector:\"%s\"", sel_getName(selector)); … … 6590 6623 } 6591 6624 6625 IGNORE_WARNINGS_BEGIN("deprecated-implementations") 6592 6626 - (void)insertText:(id)string 6627 IGNORE_WARNINGS_END 6593 6628 { 6594 6629 #if PLATFORM(MAC) -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewInternal.h
r221559 r236846 58 58 59 59 - (WebFrame *)_frame; 60 - (void)closeIfNotCurrentView; 60 61 61 62 #if PLATFORM(MAC) … … 99 100 - (WebPluginController *)_pluginController; 100 101 102 - (void)_executeSavedKeypressCommands; 103 101 104 @end 102 105 -
trunk/Source/WebKitLegacy/mac/WebView/WebJSPDFDoc.mm
r234685 r236846 29 29 #import "WebDelegateImplementationCaching.h" 30 30 #import "WebFrame.h" 31 #import "WebUIDelegate.h" 31 32 #import "WebView.h" 32 33 #import <JavaScriptCore/JSObjectRef.h> -
trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.h
r232239 r236846 41 41 @interface WebPDFView : NSView <PDFViewDelegate, WebDocumentView, WebDocumentSearching, WebDocumentIncrementalSearching, WebMultipleTextMatches, WebDocumentSelection, WebDocumentElement, WebDocumentPDF, _WebDocumentViewState, _WebDocumentZooming> 42 42 { 43 NSView *previewView;44 43 PDFView *PDFSubview; 45 44 NSString *path; -
trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm
r235935 r236846 85 85 extern "C" NSString *_NSPathForSystemFramework(NSString *framework); 86 86 87 @interface WebPDFView (FileInternal)88 + (Class)_PDFPreviewViewClass;89 + (Class)_PDFViewClass;90 - (void)_applyPDFDefaults;91 - (BOOL)_canLookUpInDictionary;92 - (NSClipView *)_clipViewForPDFDocumentView;93 - (NSEvent *)_fakeKeyEventWithFunctionKey:(unichar)functionKey;94 - (NSMutableArray *)_menuItemsFromPDFKitForEvent:(NSEvent *)theEvent;95 - (PDFSelection *)_nextMatchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag fromSelection:(PDFSelection *)initialSelection startInSelection:(BOOL)startInSelection;96 - (void)_openWithFinder:(id)sender;97 - (NSString *)_path;98 - (void)_PDFDocumentViewMightHaveScrolled:(NSNotification *)notification;99 - (BOOL)_pointIsInSelection:(NSPoint)point;100 - (NSAttributedString *)_scaledAttributedString:(NSAttributedString *)unscaledAttributedString;101 - (void)_setTextMatches:(NSArray *)array;102 - (NSString *)_temporaryPDFDirectoryPath;103 - (void)_trackFirstResponder;104 - (void)_updatePreferencesSoon;105 - (NSSet *)_visiblePDFPages;106 @end;107 108 87 @interface NSView () 109 88 - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView; … … 212 191 { 213 192 [dataSource release]; 214 [previewView release];215 193 [PDFSubview setDelegate:nil]; 216 194 [PDFSubview release]; … … 328 306 [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 329 307 330 Class previewViewClass = [[self class] _PDFPreviewViewClass]; 331 332 // We might not have found a previewViewClass, but if we did find it 333 // then we should be able to create an instance. 334 if (previewViewClass) { 335 previewView = [[previewViewClass alloc] initWithFrame:frame]; 336 ASSERT(previewView); 337 } 338 339 NSView *topLevelPDFKitView = nil; 340 if (previewView) { 341 // We'll retain the PDFSubview here so that it is equally retained in all 342 // code paths. That way we don't need to worry about conditionally releasing 343 // it later. 344 PDFSubview = [[previewView performSelector:@selector(pdfView)] retain]; 345 topLevelPDFKitView = previewView; 346 } else { 347 PDFSubview = [[[[self class] _PDFViewClass] alloc] initWithFrame:frame]; 348 topLevelPDFKitView = PDFSubview; 349 } 350 308 PDFSubview = [[[[self class] _PDFViewClass] alloc] initWithFrame:frame]; 309 351 310 ASSERT(PDFSubview); 352 311 353 [ topLevelPDFKitView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];354 [self addSubview: topLevelPDFKitView];312 [PDFSubview setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 313 [self addSubview:PDFSubview]; 355 314 356 315 [PDFSubview setDelegate:self]; … … 1061 1020 } 1062 1021 1063 @end1064 1065 @implementation WebPDFView (FileInternal)1066 1067 + (Class)_PDFPreviewViewClass1068 {1069 static Class PDFPreviewViewClass = nil;1070 static BOOL checkedForPDFPreviewViewClass = NO;1071 1072 if (!checkedForPDFPreviewViewClass) {1073 checkedForPDFPreviewViewClass = YES;1074 PDFPreviewViewClass = [[WebPDFView PDFKitBundle] classNamed:@"PDFPreviewView"];1075 }1076 1077 // This class might not be available; callers need to deal with a nil return here.1078 return PDFPreviewViewClass;1079 }1080 1081 1022 + (Class)_PDFViewClass 1082 1023 { … … 1117 1058 - (BOOL)_canLookUpInDictionary 1118 1059 { 1060 IGNORE_WARNINGS_BEGIN("undeclared-selector") 1119 1061 return [PDFSubview respondsToSelector:@selector(_searchInDictionary:)]; 1062 IGNORE_WARNINGS_END 1120 1063 } 1121 1064 … … 1153 1096 // PDFView uses. Since the PDFView method isn't API, and isn't available on all versions 1154 1097 // of PDFKit, we use performSelector after a respondsToSelector check, rather than calling it directly. 1098 IGNORE_WARNINGS_BEGIN("undeclared-selector") 1155 1099 if ([self _canLookUpInDictionary]) 1156 1100 [PDFSubview performSelector:@selector(_searchInDictionary:) withObject:sender]; 1101 IGNORE_WARNINGS_END 1157 1102 } 1158 1103 … … 1186 1131 NSMutableArray *copiedItems = [NSMutableArray array]; 1187 1132 NSDictionary *actionsToTags = [[NSDictionary alloc] initWithObjectsAndKeys: 1133 IGNORE_WARNINGS_BEGIN("undeclared-selector") 1188 1134 [NSNumber numberWithInt:WebMenuItemPDFActualSize], NSStringFromSelector(@selector(_setActualSize:)), 1189 1135 [NSNumber numberWithInt:WebMenuItemPDFZoomIn], NSStringFromSelector(@selector(zoomIn:)), … … 1197 1143 [NSNumber numberWithInt:WebMenuItemPDFNextPage], NSStringFromSelector(@selector(goToNextPage:)), 1198 1144 [NSNumber numberWithInt:WebMenuItemPDFPreviousPage], NSStringFromSelector(@selector(goToPreviousPage:)), 1145 IGNORE_WARNINGS_END 1199 1146 nil]; 1200 1147 … … 1203 1150 // "Look Up in Dictionary" via the implementation of -[WebPDFView _lookUpInDictionaryFromMenu:]. 1204 1151 NSSet *unwantedActions = [[NSSet alloc] initWithObjects: 1152 IGNORE_WARNINGS_BEGIN("undeclared-selector") 1205 1153 NSStringFromSelector(@selector(_searchInSpotlight:)), 1206 1154 NSStringFromSelector(@selector(_searchInGoogle:)), 1207 1155 NSStringFromSelector(@selector(_searchInDictionary:)), 1156 IGNORE_WARNINGS_END 1208 1157 NSStringFromSelector(@selector(copy:)), 1209 1158 nil]; -
trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h
r231024 r236846 266 266 - (void)webView:(WebView *)webView checkPolicyForUserMediaRequestFromOrigin:(WebSecurityOrigin *)origin listener:(id<WebAllowDenyPolicyListener>)listener; 267 267 268 #if !TARGET_OS_IPHONE 269 - (void)webView:(WebView *)sender formDidFocusNode:(DOMNode *)node; 270 - (void)webView:(WebView *)sender formDidBlurNode:(DOMNode *)node; 271 #else 268 272 - (void)webView:(WebView *)sender elementDidFocusNode:(DOMNode *)node; 269 273 - (void)webView:(WebView *)sender elementDidBlurNode:(DOMNode *)node; 274 #endif 270 275 271 276 /*! … … 279 284 280 285 #if ENABLE_FULLSCREEN_API 281 - (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element; 282 - (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element; 283 - (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element; 286 - (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element withKeyboard:(BOOL)withKeyboard; 287 - (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element listener:(id <WebKitFullScreenListener>)listener; 288 - (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element listener:(id <WebKitFullScreenListener>)listener; 289 - (void)webView:(WebView *)sender closeFullScreenWithListener:(id <WebKitFullScreenListener>)listener; 284 290 #endif 285 291 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r236840 r236846 65 65 #import "WebFormDelegatePrivate.h" 66 66 #import "WebFrameInternal.h" 67 #import "WebFrameLoadDelegatePrivate.h" 67 68 #import "WebFrameLoaderClient.h" 68 69 #import "WebFrameNetworkingContext.h" … … 72 73 #import "WebHTMLRepresentation.h" 73 74 #import "WebHTMLViewInternal.h" 75 #import "WebHistoryDelegate.h" 74 76 #import "WebHistoryItemInternal.h" 75 77 #import "WebIconDatabase.h" … … 100 102 #import "WebPreferencesPrivate.h" 101 103 #import "WebProgressTrackerClient.h" 104 #import "WebResourceLoadDelegate.h" 105 #import "WebResourceLoadDelegatePrivate.h" 102 106 #import "WebResourceLoadScheduler.h" 103 107 #import "WebScriptDebugDelegate.h" … … 393 397 macro(centerSelectionInVisibleArea) \ 394 398 macro(changeAttributes) \ 399 _Pragma("clang diagnostic push") \ 400 _Pragma("clang diagnostic ignored \"-Wundeclared-selector\"") \ 395 401 macro(changeBaseWritingDirection) \ 396 402 macro(changeBaseWritingDirectionToLTR) \ 397 403 macro(changeBaseWritingDirectionToRTL) \ 404 _Pragma("clang diagnostic pop") \ 398 405 macro(changeColor) \ 399 406 macro(changeDocumentBackgroundColor) \ … … 504 511 macro(superscript) \ 505 512 macro(swapWithMark) \ 513 _Pragma("clang diagnostic push") \ 514 _Pragma("clang diagnostic ignored \"-Wundeclared-selector\"") \ 506 515 macro(takeFindStringFromSelection) \ 516 _Pragma("clang diagnostic pop") \ 507 517 macro(toggleBaseWritingDirection) \ 508 518 macro(transpose) \ … … 511 521 macro(uppercaseWord) \ 512 522 macro(yank) \ 523 _Pragma("clang diagnostic push") \ 524 _Pragma("clang diagnostic ignored \"-Wundeclared-selector\"") \ 513 525 macro(yankAndSelect) \ 526 _Pragma("clang diagnostic pop") \ 514 527 515 528 #define WebKitOriginalTopPrintingMarginKey @"WebKitOriginalTopMargin" … … 727 740 @end 728 741 #endif // ENABLE(DATA_INTERACTION) 729 730 @interface WebView (WebFileInternal)731 #if !PLATFORM(IOS)732 - (float)_deviceScaleFactor;733 #endif734 - (BOOL)_isLoading;735 - (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point;736 - (WebFrame *)_focusedFrame;737 + (void)_preflightSpellChecker;738 - (BOOL)_continuousCheckingAllowed;739 - (NSResponder *)_responderForResponderOperations;740 @end741 742 742 743 NSString *WebElementDOMNodeKey = @"WebElementDOMNode"; … … 1097 1098 1098 1099 #endif // HAVE(TOUCH_BAR) 1100 1101 @interface WebView () 1102 #if PLATFORM(IOS) 1103 - (void)_wakWindowScreenScaleChanged:(NSNotification *)notification; 1104 - (void)_wakWindowVisibilityChanged:(NSNotification *)notification; 1105 #else 1106 - (float)_deviceScaleFactor; 1107 #endif 1108 @end 1099 1109 1100 1110 @implementation WebView (AllWebViews) … … 3340 3350 cache->clientRedirectFunc = getMethod(delegate, @selector(webView:didPerformClientRedirectFromURL:toURL:inFrame:)); 3341 3351 cache->serverRedirectFunc = getMethod(delegate, @selector(webView:didPerformServerRedirectFromURL:toURL:inFrame:)); 3352 IGNORE_WARNINGS_BEGIN("undeclared-selector") 3342 3353 cache->deprecatedSetTitleFunc = getMethod(delegate, @selector(webView:updateHistoryTitle:forURL:)); 3354 IGNORE_WARNINGS_END 3343 3355 cache->setTitleFunc = getMethod(delegate, @selector(webView:updateHistoryTitle:forURL:inFrame:)); 3344 3356 cache->populateVisitedLinksFunc = getMethod(delegate, @selector(populateVisitedLinksForWebView:)); … … 3396 3408 _private->editingDelegateForwarder = [[_WebSafeForwarder alloc] initWithTarget:_private->editingDelegate defaultTarget:[WebDefaultEditingDelegate sharedEditingDelegate]]; 3397 3409 return _private->editingDelegateForwarder; 3398 }3399 3400 - (void)_closeWindow3401 {3402 [[self _UIDelegateForwarder] webViewClose:self];3403 3410 } 3404 3411 … … 7344 7351 7345 7352 #endif // HAVE(TOUCH_BAR) 7353 7354 static WebFrameView *containingFrameView(NSView *view) 7355 { 7356 while (view && ![view isKindOfClass:[WebFrameView class]]) 7357 view = [view superview]; 7358 return (WebFrameView *)view; 7359 } 7360 7361 #if !PLATFORM(IOS) 7362 - (float)_deviceScaleFactor 7363 { 7364 if (_private->customDeviceScaleFactor != 0) 7365 return _private->customDeviceScaleFactor; 7366 7367 NSWindow *window = [self window]; 7368 NSWindow *hostWindow = [self hostWindow]; 7369 if (window) 7370 return [window backingScaleFactor]; 7371 if (hostWindow) 7372 return [hostWindow backingScaleFactor]; 7373 return [[NSScreen mainScreen] backingScaleFactor]; 7374 } 7375 #endif 7376 7377 + (BOOL)_didSetCacheModel 7378 { 7379 return s_didSetCacheModel; 7380 } 7381 7382 + (WebCacheModel)_maxCacheModelInAnyInstance 7383 { 7384 WebCacheModel cacheModel = WebCacheModelDocumentViewer; 7385 NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator]; 7386 while (WebPreferences *preferences = [[enumerator nextObject] preferences]) 7387 cacheModel = std::max(cacheModel, [preferences cacheModel]); 7388 return cacheModel; 7389 } 7390 7391 + (void)_cacheModelChangedNotification:(NSNotification *)notification 7392 { 7393 #if PLATFORM(IOS) 7394 // This needs to happen on the Web Thread 7395 WebThreadRun(^{ 7396 #endif 7397 WebPreferences *preferences = (WebPreferences *)[notification object]; 7398 ASSERT([preferences isKindOfClass:[WebPreferences class]]); 7399 7400 WebCacheModel cacheModel = [preferences cacheModel]; 7401 if (![self _didSetCacheModel] || cacheModel > [self _cacheModel]) 7402 [self _setCacheModel:cacheModel]; 7403 else if (cacheModel < [self _cacheModel]) 7404 [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])]; 7405 #if PLATFORM(IOS) 7406 }); 7407 #endif 7408 } 7409 7410 + (void)_preferencesRemovedNotification:(NSNotification *)notification 7411 { 7412 WebPreferences *preferences = (WebPreferences *)[notification object]; 7413 ASSERT([preferences isKindOfClass:[WebPreferences class]]); 7414 7415 if ([preferences cacheModel] == [self _cacheModel]) 7416 [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])]; 7417 } 7418 7419 - (WebFrame *)_focusedFrame 7420 { 7421 NSResponder *resp = [[self window] firstResponder]; 7422 if (resp && [resp isKindOfClass:[NSView class]] && [(NSView *)resp isDescendantOf:[[self mainFrame] frameView]]) { 7423 WebFrameView *frameView = containingFrameView((NSView *)resp); 7424 ASSERT(frameView != nil); 7425 return [frameView webFrame]; 7426 } 7427 7428 return nil; 7429 } 7430 7431 - (BOOL)_isLoading 7432 { 7433 WebFrame *mainFrame = [self mainFrame]; 7434 return [[mainFrame _dataSource] isLoading] 7435 || [[mainFrame provisionalDataSource] isLoading]; 7436 } 7437 7438 - (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point 7439 { 7440 if (_private->closed) 7441 return nil; 7442 #if !PLATFORM(IOS) 7443 NSView *view = [self hitTest:[[self superview] convertPoint:point fromView:nil]]; 7444 #else 7445 //[WebView superview] on iOS is nil, don't do a convertPoint 7446 NSView *view = [self hitTest:point]; 7447 #endif 7448 if (![view isDescendantOf:[[self mainFrame] frameView]]) 7449 return nil; 7450 WebFrameView *frameView = containingFrameView(view); 7451 ASSERT(frameView); 7452 return frameView; 7453 } 7454 7455 + (void)_preflightSpellCheckerNow:(id)sender 7456 { 7457 #if !PLATFORM(IOS) 7458 [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer]; 7459 #endif 7460 } 7461 7462 + (void)_preflightSpellChecker 7463 { 7464 #if !PLATFORM(IOS) 7465 // As AppKit does, we wish to delay tickling the shared spellchecker into existence on application launch. 7466 if ([NSSpellChecker sharedSpellCheckerExists]) { 7467 [self _preflightSpellCheckerNow:self]; 7468 } else { 7469 [self performSelector:@selector(_preflightSpellCheckerNow:) withObject:self afterDelay:2.0]; 7470 } 7471 #endif 7472 } 7473 7474 - (BOOL)_continuousCheckingAllowed 7475 { 7476 static BOOL allowContinuousSpellChecking = YES; 7477 static BOOL readAllowContinuousSpellCheckingDefault = NO; 7478 if (!readAllowContinuousSpellCheckingDefault) { 7479 if ([[NSUserDefaults standardUserDefaults] objectForKey:@"NSAllowContinuousSpellChecking"]) { 7480 allowContinuousSpellChecking = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSAllowContinuousSpellChecking"]; 7481 } 7482 readAllowContinuousSpellCheckingDefault = YES; 7483 } 7484 return allowContinuousSpellChecking; 7485 } 7486 7487 - (NSResponder *)_responderForResponderOperations 7488 { 7489 NSResponder *responder = [[self window] firstResponder]; 7490 WebFrameView *mainFrameView = [[self mainFrame] frameView]; 7491 7492 // If the current responder is outside of the webview, use our main frameView or its 7493 // document view. We also do this for subviews of self that are siblings of the main 7494 // frameView since clients might insert non-webview-related views there (see 4552713). 7495 if (responder != self && ![mainFrameView _web_firstResponderIsSelfOrDescendantView]) { 7496 responder = [mainFrameView documentView]; 7497 if (!responder) 7498 responder = mainFrameView; 7499 } 7500 return responder; 7501 } 7346 7502 7347 7503 @end … … 8677 8833 } 8678 8834 8679 @end8680 8681 static WebFrameView *containingFrameView(NSView *view)8682 {8683 while (view && ![view isKindOfClass:[WebFrameView class]])8684 view = [view superview];8685 return (WebFrameView *)view;8686 }8687 8688 @implementation WebView (WebFileInternal)8689 8690 #if !PLATFORM(IOS)8691 - (float)_deviceScaleFactor8692 {8693 if (_private->customDeviceScaleFactor != 0)8694 return _private->customDeviceScaleFactor;8695 8696 NSWindow *window = [self window];8697 NSWindow *hostWindow = [self hostWindow];8698 if (window)8699 return [window backingScaleFactor];8700 if (hostWindow)8701 return [hostWindow backingScaleFactor];8702 return [[NSScreen mainScreen] backingScaleFactor];8703 }8704 #endif8705 8706 8835 + (void)_setCacheModel:(WebCacheModel)cacheModel 8707 8836 { … … 8930 9059 { 8931 9060 return s_cacheModel; 8932 }8933 8934 + (BOOL)_didSetCacheModel8935 {8936 return s_didSetCacheModel;8937 }8938 8939 + (WebCacheModel)_maxCacheModelInAnyInstance8940 {8941 WebCacheModel cacheModel = WebCacheModelDocumentViewer;8942 NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];8943 while (WebPreferences *preferences = [[enumerator nextObject] preferences])8944 cacheModel = std::max(cacheModel, [preferences cacheModel]);8945 return cacheModel;8946 }8947 8948 + (void)_cacheModelChangedNotification:(NSNotification *)notification8949 {8950 #if PLATFORM(IOS)8951 // This needs to happen on the Web Thread8952 WebThreadRun(^{8953 #endif8954 WebPreferences *preferences = (WebPreferences *)[notification object];8955 ASSERT([preferences isKindOfClass:[WebPreferences class]]);8956 8957 WebCacheModel cacheModel = [preferences cacheModel];8958 if (![self _didSetCacheModel] || cacheModel > [self _cacheModel])8959 [self _setCacheModel:cacheModel];8960 else if (cacheModel < [self _cacheModel])8961 [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];8962 #if PLATFORM(IOS)8963 });8964 #endif8965 }8966 8967 + (void)_preferencesRemovedNotification:(NSNotification *)notification8968 {8969 WebPreferences *preferences = (WebPreferences *)[notification object];8970 ASSERT([preferences isKindOfClass:[WebPreferences class]]);8971 8972 if ([preferences cacheModel] == [self _cacheModel])8973 [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];8974 }8975 8976 - (WebFrame *)_focusedFrame8977 {8978 NSResponder *resp = [[self window] firstResponder];8979 if (resp && [resp isKindOfClass:[NSView class]] && [(NSView *)resp isDescendantOf:[[self mainFrame] frameView]]) {8980 WebFrameView *frameView = containingFrameView((NSView *)resp);8981 ASSERT(frameView != nil);8982 return [frameView webFrame];8983 }8984 8985 return nil;8986 }8987 8988 - (BOOL)_isLoading8989 {8990 WebFrame *mainFrame = [self mainFrame];8991 return [[mainFrame _dataSource] isLoading]8992 || [[mainFrame provisionalDataSource] isLoading];8993 }8994 8995 - (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point8996 {8997 if (_private->closed)8998 return nil;8999 #if !PLATFORM(IOS)9000 NSView *view = [self hitTest:[[self superview] convertPoint:point fromView:nil]];9001 #else9002 //[WebView superview] on iOS is nil, don't do a convertPoint9003 NSView *view = [self hitTest:point];9004 #endif9005 if (![view isDescendantOf:[[self mainFrame] frameView]])9006 return nil;9007 WebFrameView *frameView = containingFrameView(view);9008 ASSERT(frameView);9009 return frameView;9010 }9011 9012 + (void)_preflightSpellCheckerNow:(id)sender9013 {9014 #if !PLATFORM(IOS)9015 [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer];9016 #endif9017 }9018 9019 + (void)_preflightSpellChecker9020 {9021 #if !PLATFORM(IOS)9022 // As AppKit does, we wish to delay tickling the shared spellchecker into existence on application launch.9023 if ([NSSpellChecker sharedSpellCheckerExists]) {9024 [self _preflightSpellCheckerNow:self];9025 } else {9026 [self performSelector:@selector(_preflightSpellCheckerNow:) withObject:self afterDelay:2.0];9027 }9028 #endif9029 }9030 9031 - (BOOL)_continuousCheckingAllowed9032 {9033 static BOOL allowContinuousSpellChecking = YES;9034 static BOOL readAllowContinuousSpellCheckingDefault = NO;9035 if (!readAllowContinuousSpellCheckingDefault) {9036 if ([[NSUserDefaults standardUserDefaults] objectForKey:@"NSAllowContinuousSpellChecking"]) {9037 allowContinuousSpellChecking = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSAllowContinuousSpellChecking"];9038 }9039 readAllowContinuousSpellCheckingDefault = YES;9040 }9041 return allowContinuousSpellChecking;9042 }9043 9044 - (NSResponder *)_responderForResponderOperations9045 {9046 NSResponder *responder = [[self window] firstResponder];9047 WebFrameView *mainFrameView = [[self mainFrame] frameView];9048 9049 // If the current responder is outside of the webview, use our main frameView or its9050 // document view. We also do this for subviews of self that are siblings of the main9051 // frameView since clients might insert non-webview-related views there (see 4552713).9052 if (responder != self && ![mainFrameView _web_firstResponderIsSelfOrDescendantView]) {9053 responder = [mainFrameView documentView];9054 if (!responder)9055 responder = mainFrameView;9056 }9057 return responder;9058 9061 } 9059 9062 … … 10064 10067 } 10065 10068 10069 - (void)_closeWindow 10070 { 10071 [[self _UIDelegateForwarder] webViewClose:self]; 10072 } 10073 10066 10074 @end 10067 10075 -
trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h
r234685 r236846 149 149 - (void)_windowVisibilityChanged:(NSNotification *)notification; 150 150 151 - (void)_closeWindow; 152 151 153 @end 152 154 -
trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h
r231201 r236846 1086 1086 - (void)webView:(WebView *)sender didLayout:(WebLayoutMilestones)milestones; 1087 1087 1088 #if TARGET_OS_IPHONE 1089 - (void)webThreadWebView:(WebView *)sender didLayout:(WebLayoutMilestones)milestones; 1090 #endif 1091 1088 1092 // For implementing the WebInspector's test harness 1089 1093 - (void)webView:(WebView *)webView didClearInspectorWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame;
Note:
See TracChangeset
for help on using the changeset viewer.