<?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>173945</bug_id>
          
          <creation_ts>2017-06-28 16:28:02 -0700</creation_ts>
          <short_desc>Async image decoding should be disabled for iBooks on tvOS</short_desc>
          <delta_ts>2017-07-05 14:08:28 -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>Images</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>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Said Abou-Hallawa">sabouhallawa</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1323729</commentid>
    <comment_count>0</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-06-28 16:28:02 -0700</bug_when>
    <thetext>The iBooks on tvOS is not a system application but it is an AppStore application. We need to disable async image decoding for iBooks on tvOS presently through WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1323762</commentid>
    <comment_count>1</comment_count>
      <attachid>314077</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-06-28 18:02:55 -0700</bug_when>
    <thetext>Created attachment 314077
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1323766</commentid>
    <comment_count>2</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-06-28 18:05:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/32516256&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1323771</commentid>
    <comment_count>3</comment_count>
      <attachid>314077</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-06-28 18:23:46 -0700</bug_when>
    <thetext>Comment on attachment 314077
Patch

Let&apos;s wait until we&apos;ve decided our general direction with async image decoding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324082</commentid>
    <comment_count>4</comment_count>
      <attachid>314077</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-06-29 13:55:02 -0700</bug_when>
    <thetext>Comment on attachment 314077
Patch

Clearing flags on attachment: 314077

Committed r218961: &lt;http://trac.webkit.org/changeset/218961&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324083</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-06-29 13:55:03 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324641</commentid>
    <comment_count>6</comment_count>
      <attachid>314077</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2017-06-30 16:47:57 -0700</bug_when>
    <thetext>Comment on attachment 314077
Patch

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

&gt; Source/WebCore/platform/graphics/BitmapImage.cpp:75
&gt; +#if PLATFORM(IOS)
&gt; +    if (!IOSApplication::isIBooks())
&gt; +#endif
&gt; +        m_allowLargeImageAsyncDecoding = settings.largeImageAsyncDecodingEnabled();

Wouldn’t it be slightly cleaner to set it to false when it is iOS iBooks instead of leaving it unset?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325204</commentid>
    <comment_count>7</comment_count>
      <attachid>314077</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-07-03 12:07:20 -0700</bug_when>
    <thetext>Comment on attachment 314077
Patch

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

&gt;&gt; Source/WebCore/platform/graphics/BitmapImage.cpp:75
&gt;&gt; +        m_allowLargeImageAsyncDecoding = settings.largeImageAsyncDecodingEnabled();
&gt; 
&gt; Wouldn’t it be slightly cleaner to set it to false when it is iOS iBooks instead of leaving it unset?

Do you mean for readability because m_allowLargeImageAsyncDecoding is initialized to false in the header file? So you recommend the following?

#if PLATFORM(IOS)
    if (IOSApplication::isIBooks())
        m_allowLargeImageAsyncDecoding = false;
    else 
#endif
        m_allowLargeImageAsyncDecoding = settings.largeImageAsyncDecodingEnabled();

I will do this clean up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325529</commentid>
    <comment_count>8</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-07-04 21:45:25 -0700</bug_when>
    <thetext>Committed r219125: &lt;http://trac.webkit.org/changeset/219125&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325736</commentid>
    <comment_count>9</comment_count>
      <attachid>314077</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-05 13:32:01 -0700</bug_when>
    <thetext>Comment on attachment 314077
Patch

This should also do a linked-on-or-after check so that this workaround is not permanent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325752</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-07-05 13:51:55 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #9)
&gt; Comment on attachment 314077 [details]
&gt; Patch
&gt; 
&gt; This should also do a linked-on-or-after check so that this workaround is
&gt; not permanent.

And should JUST be about Storytime, not all iBooks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325762</commentid>
    <comment_count>11</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-07-05 14:07:36 -0700</bug_when>
    <thetext>(In reply to Tim Horton from comment #10)
&gt; (In reply to Simon Fraser (smfr) from comment #9)
&gt; &gt; Comment on attachment 314077 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; This should also do a linked-on-or-after check so that this workaround is
&gt; &gt; not permanent.
&gt; 
&gt; And should JUST be about Storytime, not all iBooks.

Can you explain what linked-on-or-after check is? It also very helpful if you give an example for how check is implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325764</commentid>
    <comment_count>12</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-07-05 14:08:28 -0700</bug_when>
    <thetext>(In reply to Said Abou-Hallawa from comment #11)
&gt; (In reply to Tim Horton from comment #10)
&gt; &gt; (In reply to Simon Fraser (smfr) from comment #9)
&gt; &gt; &gt; Comment on attachment 314077 [details]
&gt; &gt; &gt; Patch
&gt; &gt; &gt; 
&gt; &gt; &gt; This should also do a linked-on-or-after check so that this workaround is
&gt; &gt; &gt; not permanent.
&gt; &gt; 
&gt; &gt; And should JUST be about Storytime, not all iBooks.
&gt; 
&gt; Can you explain what linked-on-or-after check is? It also very helpful if
&gt; you give an example for how check is implemented.

See all uses of dyld_get_program_sdk_version in the project.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>314077</attachid>
            <date>2017-06-28 18:02:55 -0700</date>
            <delta_ts>2017-06-29 13:55:02 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-173945-20170628180254.patch</filename>
            <type>text/plain</type>
            <size>2600</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09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