REGRESSION (r173272): When open PDF from Safari in iBooks, title is replaced to ...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Dec 2014 20:06:57 +0000 (20:06 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Dec 2014 20:06:57 +0000 (20:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139453
rdar://problem/19052192

Reviewed by Pratik Solanki.

Pulling the suggested filename from the platform response returned null string on USE(CFNETWORK) code path
if it was the first thing needed from it.

* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename): Use the lazy accessor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp

index e5aaa78..b61ab1c 100644 (file)
@@ -1,3 +1,17 @@
+2014-12-09  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION (r173272): When open PDF from Safari in iBooks, title is replaced to “QuickLookPDF-s72DbgAU-1”
+        https://bugs.webkit.org/show_bug.cgi?id=139453
+        rdar://problem/19052192
+
+        Reviewed by Pratik Solanki.
+
+        Pulling the suggested filename from the platform response returned null string on USE(CFNETWORK) code path
+        if it was the first thing needed from it.
+
+        * platform/network/cf/ResourceResponseCFNet.cpp:
+        (WebCore::ResourceResponse::platformSuggestedFilename): Use the lazy accessor.
+
 2014-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
 
         AX: [ATK] MathML tokens, tables, and row-like elements are exposed with ATK_ROLE_UNKNOWN
index fb39a97..07eed8d 100644 (file)
@@ -127,10 +127,9 @@ CertificateInfo ResourceResponse::platformCertificateInfo() const
 
 String ResourceResponse::platformSuggestedFilename() const
 {
-    if (!m_cfResponse)
+    if (!cfURLResponse())
         return String();
-
-    RetainPtr<CFStringRef> suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(m_cfResponse.get()));
+    RetainPtr<CFStringRef> suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(cfURLResponse()));
     return suggestedFilename.get();
 }