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

kdecker at apple.com kdecker at apple.com
Thu Apr 8 00:56:16 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 97ccf9ed053e575a616d20047551d738e484f5b9
Author: kdecker at apple.com <kdecker at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 7 01:01:10 2010 +0000

            Reviewed by Simon Fraser
    
            Second step of:
            <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
    
            * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
            * Plugins/Hosted/WebHostedNetscapePluginView.mm:
            (-[WebHostedNetscapePluginView pluginLayer]): Added.
            * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
            * Plugins/WebNetscapePluginView.mm:
            (-[WebNetscapePluginView pluginLayer]): Added.
            Reviewed by Simon Fraser.
    
            Second step of:
            <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
    
            * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
            * Plugins/Hosted/WebHostedNetscapePluginView.mm:
            (-[WebHostedNetscapePluginView pluginLayer]): Added.
            * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
            * Plugins/WebNetscapePluginView.mm:
            (-[WebNetscapePluginView pluginLayer]): Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52885 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ce9b2ec..1f00b1d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-06  Kevin Decker  <kdecker at apple.com>
+
+        Reviewed by Simon Fraser
+
+        Second step of:
+        <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+        * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (-[WebHostedNetscapePluginView pluginLayer]): Added.
+        * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+        * Plugins/WebNetscapePluginView.mm:
+        (-[WebNetscapePluginView pluginLayer]): Added.
+
 2010-01-06  Adam Barth  <abarth at webkit.org>
 
         No review, rolling out r52877.
diff --git a/WebCore/platform/Widget.h b/WebCore/platform/Widget.h
index 1e6d7a7..a713afa 100644
--- a/WebCore/platform/Widget.h
+++ b/WebCore/platform/Widget.h
@@ -163,7 +163,7 @@ public:
 
     virtual bool isFrameView() const { return false; }
     virtual bool isPluginView() const { return false; }
-    // FIXME: The Mac plug-in code should inheirt from PluginView. When this happens PluginWidget and PluginView can become one class. 
+    // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginWidget and PluginView can become one class. 
     virtual bool isPluginWidget() const { return false; }
     virtual bool isScrollbar() const { return false; }
 
diff --git a/WebCore/plugins/PluginWidget.h b/WebCore/plugins/PluginWidget.h
index ef59998..e7619f8 100644
--- a/WebCore/plugins/PluginWidget.h
+++ b/WebCore/plugins/PluginWidget.h
@@ -26,15 +26,19 @@
 #define PluginWidget_h
 
 #include "Widget.h"
+#include "GraphicsLayer.h"
 
 namespace WebCore {
 
-// FIXME: The Mac plug-in code should inheirt from PluginView. When
-// this happens PluginWidget and PluginView can become one class. 
 class PluginWidget : public Widget {
+    
 public:
     PluginWidget(PlatformWidget widget = 0) : Widget(widget) { }
-
+#if USE(ACCELERATED_COMPOSITING)
+    PlatformLayer* platformLayer() const;
+#endif
+    
+private:
     virtual void invalidateRect(const IntRect&);
     virtual bool isPluginWidget() const { return true; }
 };
diff --git a/WebCore/plugins/mac/PluginWidgetMac.mm b/WebCore/plugins/mac/PluginWidgetMac.mm
index 13d2e23..f407928 100644
--- a/WebCore/plugins/mac/PluginWidgetMac.mm
+++ b/WebCore/plugins/mac/PluginWidgetMac.mm
@@ -25,6 +25,11 @@
 #include "config.h"
 #include "PluginWidget.h"
 
+#if USE(ACCELERATED_COMPOSITING)
+ at interface NSView (WebKitSecretsWebCoreKnowsAbout)
+- (CALayer *)pluginLayer;
+ at end
+#endif
 namespace WebCore {
 
 void PluginWidget::invalidateRect(const IntRect& rect)
@@ -32,4 +37,13 @@ void PluginWidget::invalidateRect(const IntRect& rect)
     [platformWidget() setNeedsDisplayInRect:rect];
 }
 
+#if USE(ACCELERATED_COMPOSITING)
+PlatformLayer* PluginWidget::platformLayer() const
+{
+    if (![platformWidget() respondsToSelector:@selector(pluginLayer)])
+        return 0;
+    
+    return [platformWidget() pluginLayer];   
+}
+#endif
 } // namespace WebCore
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index c279aa1..293e799 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,5 +1,19 @@
 2010-01-06  Kevin Decker  <kdecker at apple.com>
 
+        Reviewed by Simon Fraser.
+
+        Second step of:
+        <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+        * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (-[WebHostedNetscapePluginView pluginLayer]): Added.
+        * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+        * Plugins/WebNetscapePluginView.mm:
+        (-[WebNetscapePluginView pluginLayer]): Added.
+
+2010-01-06  Kevin Decker  <kdecker at apple.com>
+
         Reviewed by Eric Carlson.
 
         First step toward:
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
index 323350d..5313ff2 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
@@ -59,7 +59,7 @@ namespace WebKit {
             element:(PassRefPtr<WebCore::HTMLPlugInElement>)element;
 
 - (void)pluginHostDied;
-
+- (CALayer *)pluginLayer;
 - (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason;
 
 @end
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 9a16160..d8d75e6 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -121,6 +121,12 @@ extern "C" {
     return YES;
 }
 
+// FIXME: This method is an ideal candidate to move up to the base class
+- (CALayer *)pluginLayer
+{
+    return _pluginLayer.get();
+}
+
 - (void)setLayer:(CALayer *)newLayer
 {
     // FIXME: This should use the same implementation as WebNetscapePluginView (and move to the base class).
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h
index b2583da..2ee566e 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.h
@@ -151,7 +151,9 @@ typedef union PluginPort {
 @interface WebNetscapePluginView (WebInternal)
 - (BOOL)sendEvent:(void*)event isDrawRect:(BOOL)eventIsDrawRect;
 - (NPEventModel)eventModel;
-
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer;
+#endif
 - (NPError)loadRequest:(NSURLRequest *)request inTarget:(NSString *)target withNotifyData:(void *)notifyData sendNotification:(BOOL)sendNotification;
 - (NPError)getURLNotify:(const char *)URL target:(const char *)target notifyData:(void *)notifyData;
 - (NPError)getURL:(const char *)URL target:(const char *)target;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 3ce5e39..264449c 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -1106,6 +1106,12 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 }
 
 #ifndef BUILDING_ON_TIGER
+// FIXME: This method is an ideal candidate to move up to the base class
+- (CALayer *)pluginLayer
+{
+    return _pluginLayer.get();
+}
+
 - (void)setLayer:(CALayer *)newLayer
 {
     [super setLayer:newLayer];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list