<?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>186572</bug_id>
          
          <creation_ts>2018-06-12 12:07:10 -0700</creation_ts>
          <short_desc>[watchOS] Audit code that is excluded due to __IPHONE_OS_VERSION_MIN_REQUIRED checks</short_desc>
          <delta_ts>2018-06-13 11:35:01 -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>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andy Estes">aestes</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>dbates</cc>
    
    <cc>jiewen_tan</cc>
    
    <cc>joepeck</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>sihui_liu</cc>
    
    <cc>thorton</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1432409</commentid>
    <comment_count>0</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2018-06-12 12:07:10 -0700</bug_when>
    <thetext>While PLATFORM(IOS) evaluates to true on watchOS, __IPHONE_OS_VERSION_MIN_REQUIRED is defined as 90000 for compatibility purposes. Therefore, checks such as &quot;PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000&quot; will evaluate to false on watchOS. We should audit these checks to see if there is code being excluded that shouldn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432529</commentid>
    <comment_count>1</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2018-06-12 16:59:57 -0700</bug_when>
    <thetext>Here are things that look suspicious to me at first glance:

Platform.h:

#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000) || USE(GCRYPT)
#define HAVE_RSA_PSS 1
#endif

#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101400) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 120000 &amp;&amp; !PLATFORM(APPLETV))
#define HAVE_URL_FORMATTING 1
#endif

#if (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 120000) || (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101400)
#define ENABLE_ACCESSIBILITY_EVENTS 1
#define HAVE_SEC_KEY_PROXY 1
#endif


WebContentReaderCocoa.mm:

#if (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000) || (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300)

... stuff for createFragment()


FontCacheCoreText.cpp:

#define HAS_CORE_TEXT_WIDTH_ATTRIBUTE ((PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000))
#define CAN_DISALLOW_USER_INSTALLED_FONTS ((PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101400) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 120000))


#if (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000) || (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300)
            CFStringRef nameAttribute = kCTFontPostScriptNameAttribute;
#else
            CFStringRef nameAttribute = kCTFontNameAttribute;
#endif

#if ((PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000))
    optOutFromGXNormalization = CTFontDescriptorIsSystemUIFont(fontDescriptor);
#endif


FontPlatformDataCocoa.mm:

#define WORKAROUND_CORETEXT_VARIATIONS_WITH_FALLBACK_LIST_BUG (ENABLE(VARIATION_FONTS) &amp;&amp; ((PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt; 101300) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &lt; 110000)))


FontCustomPlatformData.cpp:

The check in createFontCustomPlatformData.


FontDescription.h:

#define USE_PLATFORM_SYSTEM_FALLBACK_LIST ((PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000) || (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300))


ResourceRequestCFNet.cpp:

Stuff about _kCFHTTPCookiePolicyPropertySiteForCookies.


CookieCocoa.mm:

Same-site cookie stuff.


ResourceRequestCocoa.mm:

More same-site cookie stuff.


CookieJarMac.mm:

More same-site cookie stuff.


NetworkDataTaskCocoa.mm:

More same-site cookie stuff.


NetworkProcessCocoa.mm:

Implementation of syncAllCookies.


NetworkSessionCocoa.mm:

Network load metrics that are mysteriously guarded by &quot;(PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000)&quot;

_suppressedAutoAddedHTTPHeaders SPI</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432530</commentid>
    <comment_count>2</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2018-06-12 17:03:18 -0700</bug_when>
    <thetext>Also from WebKit&apos;s config.h:

#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101300) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 110000)
#ifndef ENABLE_SERVER_PRECONNECT
#define ENABLE_SERVER_PRECONNECT 1
#endif
#endif</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432531</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-06-12 17:08:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/41067844&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432724</commentid>
    <comment_count>4</comment_count>
    <who name="Jiewen Tan">jiewen_tan</who>
    <bug_when>2018-06-13 11:18:54 -0700</bug_when>
    <thetext>I feel like PLATFORM(IOS) includes watchOS/tvOS is weird.

For HAVE_RSA_PSS and HAVE_SEC_KEY_PROXY, they should be available for equivalent watchOS version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432733</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2018-06-13 11:35:01 -0700</bug_when>
    <thetext>(In reply to Jiewen Tan from comment #4)
&gt; I feel like PLATFORM(IOS) includes watchOS/tvOS is weird.

Agree, and I think at some point we’ll change that (and introduce a separate macro that explicitly covers all three Cocoa-Touch-based platforms), but not right now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>