[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 11:18:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f0fc23fa3e90f5dd6a1a6202d391b0ff302618d3
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 19 00:09:01 2010 +0000
Move PluginWidget to WebKit
https://bugs.webkit.org/show_bug.cgi?id=42530
Reviewed by Sam Weinig.
WebCore:
Rename the PluginWidget class to PluginViewBase and make it an abstract base class.
This is a stopgap measure until we have a single PluginView class that we can use everywhere.
* WebCore.exp.in:
Remove PluginWidget symbols.
* WebCore.xcodeproj/project.pbxproj:
Update.
* platform/Widget.h:
(WebCore::Widget::isPluginViewBase):
Return false.
* plugins/PluginViewBase.h: Added.
(WebCore::PluginViewBase::platformLayer):
Always return 0 here now.
(WebCore::PluginViewBase::isPluginViewBase):
Return true.
* plugins/PluginWidget.h: Removed.
* plugins/mac/PluginWidgetMac.mm: Removed.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
Cast to PluginWidgetBase instead.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
Cast to PluginWidgetBase instead.
WebKit/mac:
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView pluginLayer]):
Add default pluginLayer implementation.
* WebCoreSupport/WebFrameLoaderClient.mm:
(PluginWidget::PluginWidget):
(PluginWidget::invalidateRect):
Move the guts of PluginWidget here from WebCore.
(NetscapePluginWidget::platformLayer):
Get the layer from the plug-in view.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3af023c..d36d32a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,41 @@
+2010-07-18 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move PluginWidget to WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=42530
+
+ Rename the PluginWidget class to PluginViewBase and make it an abstract base class.
+
+ This is a stopgap measure until we have a single PluginView class that we can use everywhere.
+
+ * WebCore.exp.in:
+ Remove PluginWidget symbols.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Update.
+
+ * platform/Widget.h:
+ (WebCore::Widget::isPluginViewBase):
+ Return false.
+
+ * plugins/PluginViewBase.h: Added.
+ (WebCore::PluginViewBase::platformLayer):
+ Always return 0 here now.
+
+ (WebCore::PluginViewBase::isPluginViewBase):
+ Return true.
+
+ * plugins/PluginWidget.h: Removed.
+ * plugins/mac/PluginWidgetMac.mm: Removed.
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
+ Cast to PluginWidgetBase instead.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+ Cast to PluginWidgetBase instead.
+
2010-07-18 Dean Jackson <dino at apple.com>
Unreviewed.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index bd1c854..45ad83c 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -249,7 +249,6 @@ __ZN7WebCore12IconDatabase27checkIntegrityBeforeOpeningEv
__ZN7WebCore12IconDatabase4openERKNS_6StringE
__ZN7WebCore12IconDatabase5closeEv
__ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE
-__ZN7WebCore12PluginWidget14invalidateRectERKNS_7IntRectE
__ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci
__ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE
__ZN7WebCore12PrintContext16isPageBoxVisibleEPNS_5FrameEi
@@ -1009,7 +1008,6 @@ __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv
__ZNK7WebCore9PageCache10frameCountEv
__ZNK7WebCore9PageCache21autoreleasedPageCountEv
__ZTVN7WebCore12ChromeClientE
-__ZTVN7WebCore12PluginWidgetE
__ZTVN7WebCore17FileChooserClientE
__ZTVN7WebCore17FrameLoaderClientE
__ZTVN7WebCore25HistoryPropertyListWriterE
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 596a061..285e504 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -195,8 +195,7 @@
08E6E0F10EFF42BA00029FBF /* WMLFieldSetElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */; };
08E6E0F20EFF42BA00029FBF /* WMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */; };
0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */; };
- 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */; };
0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; };
0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
@@ -5826,8 +5825,7 @@
08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLElementFactory.cpp; sourceTree = "<group>"; };
08FB84B10ECE373300DC064E /* WMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLElementFactory.h; sourceTree = "<group>"; };
0A4844980CA44CB200B7BD48 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
- 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PluginWidgetMac.mm; path = mac/PluginWidgetMac.mm; sourceTree = "<group>"; };
- 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginWidget.h; sourceTree = "<group>"; };
+ 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginViewBase.h; sourceTree = "<group>"; };
0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; };
0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentThreadableLoader.cpp; sourceTree = "<group>"; };
0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentThreadableLoader.h; sourceTree = "<group>"; };
@@ -11076,14 +11074,6 @@
tabWidth = 4;
usesTabs = 0;
};
- 0AFDAC3610F5447400E1F3D2 /* mac */ = {
- isa = PBXGroup;
- children = (
- 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */,
- );
- name = mac;
- sourceTree = "<group>";
- };
14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
isa = PBXGroup;
children = (
@@ -12029,7 +12019,6 @@
5DCF83690D59157800953BC6 /* plugins */ = {
isa = PBXGroup;
children = (
- 0AFDAC3610F5447400E1F3D2 /* mac */,
A9C6E4E10D745E05006442E9 /* DOMMimeType.cpp */,
A9C6E4E20D745E05006442E9 /* DOMMimeType.h */,
A9C6E65E0D7466F2006442E9 /* DOMMimeType.idl */,
@@ -12048,8 +12037,8 @@
1ADA140E0E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp */,
1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */,
1AA8798F11CBE846003C664F /* PluginStrategy.h */,
+ 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */,
76FF17E211235673001D61B5 /* PluginViewNone.cpp */,
- 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */,
);
path = plugins;
sourceTree = "<group>";
@@ -19095,7 +19084,7 @@
7693BAD5106C2DCA007B0823 /* PluginHalterClient.h in Headers */,
1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */,
1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */,
- 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */,
+ 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */,
B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */,
97059978107D975200A50A7C /* PolicyCallback.h in Headers */,
9705997A107D975200A50A7C /* PolicyChecker.h in Headers */,
@@ -21570,7 +21559,6 @@
7693BAD3106C2DCA007B0823 /* PluginHalter.cpp in Sources */,
1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */,
76FF17E311235673001D61B5 /* PluginViewNone.cpp in Sources */,
- 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */,
B2B1F7160D00CAA8004AEA64 /* PointerEventsHitRules.cpp in Sources */,
97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */,
97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */,
diff --git a/WebCore/platform/Widget.h b/WebCore/platform/Widget.h
index 3e813fb..e118ccb 100644
--- a/WebCore/platform/Widget.h
+++ b/WebCore/platform/Widget.h
@@ -182,8 +182,8 @@ public:
virtual bool isFrameView() const { return false; }
virtual bool isPluginView() const { return false; }
- // 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; }
+ // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginViewBase and PluginView can become one class.
+ virtual bool isPluginViewBase() const { return false; }
virtual bool isScrollbar() const { return false; }
void removeFromParent();
diff --git a/WebCore/plugins/PluginViewBase.h b/WebCore/plugins/PluginViewBase.h
new file mode 100644
index 0000000..9d3f463
--- /dev/null
+++ b/WebCore/plugins/PluginViewBase.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PluginWidget_h
+#define PluginWidget_h
+
+#include "Widget.h"
+#include "GraphicsLayer.h"
+
+namespace WebCore {
+
+// PluginViewBase is a widget that all plug-in views inherit from, both in Webkit and WebKit2.
+// It's intended as a stopgap measure until we can merge all plug-in views into a single plug-in view.
+class PluginViewBase : public Widget {
+public:
+#if USE(ACCELERATED_COMPOSITING)
+ virtual PlatformLayer* platformLayer() const { return 0; }
+#endif
+
+protected:
+ PluginViewBase(PlatformWidget widget) : Widget(widget) { }
+
+private:
+ virtual bool isPluginViewBase() const { return true; }
+};
+
+} // namespace WebCore
+
+#endif // PluginWidget_h
diff --git a/WebCore/plugins/PluginWidget.h b/WebCore/plugins/PluginWidget.h
deleted file mode 100644
index 7a76fc1..0000000
--- a/WebCore/plugins/PluginWidget.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PluginWidget_h
-#define PluginWidget_h
-
-#include "Widget.h"
-#include "GraphicsLayer.h"
-
-namespace WebCore {
-
-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; }
-};
-
-#if USE(ACCELERATED_COMPOSITING) && !PLATFORM(MAC)
-inline PlatformLayer* PluginWidget::platformLayer() const
-{
- return 0;
-}
-#endif
-
-} // namespace WebCore
-
-#endif // PluginWidget_h
diff --git a/WebCore/plugins/mac/PluginWidgetMac.mm b/WebCore/plugins/mac/PluginWidgetMac.mm
deleted file mode 100644
index f407928..0000000
--- a/WebCore/plugins/mac/PluginWidgetMac.mm
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#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)
-{
- [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/WebCore/rendering/RenderEmbeddedObject.cpp b/WebCore/rendering/RenderEmbeddedObject.cpp
index de9ca17..e72825e 100644
--- a/WebCore/rendering/RenderEmbeddedObject.cpp
+++ b/WebCore/rendering/RenderEmbeddedObject.cpp
@@ -42,7 +42,7 @@
#include "MouseEvent.h"
#include "Page.h"
#include "Path.h"
-#include "PluginWidget.h"
+#include "PluginViewBase.h"
#include "RenderTheme.h"
#include "RenderView.h"
#include "RenderWidgetProtector.h"
@@ -53,10 +53,6 @@
#include "HTMLVideoElement.h"
#endif
-#if USE(ACCELERATED_COMPOSITING)
-#include "PluginWidget.h"
-#endif
-
namespace WebCore {
using namespace HTMLNames;
@@ -102,7 +98,7 @@ bool RenderEmbeddedObject::requiresLayer() const
bool RenderEmbeddedObject::allowsAcceleratedCompositing() const
{
- return widget() && widget()->isPluginWidget() && static_cast<PluginWidget*>(widget())->platformLayer();
+ return widget() && widget()->isPluginViewBase() && static_cast<PluginViewBase*>(widget())->platformLayer();
}
#endif
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index 2ce9b9d..574c658 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -43,7 +43,7 @@
#include "HTMLNames.h"
#include "InspectorTimelineAgent.h"
#include "KeyframeList.h"
-#include "PluginWidget.h"
+#include "PluginViewBase.h"
#include "RenderBox.h"
#include "RenderIFrame.h"
#include "RenderImage.h"
@@ -262,8 +262,8 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
updateImageContents();
if (renderer()->isEmbeddedObject() && toRenderEmbeddedObject(renderer())->allowsAcceleratedCompositing()) {
- PluginWidget* pluginWidget = static_cast<PluginWidget*>(toRenderEmbeddedObject(renderer())->widget());
- m_graphicsLayer->setContentsToMedia(pluginWidget->platformLayer());
+ PluginViewBase* pluginViewBase = static_cast<PluginViewBase*>(toRenderEmbeddedObject(renderer())->widget());
+ m_graphicsLayer->setContentsToMedia(pluginViewBase->platformLayer());
}
#if ENABLE(VIDEO)
else if (renderer()->isVideo()) {
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 7468076..fe84879 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-18 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move PluginWidget to WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=42530
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginLayer]):
+ Add default pluginLayer implementation.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (PluginWidget::PluginWidget):
+ (PluginWidget::invalidateRect):
+ Move the guts of PluginWidget here from WebCore.
+
+ (NetscapePluginWidget::platformLayer):
+ Get the layer from the plug-in view.
+
2010-07-18 David Kilzer <ddkilzer at apple.com>
<http://webkit.org/b/42522> Add missing (id) return type to Obj-C methods
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index 81d801a..4c8ea84 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -140,6 +140,10 @@ class WebHaltablePlugin;
- (void)invalidatePluginContentRect:(NSRect)rect;
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer;
+#endif
+
@end
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index bcef2a1..6ae7334 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -948,6 +948,14 @@ String WebHaltablePlugin::pluginName() const
}
}
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer
+{
+ ASSERT_NOT_REACHED();
+ return nil;
+}
+#endif
+
@end
namespace WebKit {
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index d72f4ed..cff0cce 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -103,7 +103,7 @@
#import <WebCore/MouseEvent.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformString.h>
-#import <WebCore/PluginWidget.h>
+#import <WebCore/PluginViewBase.h>
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceHandle.h>
#import <WebCore/ResourceLoader.h>
@@ -1502,6 +1502,20 @@ static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage,
return view;
}
+class PluginWidget : public PluginViewBase {
+public:
+ PluginWidget(NSView *view = 0)
+ : PluginViewBase(view)
+ {
+ }
+
+private:
+ virtual void invalidateRect(const IntRect& rect)
+ {
+ [platformWidget() setNeedsDisplayInRect:rect];
+ }
+};
+
#if ENABLE(NETSCAPE_PLUGIN_API)
class NetscapePluginWidget : public PluginWidget {
@@ -1511,6 +1525,13 @@ public:
{
}
+#if USE(ACCELERATED_COMPOSITING)
+ virtual PlatformLayer* platformLayer() const
+ {
+ return [(WebBaseNetscapePluginView *)platformWidget() pluginLayer];
+ }
+#endif
+
virtual void handleEvent(Event* event)
{
Frame* frame = Frame::frameForWidget(this);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list