<?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>139453</bug_id>
          
          <creation_ts>2014-12-09 11:19:06 -0800</creation_ts>
          <short_desc>REGRESSION (r173272): When open PDF from Safari in iBooks, title is replaced to “QuickLookPDF-s72DbgAU-1”</short_desc>
          <delta_ts>2014-12-09 16:35:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>528+ (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="Antti Koivisto">koivisto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>psolanki</cc>
    
    <cc>yongjun_zhang</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1053877</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-12-09 11:19:06 -0800</bug_when>
    <thetext>Bug in CFNetwork code path</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053882</commentid>
    <comment_count>1</comment_count>
      <attachid>242947</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-12-09 11:29:43 -0800</bug_when>
    <thetext>Created attachment 242947
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053883</commentid>
    <comment_count>2</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-12-09 11:30:32 -0800</bug_when>
    <thetext>rdar://problem/19052192</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053896</commentid>
    <comment_count>3</comment_count>
      <attachid>242947</attachid>
    <who name="Pratik Solanki">psolanki</who>
    <bug_when>2014-12-09 11:57:56 -0800</bug_when>
    <thetext>Comment on attachment 242947
patch

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

&gt; Source/WebCore/ChangeLog:4
&gt; +        https://bugs.webkit.org/show_bug.cgi?id=139453

Can you add the radar link here as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053901</commentid>
    <comment_count>4</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-12-09 12:07:11 -0800</bug_when>
    <thetext>https://trac.webkit.org/r177031</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053941</commentid>
    <comment_count>5</comment_count>
      <attachid>242947</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-12-09 14:08:54 -0800</bug_when>
    <thetext>Comment on attachment 242947
patch

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

&gt; Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp:133
&gt; -    RetainPtr&lt;CFStringRef&gt; suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(m_cfResponse.get()));
&gt; +    RetainPtr&lt;CFStringRef&gt; suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(cfURLResponse()));
&gt;      return suggestedFilename.get();

I think that code like this reads better without a local RetainPtr variable:

    return adoptCF(CFURLResponseCopySuggestedFilename(cfURLResponse())).get();

In fact, I would write this:

    CFURLResponseRef underlyingResponse = cfURLResponse();
    if (!underlyingResponse)
        return String();
    return adoptCF(CFURLResponseCopySuggestedFilename(underlyingResponse)).get();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053988</commentid>
    <comment_count>6</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-12-09 16:35:15 -0800</bug_when>
    <thetext>&gt;     CFURLResponseRef underlyingResponse = cfURLResponse();
&gt;     if (!underlyingResponse)
&gt;         return String();
&gt;     return adoptCF(CFURLResponseCopySuggestedFilename(underlyingResponse)).get();

I wouldn&apos;t call it &apos;underlying&apos; though as it doesn&apos;t describe the role of a synthesized CFURLResponse very well.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>242947</attachid>
            <date>2014-12-09 11:29:43 -0800</date>
            <delta_ts>2014-12-09 11:57:56 -0800</delta_ts>
            <desc>patch</desc>
            <filename>suggested-filename-cfnet.patch</filename>
            <type>text/plain</type>
            <size>1710</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE3NzAyNykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDE0LTEyLTA5ICBBbnR0aSBL
b2l2aXN0byAgPGFudHRpQGFwcGxlLmNvbT4KKworICAgICAgICBSRUdSRVNTSU9OIChyMTczMjcy
KTogV2hlbiBvcGVuIFBERiBmcm9tIFNhZmFyaSBpbiBpQm9va3MsIHRpdGxlIGlzIHJlcGxhY2Vk
IHRvIOKAnFF1aWNrTG9va1BERi1zNzJEYmdBVS0x4oCdCisgICAgICAgIGh0dHBzOi8vYnVncy53
ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMzk0NTMKKworICAgICAgICBSZXZpZXdlZCBieSBO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EAgQ2VydGlmaWNhdGVJbmZvIFJlc291cmNlUmVzcG9uc2U6OnBsYXRmbwogCiBTdHJpbmcg
UmVzb3VyY2VSZXNwb25zZTo6cGxhdGZvcm1TdWdnZXN0ZWRGaWxlbmFtZSgpIGNvbnN0CiB7Ci0g
ICAgaWYgKCFtX2NmUmVzcG9uc2UpCisgICAgaWYgKCFjZlVSTFJlc3BvbnNlKCkpCiAgICAgICAg
IHJldHVybiBTdHJpbmcoKTsKLQotICAgIFJldGFpblB0cjxDRlN0cmluZ1JlZj4gc3VnZ2VzdGVk
RmlsZW5hbWUgPSBhZG9wdENGKENGVVJMUmVzcG9uc2VDb3B5U3VnZ2VzdGVkRmlsZW5hbWUobV9j
ZlJlc3BvbnNlLmdldCgpKSk7CisgICAgUmV0YWluUHRyPENGU3RyaW5nUmVmPiBzdWdnZXN0ZWRG
aWxlbmFtZSA9IGFkb3B0Q0YoQ0ZVUkxSZXNwb25zZUNvcHlTdWdnZXN0ZWRGaWxlbmFtZShjZlVS
TFJlc3BvbnNlKCkpKTsKICAgICByZXR1cm4gc3VnZ2VzdGVkRmlsZW5hbWUuZ2V0KCk7CiB9CiAK
</data>
<flag name="review"
          id="267798"
          type_id="1"
          status="+"
          setter="psolanki"
    />
          </attachment>
      

    </bug>

</bugzilla>