[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

simon.fraser at apple.com simon.fraser at apple.com
Thu Apr 8 02:19:16 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 20a0a79b30aaec1823f8c438b49f7e710cffad17
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 11 02:19:32 2010 +0000

    2010-03-10  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Darin Adler.
    
            https://bugs.webkit.org/show_bug.cgi?id=35975
            <rdar://problem/7739922> Flash 10.1b crashes when generating snapshots
    
            Do a version check before sending a drawRect event to a Flash plugin,
            since 10.1.d51 has a bug that crashes when called this way.
    
            * Plugins/Hosted/WebHostedNetscapePluginView.mm:
            (-[WebHostedNetscapePluginView drawRect:]):
            * Plugins/WebBaseNetscapePluginView.h:
            * Plugins/WebBaseNetscapePluginView.mm:
            (-[WebBaseNetscapePluginView supportsSnapshotting]):
            * Plugins/WebNetscapePluginView.mm:
            (-[WebNetscapePluginView drawRect:]):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55824 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 476786b..0688088 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,21 @@
+2010-03-10  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=35975
+        <rdar://problem/7739922> Flash 10.1b crashes when generating snapshots
+
+        Do a version check before sending a drawRect event to a Flash plugin,
+        since 10.1.d51 has a bug that crashes when called this way.
+        
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (-[WebHostedNetscapePluginView drawRect:]):
+        * Plugins/WebBaseNetscapePluginView.h:
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView supportsSnapshotting]):
+        * Plugins/WebNetscapePluginView.mm:
+        (-[WebNetscapePluginView drawRect:]):
+
 2010-03-10  John Sullivan  <sullivan at apple.com>
 
         Reviewed by Tim Hatcher.
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 7f18e77..156e117 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -377,7 +377,7 @@ extern "C" {
                 _proxy->didDraw();
             } else
                 _proxy->print(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height);
-        } else if ([self inFlatteningPaint]) {
+        } else if ([self inFlatteningPaint] && [self supportsSnapshotting]) {
             _proxy->snapshot(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height);
         }
 
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index 3fdf2c3..090bc4f 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -124,6 +124,7 @@ class WebHaltablePlugin;
 - (void)removeWindowObservers;
 - (BOOL)shouldClipOutPlugin;
 - (BOOL)inFlatteningPaint;
+- (BOOL)supportsSnapshotting;
 
 - (BOOL)convertFromX:(double)sourceX andY:(double)sourceY space:(NPCoordinateSpace)sourceSpace
                  toX:(double *)destX andY:(double *)destY space:(NPCoordinateSpace)destSpace;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 7458994..34a8464 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -572,6 +572,18 @@ String WebHaltablePlugin::pluginName() const
     return NO;
 }
 
+- (BOOL)supportsSnapshotting
+{
+    NSBundle *pluginBundle = [_pluginPackage.get() bundle];
+    if (![[pluginBundle bundleIdentifier] isEqualToString:@"com.macromedia.Flash Player.plugin"])
+        return YES;
+    
+    // Flash has a bogus Info.plist entry for CFBundleVersionString, so use CFBundleShortVersionString.
+    NSString *versionString = [pluginBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
+    // Flash 10.1d51 has a crashing bug if sent a drawRect event when using the CA rendering model: <rdar://problem/7739922>
+    return ![versionString isEqual:@"10.1.51.95"];
+}
+
 - (BOOL)hasBeenHalted
 {
     return _hasBeenHalted;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 008b72a..181cb87 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -1397,7 +1397,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 
 - (void)drawRect:(NSRect)rect
 {
-    if (drawingModel == NPDrawingModelCoreAnimation && ![self inFlatteningPaint])
+    if (drawingModel == NPDrawingModelCoreAnimation && (![self inFlatteningPaint] || ![self supportsSnapshotting]))
         return;
 
     if (!_isStarted)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list