Build failure in WebHTMLView.mm with the public SDK (Xcode 11 and Mojave)
https://bugs.webkit.org/show_bug.cgi?id=199705
Patch by Dan Bernstein and Kenneth Russell.
Patch by Alexey Proskuryakov <ap@apple.com> on 2019-10-07
Reviewed by Alexey Proskuryakov.
Source/WebCore/PAL:
* pal/spi/mac/NSViewSPI.h: Declare _subviews when we are not using the
replacement SPI, but the SDK doesn't declare the ivar (because the SDK is too new).
Source/WTF:
* wtf/Platform.h: Added HAVE_SUBVIEWS_IVAR_DECLARED_BY_SDK.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@250809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index 6e920b0..1f0f5bf 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,13 @@
+2019-10-07 Alexey Proskuryakov <ap@apple.com>
+
+ Build failure in WebHTMLView.mm with the public SDK (Xcode 11 and Mojave)
+ https://bugs.webkit.org/show_bug.cgi?id=199705
+
+ Patch by Dan Bernstein and Kenneth Russell.
+ Reviewed by Alexey Proskuryakov.
+
+ * wtf/Platform.h: Added HAVE_SUBVIEWS_IVAR_DECLARED_BY_SDK.
+
2019-10-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r250762.
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 230bfa6..a74bf49 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -1623,6 +1623,10 @@
#define HAVE_SUBVIEWS_IVAR_SPI 1
#endif
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
+#define HAVE_SUBVIEWS_IVAR_DECLARED_BY_SDK 1
+#endif
+
#if PLATFORM(MAC) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || PLATFORM(WATCHOS) || PLATFORM(APPLETV)
#define USE_PLATFORM_SYSTEM_FALLBACK_LIST 1
#endif
diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog
index 48e8337..bb6f516 100644
--- a/Source/WebCore/PAL/ChangeLog
+++ b/Source/WebCore/PAL/ChangeLog
@@ -1,3 +1,14 @@
+2019-10-07 Alexey Proskuryakov <ap@apple.com>
+
+ Build failure in WebHTMLView.mm with the public SDK (Xcode 11 and Mojave)
+ https://bugs.webkit.org/show_bug.cgi?id=199705
+
+ Patch by Dan Bernstein and Kenneth Russell.
+ Reviewed by Alexey Proskuryakov.
+
+ * pal/spi/mac/NSViewSPI.h: Declare _subviews when we are not using the
+ replacement SPI, but the SDK doesn't declare the ivar (because the SDK is too new).
+
2019-10-04 Alex Christensen <achristensen@webkit.org>
Simplify sandbox enabling macros
diff --git a/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h b/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
index e0d5b4e..68ce8bf 100644
--- a/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
+++ b/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
@@ -29,7 +29,12 @@
#import <pal/spi/cocoa/QuartzCoreSPI.h>
-@interface NSView () <CALayerDelegate>
+@interface NSView () <CALayerDelegate> {
+#if !HAVE(SUBVIEWS_IVAR_SPI) && !HAVE(SUBVIEWS_IVAR_DECLARED_BY_SDK)
+@package
+ NSMutableArray<__kindof NSView *> *_subviews;
+#endif
+}
- (NSView *)_findLastViewInKeyViewLoop;