Commit 97ccf9ed authored by kdecker@apple.com's avatar kdecker@apple.com
Browse files

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
parent e77c5962
2010-01-06 Kevin Decker <kdecker@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@webkit.org>
 
No review, rolling out r52877.
......@@ -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; }
......
......@@ -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; }
};
......
......@@ -25,6 +25,11 @@
#include "config.h"
#include "PluginWidget.h"
#if USE(ACCELERATED_COMPOSITING)
@interface NSView (WebKitSecretsWebCoreKnowsAbout)
- (CALayer *)pluginLayer;
@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
2010-01-06 Kevin Decker <kdecker@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@apple.com>
 
Reviewed by Eric Carlson.
......
......@@ -59,7 +59,7 @@ namespace WebKit {
element:(PassRefPtr<WebCore::HTMLPlugInElement>)element;
- (void)pluginHostDied;
- (CALayer *)pluginLayer;
- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason;
@end
......
......@@ -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).
......
......@@ -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;
......
......@@ -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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment