Reviewed by Maciej Stachowiak.
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2007 06:20:28 +0000 (06:20 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2007 06:20:28 +0000 (06:20 +0000)
        - Fixed <rdar://problem/5049509> REGRESSION(10.4.9-9A377a): REAP Suite
        installer shows empty modal alert window (hangs) if user cancels during
        "installing shared components" phase

        Added Adobe installers to the family of apps that need a data load
        loading quirk.

        Added a linked-on-or-after check because this code is no longer
        Tiger-only.

        I tested this code on Tiger and Leopard.

        * Misc/WebKitVersionChecks.h:
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebDocumentLoaderMac.mm:
        (needsDataLoadWorkaround):
        (WebDocumentLoaderMac::setDataSource):

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

WebKit/ChangeLog
WebKit/Misc/WebKitVersionChecks.h
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebDocumentLoaderMac.mm

index 11b269aacc84bb6c2fa612aba29a48255f498101..ffacde4c6db959aef9aca5cb098a5d39b29f28e2 100644 (file)
@@ -1,3 +1,25 @@
+2007-07-10  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        - Fixed <rdar://problem/5049509> REGRESSION(10.4.9-9A377a): REAP Suite 
+        installer shows empty modal alert window (hangs) if user cancels during
+        "installing shared components" phase
+        
+        Added Adobe installers to the family of apps that need a data load
+        loading quirk.
+        
+        Added a linked-on-or-after check because this code is no longer 
+        Tiger-only.
+        
+        I tested this code on Tiger and Leopard.
+
+        * Misc/WebKitVersionChecks.h:
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebView/WebDocumentLoaderMac.mm:
+        (needsDataLoadWorkaround):
+        (WebDocumentLoaderMac::setDataSource):
+
 2007-07-10  Darin Adler  <darin@apple.com>
 
         - fix build
index fdd581abd6a4abed07f48198f632c57f90af12b4..afead94a844718559e5c2343137bdba7a26bd203 100644 (file)
@@ -37,6 +37,7 @@
 #define WEBKIT_FIRST_VERSION_WITHOUT_QUICKBOOKS_QUIRK 0x020A0000 // 522.0.0
 #define WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK 0x020A0000 // 522.0.0
 #define WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS 0x020A0000 // 522.0.0
+#define WEBKIT_FIRST_VERSION_WITHOUT_ADOBE_INSTALLER_QUIRK 0x020A0000 // 522.0.0
 
 #ifdef __cplusplus
 extern "C" {
index 366881f2234597503b1a60ab4ffd132d2f423a81..fa282e346e557520e9a3153ce34d58171083cda5 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
+                       projectRoot = "";
                        targets = (
                                9398100A0824BF01008DF038 /* WebKit */,
                        );
index 26e60a41ce402f0a6544aaf26c14e476846d4f6e..000fa6f802aede5698b2aba16ee1c757afcaed15 100644 (file)
@@ -28,6 +28,7 @@
 
 #import "WebDocumentLoaderMac.h"
 
+#import "WebKitVersionChecks.h"
 #import "WebView.h"
 
 using namespace WebCore;
@@ -39,17 +40,25 @@ WebDocumentLoaderMac::WebDocumentLoaderMac(const ResourceRequest& request, const
 {
 }
 
-static inline bool needsAppKitWorkaround(WebView *webView)
+static inline bool needsDataLoadWorkaround(WebView *webView)
 {
-#ifndef BUILDING_ON_TIGER
-    return false;
-#else    
+#ifdef BUILDING_ON_TIGER
+    // Tiger has to be a little less efficient.
     id frameLoadDelegate = [webView frameLoadDelegate];
     if (!frameLoadDelegate)
         return false;
-    
+
     NSString *bundleIdentifier = [[NSBundle bundleForClass:[frameLoadDelegate class]] bundleIdentifier];
-    return [bundleIdentifier isEqualToString:@"com.apple.AppKit"];
+
+    if ([bundleIdentifier isEqualToString:@"com.apple.AppKit"])
+        return true;
+    if ([bundleIdentifier isEqualToString:@"com.adobe.Installers.Setup"])
+        return true;
+    return false;
+#else
+    static bool needsWorkaround = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK) 
+                                  && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.adobe.Installers.Setup"];
+    return needsWorkaround;
 #endif
 }
 
@@ -64,11 +73,10 @@ void WebDocumentLoaderMac::setDataSource(WebDataSource *dataSource, WebView *web
     m_resourceLoadDelegate = [webView resourceLoadDelegate];
     m_downloadDelegate = [webView downloadDelegate];
     
-    // Work around a bug in Tiger AppKit's use of WebKit. The particular idiom used
-    // won't allow the timer to run, so deferring the main resource load with a timer
-    // causes a delay until something else wakes the run loop.
-    // See <rdar://problem/5266289>
-    if (needsAppKitWorkaround(webView))
+    // Some clients run the run loop in a way that prevents the data load timer
+    // from firing. We work around that issue here. See <rdar://problem/5266289>
+    // and <rdar://problem/5049509>.
+    if (needsDataLoadWorkaround(webView))
         m_deferMainResourceDataLoad = false;
 }