<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>199705</bug_id>
          
          <creation_ts>2019-07-11 03:50:02 -0700</creation_ts>
          <short_desc>Build failure in WebHTMLView.mm with the public SDK (Xcode 11 and Mojave)</short_desc>
          <delta_ts>2019-10-07 18:03:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>199209</blocked>
    
    <blocked>202263</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Frédéric Wang Nélar">fred.wang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ajuma</cc>
    
    <cc>ap</cc>
    
    <cc>benjamin</cc>
    
    <cc>cathiechen</cc>
    
    <cc>cdumez</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>dino</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>jbedard</cc>
    
    <cc>kbr</cc>
    
    <cc>mitz</cc>
    
    <cc>mjs</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>thorton</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1552017</commentid>
    <comment_count>0</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-07-11 03:50:02 -0700</bug_when>
    <thetext>Follow-up of https://bugs.webkit.org/show_bug.cgi?id=199279#c4

Using XCode 11.0 beta 3 and the public SDK, I get errors in the part of WebKitLegacy/mac/WebView/WebHTMLView.mm protected by SUBVIEWS_IVAR_SPI:

use of undeclared identifier &apos;_subviews&apos;

Not sure what is the proper API to use and why SUBVIEWS_IVAR_SPI is actually not enabled. (Removing any reference to _subviews make the build succeed, so that&apos;s the only remaining failure)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1552066</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2019-07-11 08:26:12 -0700</bug_when>
    <thetext>This is a bit surprising since I got a version building with the public SDK.

Once I finish verifying getting the iOS 13 build working, I&apos;ll update my seed build and try and fix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1552097</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-07-11 10:14:48 -0700</bug_when>
    <thetext>Fred clarifies in the other bug that this is about Xcode 11.0 beta 3 on Mojave, not on Catalina.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1552115</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2019-07-11 10:57:30 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #2)
&gt; Fred clarifies in the other bug that this is about Xcode 11.0 beta 3 on
&gt; Mojave, not on Catalina.

Ok, that makes more sense. HAVE_SUBVIEWS_IVAR_SPI only gets defined on Catalina. Should is be defined unconditionally on public SDKs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1552123</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-07-11 11:12:30 -0700</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #3)
&gt; (In reply to Alexey Proskuryakov from comment #2)
&gt; &gt; Fred clarifies in the other bug that this is about Xcode 11.0 beta 3 on
&gt; &gt; Mojave, not on Catalina.
&gt; 
&gt; Ok, that makes more sense. HAVE_SUBVIEWS_IVAR_SPI only gets defined on
&gt; Catalina. Should is be defined unconditionally on public SDKs?

The SPI only exists on Catalina. It would build but crash with a missing selector otherwise.

I&apos;ll need to think of a fix that will work with the older systems and newer SDK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1558464</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2019-08-05 09:51:57 -0700</bug_when>
    <thetext>Talked with Alexey a bit about this last week.

None of our automation even builds with an old OS install and a new SDK, we&apos;re always either a new OS with a new SDK or an old OS with and old SDK. Because of this, I don&apos;t know that we have a compelling reason to fix this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1558572</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-08-05 15:02:47 -0700</bug_when>
    <thetext>I think that this can&apos;t be just ignored, as contributors will certainly be installing a newer Xcode.

The challenge is that even with this build fix, there could be other things that go wrong in less obvious ways.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1558579</commentid>
    <comment_count>7</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2019-08-05 15:21:20 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #6)
&gt; I think that this can&apos;t be just ignored, as contributors will certainly be
&gt; installing a newer Xcode.
&gt; 
&gt; The challenge is that even with this build fix, there could be other things
&gt; that go wrong in less obvious ways.

Without builder and testers, I don&apos;t know that we can practically expect to keep breakage like this out of the build. If we don&apos;t have any supporting automation, I don&apos;t know that we can claim this is a configuration we intend to support.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566174</commentid>
    <comment_count>8</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-08-29 03:28:23 -0700</bug_when>
    <thetext>Hi, I think it makes sense not to build/test/support a beta version of XCode together with a release operating system, if that&apos;s adding burden.

From the user&apos;s point of view, it&apos;s a shame because it&apos;s harder to switch between building with two OS versions than between building with two XCode versions.

In any case, if that configuration is really not supported, I think the build script should explicitly fail during configuration step with a clear error message.

Incidentally, you mention that your automation builds a new OS with a new SDK but I can&apos;t find any public buildbot for Catalina/iOS13 on https://build.webkit.org/console ? Without that, how can external contributors find issues like bug 200000 comment 32 ? And to debug them, I guess they have to switch to newer Catalina / XCode ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574396</commentid>
    <comment_count>9</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-09-26 02:36:25 -0700</bug_when>
    <thetext>This failure now happens with the Xcode 11 release on Mojave.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574440</commentid>
    <comment_count>10</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2019-09-26 07:35:15 -0700</bug_when>
    <thetext>How does your setup compare with the iOS 13 bots?

https://build.webkit.org/buildslaves/bot651</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574605</commentid>
    <comment_count>11</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-09-26 13:25:18 -0700</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #10)
&gt; How does your setup compare with the iOS 13 bots?
&gt; 
&gt; https://build.webkit.org/buildslaves/bot651

I still have the same build error after a clean rebuild. I have macOS 10.14.6 but only Xcode 11.0 11A420a (while buildbot is Xcode 11.1 Build version 11A1027). I noticed a new system update today, not sure that would actually help here but I&apos;m downloading it now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574624</commentid>
    <comment_count>12</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-09-26 14:13:44 -0700</bug_when>
    <thetext>(In reply to Frédéric Wang (:fredw) from comment #11)
&gt; I still have the same build error after a clean rebuild. I have macOS
&gt; 10.14.6 but only Xcode 11.0 11A420a (while buildbot is Xcode 11.1 Build
&gt; version 11A1027). I noticed a new system update today, not sure that would
&gt; actually help here but I&apos;m downloading it now.

System upgrade didn&apos;t help. I didn&apos;t get Xcode 11.1 from the standard software update so I guess I&apos;ll just install it from developer.apple.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1575187</commentid>
    <comment_count>13</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2019-09-29 17:47:05 -0700</bug_when>
    <thetext>(In reply to Frédéric Wang (:fredw) from comment #8)
&gt; In any case, if that configuration is really not supported, I think the
&gt; build script should explicitly fail during configuration step with a clear
&gt; error message.
&gt; 
+1 for this. XCode 11 is what is suggested by default for download from Apple&apos;s site at the moment and it&apos;s so frustrating that a clean build will fail on Mac OS X 10.14.

I assume the workaround for those who want to develop on OS X 10.14 is to downgrade to XCode 10.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1575203</commentid>
    <comment_count>14</comment_count>
    <who name="cathiechen">cathiechen</who>
    <bug_when>2019-09-30 00:55:07 -0700</bug_when>
    <thetext>I tried to clean build with Xcode 11.1 on Mac 10.14.6, it also has the same error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1575263</commentid>
    <comment_count>15</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2019-09-30 09:18:06 -0700</bug_when>
    <thetext>(In reply to cathiechen from comment #14)
&gt; I tried to clean build with Xcode 11.1 on Mac 10.14.6, it also has the same
&gt; error.

If you just need to build WebKit on Mac OS X 10.14.6 you can download XCode 10.3 XCode page on developer.apple.com doesn&apos;t seem to have other versions of XCode except 11.1. This direct link still works though: https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_10.3/Xcode_10.3.xip</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577214</commentid>
    <comment_count>16</comment_count>
    <who name="">mitz</who>
    <bug_when>2019-10-05 07:51:20 -0700</bug_when>
    <thetext>(In reply to Timothy Hatcher from comment #4)
&gt; (In reply to Jonathan Bedard from comment #3)
&gt; &gt; (In reply to Alexey Proskuryakov from comment #2)
&gt; &gt; &gt; Fred clarifies in the other bug that this is about Xcode 11.0 beta 3 on
&gt; &gt; &gt; Mojave, not on Catalina.
&gt; &gt; 
&gt; &gt; Ok, that makes more sense. HAVE_SUBVIEWS_IVAR_SPI only gets defined on
&gt; &gt; Catalina. Should is be defined unconditionally on public SDKs?
&gt; 
&gt; The SPI only exists on Catalina. It would build but crash with a missing
&gt; selector otherwise.
&gt; 
&gt; I&apos;ll need to think of a fix that will work with the older systems and newer
&gt; SDK.

You should be able to declare the ivar in a class extension in that case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577232</commentid>
    <comment_count>17</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2019-10-05 21:33:18 -0700</bug_when>
    <thetext>Ran into this problem too after updating to Xcode 11 on 10.4.6 in order to pick up the iOS 13 SDK, which seemed required to build for the iOS Simulator. This presents a chicken-and-egg problem since it&apos;s not possible to build for the iOS Simulator without Xcode 11, but not possible to build for macOS with it.

I was able to work around this by adding the following hack to WebHTMLView.mm:

diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
index 347826af20a..448d4c714d9 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -217,6 +217,8 @@
 #if !HAVE(SUBVIEWS_IVAR_SPI)
 @implementation NSView (SubviewsIvar)
 
+NSMutableArray&lt;__kindof NSView *&gt; *_subviews;
+
 - (void)_setSubviewsIvar:(NSMutableArray&lt;__kindof NSView *&gt; *)subviews {
     ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     _subviews = subviews;



but am sure this isn&apos;t correct. I don&apos;t know enough Objective-C to postulate a correct fix.

Any help from folks at Apple?

May I please upgrade this to P1, Major issue? It is a serious problem for all contributors outside Apple.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577233</commentid>
    <comment_count>18</comment_count>
    <who name="">mitz</who>
    <bug_when>2019-10-05 21:38:07 -0700</bug_when>
    <thetext>(In reply to Kenneth Russell from comment #17)
&gt; Ran into this problem too after updating to Xcode 11 on 10.4.6 in order to
&gt; pick up the iOS 13 SDK, which seemed required to build for the iOS
&gt; Simulator. This presents a chicken-and-egg problem since it&apos;s not possible
&gt; to build for the iOS Simulator without Xcode 11, but not possible to build
&gt; for macOS with it.
&gt; 
&gt; I was able to work around this by adding the following hack to
&gt; WebHTMLView.mm:
&gt; 
&gt; diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; index 347826af20a..448d4c714d9 100644
&gt; --- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; +++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; @@ -217,6 +217,8 @@
&gt;  #if !HAVE(SUBVIEWS_IVAR_SPI)
&gt;  @implementation NSView (SubviewsIvar)
&gt;  
&gt; +NSMutableArray&lt;__kindof NSView *&gt; *_subviews;
&gt; +

That’s not correct. It defines a global variable unrelated to the class. Declaring the ivar in a class extension, on the other hand, should work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577234</commentid>
    <comment_count>19</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2019-10-05 21:42:41 -0700</bug_when>
    <thetext>(In reply to mitz from comment #18)
&gt; (In reply to Kenneth Russell from comment #17)
&gt; &gt; Ran into this problem too after updating to Xcode 11 on 10.4.6 in order to
&gt; &gt; pick up the iOS 13 SDK, which seemed required to build for the iOS
&gt; &gt; Simulator. This presents a chicken-and-egg problem since it&apos;s not possible
&gt; &gt; to build for the iOS Simulator without Xcode 11, but not possible to build
&gt; &gt; for macOS with it.
&gt; &gt; 
&gt; &gt; I was able to work around this by adding the following hack to
&gt; &gt; WebHTMLView.mm:
&gt; &gt; 
&gt; &gt; diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; &gt; b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; &gt; index 347826af20a..448d4c714d9 100644
&gt; &gt; --- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; &gt; +++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
&gt; &gt; @@ -217,6 +217,8 @@
&gt; &gt;  #if !HAVE(SUBVIEWS_IVAR_SPI)
&gt; &gt;  @implementation NSView (SubviewsIvar)
&gt; &gt;  
&gt; &gt; +NSMutableArray&lt;__kindof NSView *&gt; *_subviews;
&gt; &gt; +
&gt; 
&gt; That’s not correct. It defines a global variable unrelated to the class.
&gt; Declaring the ivar in a class extension, on the other hand, should work.

I know it&apos;s not correct. As I mentioned I don&apos;t know enough Objective-C to write a correct fix - any chance you could put up a patch implementing that? I&apos;ll be happy to help test it. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577235</commentid>
    <comment_count>20</comment_count>
      <attachid>380291</attachid>
    <who name="">mitz</who>
    <bug_when>2019-10-05 21:50:07 -0700</bug_when>
    <thetext>Created attachment 380291
Untested patch

&gt; I know it&apos;s not correct. As I mentioned I don&apos;t know enough Objective-C to write a correct
&gt; fix - any chance you could put up a patch implementing that? I&apos;ll be happy to help test it. Thanks.

I haven’t been able to test this patch, but this is what I had in mind.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577268</commentid>
    <comment_count>21</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2019-10-06 16:03:47 -0700</bug_when>
    <thetext>The wincairo and wk1 failures appear unrelated. 

The style checker issue is about having an OS version check here, correctly suggesting it should go in a named macro. I&apos;d do this myself, but I&apos;m not sure what the purpose of the `__MAC_OS_X_VERSION_MAX_ALLOWED &gt;= 101500` clause is.

For folks in this configuration who are having trouble building, could you please report whether the patch solves your problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577269</commentid>
    <comment_count>22</comment_count>
    <who name="">mitz</who>
    <bug_when>2019-10-06 16:10:26 -0700</bug_when>
    <thetext>(In reply to Maciej Stachowiak from comment #21)
&gt; The wincairo and wk1 failures appear unrelated. 
&gt; 
&gt; The style checker issue is about having an OS version check here, correctly
&gt; suggesting it should go in a named macro. I&apos;d do this myself, but I&apos;m not
&gt; sure what the purpose of the `__MAC_OS_X_VERSION_MAX_ALLOWED &gt;= 101500`
&gt; clause is.

This makes the ivar declaration only when using the macOS Catalina or later SDK, because earlier SDKs include the declaration, and redeclaring an ivar is an error. I am not aware of WTF macros that express this (since conditionals based on SDK version are so uncommon).

&gt; For folks in this configuration who are having trouble building, could you
&gt; please report whether the patch solves your problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577282</commentid>
    <comment_count>23</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-06 20:07:54 -0700</bug_when>
    <thetext>What style checker is saying is that we should add a HAVE macro for these SDKs in Platform.h. But looking at the patch, there is already HAVE(SUBVIEWS_IVAR_SPI). Isn’t it just defined improperly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577283</commentid>
    <comment_count>24</comment_count>
    <who name="">mitz</who>
    <bug_when>2019-10-06 20:11:27 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #23)
&gt; What style checker is saying is that we should add a HAVE macro for these
&gt; SDKs in Platform.h. But looking at the patch, there is already
&gt; HAVE(SUBVIEWS_IVAR_SPI). Isn’t it just defined improperly?

HAVE_SUBVIEWS_IVAR_SPI is defined properly. The SPI is available when deploying to macOS 10.15 or later. When deploying to earlier macOS, the SPI is not available and there is code in WebHTMLView.mm implementing an alternative, but that implementation depends on an ivar declaration. The ivar declaration is not present in the macOS 10.15 and later SDKs. Thus the condition for declaring the ivar in the SPI header is the one stated in the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577284</commentid>
    <comment_count>25</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-06 20:21:57 -0700</bug_when>
    <thetext>I see, the SPI name confused me into thinking that this macro is about an ivar, which it is not. 

In this case, what you want is HAVE(SUBVIEWS_IVAR_DECLARED_BY_SDK) for the second part of the condition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577396</commentid>
    <comment_count>26</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2019-10-07 11:01:57 -0700</bug_when>
    <thetext>mitz@ thank you for the patch (which builds fine locally) and ap@ thank you for suggesting how to get it to pass the style checker.

Locally, this patch builds successfully; ap@, not sure whether it&apos;s what you had in mind. Without the change to Platform.h, HAVE(SUBVIEWS_IVAR_DECLARED_BY_SDK) isn&apos;t defined.

If this looks OK then mitz@ would you like to officially post it?

Thanks again for your help!



diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 230bfa69843..65706f2ee91 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) &amp;&amp; __MAC_OS_X_VERSION_MAX_ALLOWED &gt;= 101500
+#define HAVE_SUBVIEWS_IVAR_DECLARED_BY_SDK 1
+#endif
+
 #if PLATFORM(MAC) || (PLATFORM(IOS_FAMILY) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000) || PLATFORM(WATCHOS) || PLATFORM(APPLETV)
 #define USE_PLATFORM_SYSTEM_FALLBACK_LIST 1
 #endif
diff --git a/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h b/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
index e0d5b4e7ca1..1731664e4b8 100644
--- a/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
+++ b/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
@@ -29,7 +29,12 @@
 
 #import &lt;pal/spi/cocoa/QuartzCoreSPI.h&gt;
 
-@interface NSView () &lt;CALayerDelegate&gt;
+@interface NSView () &lt;CALayerDelegate&gt; {
+#if !HAVE(SUBVIEWS_IVAR_SPI) &amp;&amp; HAVE(SUBVIEWS_IVAR_DECLARED_BY_SDK)
+@package
+    NSMutableArray&lt;__kindof NSView *&gt; *_subviews;
+#endif
+}
 
 - (NSView *)_findLastViewInKeyViewLoop;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577425</commentid>
    <comment_count>27</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2019-10-07 12:04:47 -0700</bug_when>
    <thetext>That change looks good, could you post it for review?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577458</commentid>
    <comment_count>28</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-07 13:26:52 -0700</bug_when>
    <thetext>&gt; ap@, not sure whether it&apos;s what you had in mind.

Yes, looks great. I&apos;ll just go ahead and land it, to cut down on red tape.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577465</commentid>
    <comment_count>29</comment_count>
      <attachid>380352</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-07 13:33:47 -0700</bug_when>
    <thetext>Created attachment 380352
patch for landing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577470</commentid>
    <comment_count>30</comment_count>
      <attachid>380352</attachid>
    <who name="">mitz</who>
    <bug_when>2019-10-07 13:37:54 -0700</bug_when>
    <thetext>Comment on attachment 380352
patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=380352&amp;action=review

&gt; Source/WTF/wtf/Platform.h:1627
&gt; +#define HAVE_SUBVIEWS_IVAR_DECLARED_BY_SDK 1

This is confusing. The 10.15 SDK does *not* have a declaration of the subviews ivar. It’s also strange to define this here, where out of context it’s not clear which class it’s about. Consolidating all the logic in NSViewSPI.h would make things more clear. The rule that the style checker is trying to enforce makes little sense here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577488</commentid>
    <comment_count>31</comment_count>
      <attachid>380357</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-07 13:51:11 -0700</bug_when>
    <thetext>Created attachment 380357
patch for landing

&gt; This is confusing. The 10.15 SDK does *not* have a declaration of the
&gt; subviews ivar. 

Indeed, thank you for catching this.

&gt; It’s also strange to define this here, where out of context
&gt; it’s not clear which class it’s about. Consolidating all the logic in
&gt; NSViewSPI.h would make things more clear. The rule that the style checker is
&gt; trying to enforce makes little sense here.

The rule is that all versions checks are in Platform.h and similar central files. There were many instances of code where engineers thought that checking versions close to use was better, but moving a subset to Platform.h proved that people were often incorrect about how well they can splatter version checks throughout the code. So now we have this rigid rule. It also helps Apple engineers think twice before doing certain weird things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577546</commentid>
    <comment_count>32</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2019-10-07 15:49:10 -0700</bug_when>
    <thetext>https://bugs.webkit.org/attachment.cgi?id=380357 fixes the build problem as well. Thanks again!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577589</commentid>
    <comment_count>33</comment_count>
      <attachid>380357</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-10-07 18:02:52 -0700</bug_when>
    <thetext>Comment on attachment 380357
patch for landing

Clearing flags on attachment: 380357

Committed r250809: &lt;https://trac.webkit.org/changeset/250809&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577590</commentid>
    <comment_count>34</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-10-07 18:02:54 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577591</commentid>
    <comment_count>35</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-10-07 18:03:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/56058393&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>380291</attachid>
            <date>2019-10-05 21:50:07 -0700</date>
            <delta_ts>2019-10-07 13:33:47 -0700</delta_ts>
            <desc>Untested patch</desc>
            <filename>file_199705.txt</filename>
            <type>text/plain</type>
            <size>600</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL1BBTC9wYWwvc3BpL21hYy9OU1ZpZXdTUEkuaA0KPT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PQ0KLS0tIFNvdXJjZS9XZWJDb3JlL1BBTC9wYWwvc3BpL21hYy9OU1ZpZXdTUEkuaAkocmV2
aXNpb24gMjUwNzY3KQ0KKysrIFNvdXJjZS9XZWJDb3JlL1BBTC9wYWwvc3BpL21hYy9OU1ZpZXdT
UEkuaAkod29ya2luZyBjb3B5KQ0KQEAgLTI5LDcgKzI5LDEyIEBADQogDQogI2ltcG9ydCA8cGFs
L3NwaS9jb2NvYS9RdWFydHpDb3JlU1BJLmg+DQogDQotQGludGVyZmFjZSBOU1ZpZXcgKCkgPENB
TGF5ZXJEZWxlZ2F0ZT4NCitAaW50ZXJmYWNlIE5TVmlldyAoKSA8Q0FMYXllckRlbGVnYXRlPiB7
DQorI2lmICFIQVZFKFNVQlZJRVdTX0lWQVJfU1BJKSAmJiBfX01BQ19PU19YX1ZFUlNJT05fTUFY
X0FMTE9XRUQgPj0gMTAxNTAwDQorQHBhY2thZ2UNCisgICAgTlNNdXRhYmxlQXJyYXk8X19raW5k
b2YgTlNWaWV3ICo+ICpfc3Vidmlld3M7DQorI2VuZGlmDQorfQ0KIA0KIC0gKE5TVmlldyAqKV9m
aW5kTGFzdFZpZXdJbktleVZpZXdMb29wOw0KIA0K
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>380352</attachid>
            <date>2019-10-07 13:33:47 -0700</date>
            <delta_ts>2019-10-07 13:51:11 -0700</delta_ts>
            <desc>patch for landing</desc>
            <filename>Xcode11fix.txt</filename>
            <type>text/plain</type>
            <size>2581</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAyNTA3ODQpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDEzIEBACisyMDE5LTEwLTA3ICBBbGV4ZXkgUHJvc2t1cnlha292
ICA8YXBAYXBwbGUuY29tPgorCisgICAgICAgIEJ1aWxkIGZhaWx1cmUgaW4gV2ViSFRNTFZpZXcu
bW0gd2l0aCB0aGUgcHVibGljIFNESyAoWGNvZGUgMTEgYW5kIE1vamF2ZSkKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE5OTcwNQorCisgICAgICAgIFBh
dGNoIGJ5IERhbiBCZXJuc3RlaW4gYW5kIEtlbm5ldGggUnVzc2VsbC4KKyAgICAgICAgUmV2aWV3
ZWQgYnkgQWxleGV5IFByb3NrdXJ5YWtvdi4KKworICAgICAgICAqIHd0Zi9QbGF0Zm9ybS5oOiBB
ZGRlZCBIQVZFX1NVQlZJRVdTX0lWQVJfREVDTEFSRURfQllfU0RLLgorCiAyMDE5LTEwLTA0ICBD
b21taXQgUXVldWUgIDxjb21taXQtcXVldWVAd2Via2l0Lm9yZz4KIAogICAgICAgICBVbnJldmll
d2VkLCByb2xsaW5nIG91dCByMjUwNzYyLgpJbmRleDogU291cm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NvYS9RdWFydHpDb3JlU1BJLmg+CiAKLUBpbnRlcmZhY2UgTlNWaWV3ICgpIDxD
QUxheWVyRGVsZWdhdGU+CitAaW50ZXJmYWNlIE5TVmlldyAoKSA8Q0FMYXllckRlbGVnYXRlPiB7
CisjaWYgIUhBVkUoU1VCVklFV1NfSVZBUl9TUEkpICYmIEhBVkUoU1VCVklFV1NfSVZBUl9ERUNM
QVJFRF9CWV9TREspCitAcGFja2FnZQorICAgIE5TTXV0YWJsZUFycmF5PF9fa2luZG9mIE5TVmll
dyAqPiAqX3N1YnZpZXdzOworI2VuZGlmCit9CiAKIC0gKE5TVmlldyAqKV9maW5kTGFzdFZpZXdJ
bktleVZpZXdMb29wOwogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>380357</attachid>
            <date>2019-10-07 13:51:11 -0700</date>
            <delta_ts>2019-10-07 18:02:52 -0700</delta_ts>
            <desc>patch for landing</desc>
            <filename>Xcode11fix.txt</filename>
            <type>text/plain</type>
            <size>2581</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAyNTA3ODQpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDEzIEBACisyMDE5LTEwLTA3ICBBbGV4ZXkgUHJvc2t1cnlha292
ICA8YXBAYXBwbGUuY29tPgorCisgICAgICAgIEJ1aWxkIGZhaWx1cmUgaW4gV2ViSFRNTFZpZXcu
bW0gd2l0aCB0aGUgcHVibGljIFNESyAoWGNvZGUgMTEgYW5kIE1vamF2ZSkKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlY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IGVuYWJsaW5n
IG1hY3JvcwpJbmRleDogU291cmNlL1dlYkNvcmUvUEFML3BhbC9zcGkvbWFjL05TVmlld1NQSS5o
Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT0KLS0tIFNvdXJjZS9XZWJDb3JlL1BBTC9wYWwvc3BpL21hYy9OU1ZpZXdTUEku
aAkocmV2aXNpb24gMjUwNzg0KQorKysgU291cmNlL1dlYkNvcmUvUEFML3BhbC9zcGkvbWFjL05T
Vmlld1NQSS5oCSh3b3JraW5nIGNvcHkpCkBAIC0yOSw3ICsyOSwxMiBAQAogCiAjaW1wb3J0IDxw
YWwvc3BpL2NvY29hL1F1YXJ0ekNvcmVTUEkuaD4KIAotQGludGVyZmFjZSBOU1ZpZXcgKCkgPENB
TGF5ZXJEZWxlZ2F0ZT4KK0BpbnRlcmZhY2UgTlNWaWV3ICgpIDxDQUxheWVyRGVsZWdhdGU+IHsK
KyNpZiAhSEFWRShTVUJWSUVXU19JVkFSX1NQSSkgJiYgIUhBVkUoU1VCVklFV1NfSVZBUl9ERUNM
QVJFRF9CWV9TREspCitAcGFja2FnZQorICAgIE5TTXV0YWJsZUFycmF5PF9fa2luZG9mIE5TVmll
dyAqPiAqX3N1YnZpZXdzOworI2VuZGlmCit9CiAKIC0gKE5TVmlldyAqKV9maW5kTGFzdFZpZXdJ
bktleVZpZXdMb29wOwogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>