Clean up a couple of macOS *SPI headers
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Nov 2016 21:34:42 +0000 (21:34 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Nov 2016 21:34:42 +0000 (21:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164687

Reviewed by Sam Weinig.

* platform/spi/cocoa/NSTouchBarSPI.h: Replaced hardcoded strings with global declarations.
* platform/spi/mac/NSSpellCheckerSPI.h: Addressed FIXME by importing private header, and removed declarations
  that already appear in the SDK.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208656 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/spi/cocoa/NSTouchBarSPI.h
Source/WebCore/platform/spi/mac/NSSpellCheckerSPI.h

index 364ab1c..3bc9645 100644 (file)
@@ -1,3 +1,14 @@
+2016-11-12  Dan Bernstein  <mitz@apple.com>
+
+        Clean up a couple of macOS *SPI headers
+        https://bugs.webkit.org/show_bug.cgi?id=164687
+
+        Reviewed by Sam Weinig.
+
+        * platform/spi/cocoa/NSTouchBarSPI.h: Replaced hardcoded strings with global declarations.
+        * platform/spi/mac/NSSpellCheckerSPI.h: Addressed FIXME by importing private header, and removed declarations
+          that already appear in the SDK.
+
 2016-11-12  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         The main content heuristic should be robust when handling large media elements
index 03ca4f6..301083c 100644 (file)
@@ -51,8 +51,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @end
 
-#define NSTouchBarWillEnterCustomization @"NSTouchBarWillEnterCustomization"
-#define NSTouchBarDidExitCustomization @"NSTouchBarDidExitCustomization"
+APPKIT_EXTERN NSNotificationName const NSTouchBarWillEnterCustomization;
+APPKIT_EXTERN NSNotificationName const NSTouchBarDidExitCustomization;
 
 NS_ASSUME_NONNULL_END
 
index b3cb229..fbe67d4 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-#ifndef NSSpellCheckerSPI_h
-#define NSSpellCheckerSPI_h
 
 #if HAVE(ADVANCED_SPELL_CHECKING)
 
-// FIXME: This header should include system headers when possible.
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <AppKit/NSTextChecker.h>
+
+#else
 
 extern NSString *NSTextCheckingInsertionPointKey;
-extern NSNotificationName const NSSpellCheckerDidChangeAutomaticTextCompletionNotification;
 
 @interface NSSpellChecker ()
-- (NSInteger)requestCandidatesForSelectedRange:(NSRange)selectedRange inString:(NSString *)stringToCheck types:(NSTextCheckingTypes)checkingTypes options:(NSDictionary<NSString *, id> *)options inSpellDocumentWithTag:(NSInteger)tag completionHandler:(void (^)(NSInteger sequenceNumber, NSArray<NSTextCheckingResult *> *candidates))completionHandler;
 - (BOOL)deletesAutospaceBeforeString:(NSString *)string language:(NSString *)language;
-+ (BOOL)isAutomaticTextCompletionEnabled;
 @end
 
-#endif // HAVE(ADVANCED_SPELL_CHECKING)
+#endif
 
-#endif // NSSpellCheckerSPI_h
+#endif // HAVE(ADVANCED_SPELL_CHECKING)