Changeset 63638 in webkit
- Timestamp:
- Jul 18, 2010 5:09:01 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 10 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63634 r63638 1 2010-07-18 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Move PluginWidget to WebKit 6 https://bugs.webkit.org/show_bug.cgi?id=42530 7 8 Rename the PluginWidget class to PluginViewBase and make it an abstract base class. 9 10 This is a stopgap measure until we have a single PluginView class that we can use everywhere. 11 12 * WebCore.exp.in: 13 Remove PluginWidget symbols. 14 15 * WebCore.xcodeproj/project.pbxproj: 16 Update. 17 18 * platform/Widget.h: 19 (WebCore::Widget::isPluginViewBase): 20 Return false. 21 22 * plugins/PluginViewBase.h: Added. 23 (WebCore::PluginViewBase::platformLayer): 24 Always return 0 here now. 25 26 (WebCore::PluginViewBase::isPluginViewBase): 27 Return true. 28 29 * plugins/PluginWidget.h: Removed. 30 * plugins/mac/PluginWidgetMac.mm: Removed. 31 * rendering/RenderEmbeddedObject.cpp: 32 (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing): 33 Cast to PluginWidgetBase instead. 34 35 * rendering/RenderLayerBacking.cpp: 36 (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): 37 Cast to PluginWidgetBase instead. 38 1 39 2010-07-18 Dean Jackson <dino@apple.com> 2 40 -
trunk/WebCore/WebCore.exp.in
r63631 r63638 250 250 __ZN7WebCore12IconDatabase5closeEv 251 251 __ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE 252 __ZN7WebCore12PluginWidget14invalidateRectERKNS_7IntRectE253 252 __ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci 254 253 __ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE … … 1010 1009 __ZNK7WebCore9PageCache21autoreleasedPageCountEv 1011 1010 __ZTVN7WebCore12ChromeClientE 1012 __ZTVN7WebCore12PluginWidgetE1013 1011 __ZTVN7WebCore17FileChooserClientE 1014 1012 __ZTVN7WebCore17FrameLoaderClientE -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r63634 r63638 196 196 08E6E0F20EFF42BA00029FBF /* WMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */; }; 197 197 0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */; settings = {ATTRIBUTES = (Private, ); }; }; 198 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */; }; 199 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */; settings = {ATTRIBUTES = (Private, ); }; }; 198 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 200 199 0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */; }; 201 200 0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; }; … … 5827 5826 08FB84B10ECE373300DC064E /* WMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLElementFactory.h; sourceTree = "<group>"; }; 5828 5827 0A4844980CA44CB200B7BD48 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; }; 5829 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PluginWidgetMac.mm; path = mac/PluginWidgetMac.mm; sourceTree = "<group>"; }; 5830 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginWidget.h; sourceTree = "<group>"; }; 5828 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginViewBase.h; sourceTree = "<group>"; }; 5831 5829 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; }; 5832 5830 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentThreadableLoader.cpp; sourceTree = "<group>"; }; … … 11077 11075 usesTabs = 0; 11078 11076 }; 11079 0AFDAC3610F5447400E1F3D2 /* mac */ = {11080 isa = PBXGroup;11081 children = (11082 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */,11083 );11084 name = mac;11085 sourceTree = "<group>";11086 };11087 11077 14DFB33F0A7DF7630018F769 /* Derived Sources */ = { 11088 11078 isa = PBXGroup; … … 12030 12020 isa = PBXGroup; 12031 12021 children = ( 12032 0AFDAC3610F5447400E1F3D2 /* mac */,12033 12022 A9C6E4E10D745E05006442E9 /* DOMMimeType.cpp */, 12034 12023 A9C6E4E20D745E05006442E9 /* DOMMimeType.h */, … … 12049 12038 1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */, 12050 12039 1AA8798F11CBE846003C664F /* PluginStrategy.h */, 12040 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */, 12051 12041 76FF17E211235673001D61B5 /* PluginViewNone.cpp */, 12052 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */,12053 12042 ); 12054 12043 path = plugins; … … 19096 19085 1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */, 19097 19086 1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */, 19098 0AFDAC3D10F5448C00E1F3D2 /* Plugin Widget.h in Headers */,19087 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */, 19099 19088 B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */, 19100 19089 97059978107D975200A50A7C /* PolicyCallback.h in Headers */, … … 21571 21560 1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */, 21572 21561 76FF17E311235673001D61B5 /* PluginViewNone.cpp in Sources */, 21573 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */,21574 21562 B2B1F7160D00CAA8004AEA64 /* PointerEventsHitRules.cpp in Sources */, 21575 21563 97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */, -
trunk/WebCore/platform/Widget.h
r62443 r63638 183 183 virtual bool isFrameView() const { return false; } 184 184 virtual bool isPluginView() const { return false; } 185 // FIXME: The Mac plug-in code should inherit from PluginView. When this happens Plugin Widgetand PluginView can become one class.186 virtual bool isPlugin Widget() const { return false; }185 // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginViewBase and PluginView can become one class. 186 virtual bool isPluginViewBase() const { return false; } 187 187 virtual bool isScrollbar() const { return false; } 188 188 -
trunk/WebCore/plugins/PluginViewBase.h
r63637 r63638 31 31 namespace WebCore { 32 32 33 class PluginWidget : public Widget { 34 33 // PluginViewBase is a widget that all plug-in views inherit from, both in Webkit and WebKit2. 34 // It's intended as a stopgap measure until we can merge all plug-in views into a single plug-in view. 35 class PluginViewBase : public Widget { 35 36 public: 36 PluginWidget(PlatformWidget widget = 0) : Widget(widget) { }37 37 #if USE(ACCELERATED_COMPOSITING) 38 PlatformLayer* platformLayer() const;38 virtual PlatformLayer* platformLayer() const { return 0; } 39 39 #endif 40 41 protected: 42 PluginViewBase(PlatformWidget widget) : Widget(widget) { } 40 43 41 44 private: 42 virtual void invalidateRect(const IntRect&); 43 virtual bool isPluginWidget() const { return true; } 45 virtual bool isPluginViewBase() const { return true; } 44 46 }; 45 46 #if USE(ACCELERATED_COMPOSITING) && !PLATFORM(MAC)47 inline PlatformLayer* PluginWidget::platformLayer() const48 {49 return 0;50 }51 #endif52 47 53 48 } // namespace WebCore -
trunk/WebCore/rendering/RenderEmbeddedObject.cpp
r62875 r63638 43 43 #include "Page.h" 44 44 #include "Path.h" 45 #include "Plugin Widget.h"45 #include "PluginViewBase.h" 46 46 #include "RenderTheme.h" 47 47 #include "RenderView.h" … … 52 52 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) 53 53 #include "HTMLVideoElement.h" 54 #endif55 56 #if USE(ACCELERATED_COMPOSITING)57 #include "PluginWidget.h"58 54 #endif 59 55 … … 103 99 bool RenderEmbeddedObject::allowsAcceleratedCompositing() const 104 100 { 105 return widget() && widget()->isPlugin Widget() && static_cast<PluginWidget*>(widget())->platformLayer();101 return widget() && widget()->isPluginViewBase() && static_cast<PluginViewBase*>(widget())->platformLayer(); 106 102 } 107 103 #endif -
trunk/WebCore/rendering/RenderLayerBacking.cpp
r63576 r63638 44 44 #include "InspectorTimelineAgent.h" 45 45 #include "KeyframeList.h" 46 #include "Plugin Widget.h"46 #include "PluginViewBase.h" 47 47 #include "RenderBox.h" 48 48 #include "RenderIFrame.h" … … 263 263 264 264 if (renderer()->isEmbeddedObject() && toRenderEmbeddedObject(renderer())->allowsAcceleratedCompositing()) { 265 Plugin Widget* pluginWidget = static_cast<PluginWidget*>(toRenderEmbeddedObject(renderer())->widget());266 m_graphicsLayer->setContentsToMedia(plugin Widget->platformLayer());265 PluginViewBase* pluginViewBase = static_cast<PluginViewBase*>(toRenderEmbeddedObject(renderer())->widget()); 266 m_graphicsLayer->setContentsToMedia(pluginViewBase->platformLayer()); 267 267 } 268 268 #if ENABLE(VIDEO) -
trunk/WebKit/mac/ChangeLog
r63632 r63638 1 2010-07-18 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Move PluginWidget to WebKit 6 https://bugs.webkit.org/show_bug.cgi?id=42530 7 8 * Plugins/WebBaseNetscapePluginView.h: 9 * Plugins/WebBaseNetscapePluginView.mm: 10 (-[WebBaseNetscapePluginView pluginLayer]): 11 Add default pluginLayer implementation. 12 13 * WebCoreSupport/WebFrameLoaderClient.mm: 14 (PluginWidget::PluginWidget): 15 (PluginWidget::invalidateRect): 16 Move the guts of PluginWidget here from WebCore. 17 18 (NetscapePluginWidget::platformLayer): 19 Get the layer from the plug-in view. 20 1 21 2010-07-18 David Kilzer <ddkilzer@apple.com> 2 22 -
trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
r56825 r63638 141 141 - (void)invalidatePluginContentRect:(NSRect)rect; 142 142 143 #ifndef BUILDING_ON_TIGER 144 - (CALayer *)pluginLayer; 145 #endif 146 143 147 @end 144 148 -
trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
r61581 r63638 949 949 } 950 950 951 #ifndef BUILDING_ON_TIGER 952 - (CALayer *)pluginLayer 953 { 954 ASSERT_NOT_REACHED(); 955 return nil; 956 } 957 #endif 958 951 959 @end 952 960 -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r61581 r63638 104 104 #import <WebCore/Page.h> 105 105 #import <WebCore/PlatformString.h> 106 #import <WebCore/Plugin Widget.h>106 #import <WebCore/PluginViewBase.h> 107 107 #import <WebCore/ResourceError.h> 108 108 #import <WebCore/ResourceHandle.h> … … 1503 1503 } 1504 1504 1505 class PluginWidget : public PluginViewBase { 1506 public: 1507 PluginWidget(NSView *view = 0) 1508 : PluginViewBase(view) 1509 { 1510 } 1511 1512 private: 1513 virtual void invalidateRect(const IntRect& rect) 1514 { 1515 [platformWidget() setNeedsDisplayInRect:rect]; 1516 } 1517 }; 1518 1505 1519 #if ENABLE(NETSCAPE_PLUGIN_API) 1506 1520 … … 1512 1526 } 1513 1527 1528 #if USE(ACCELERATED_COMPOSITING) 1529 virtual PlatformLayer* platformLayer() const 1530 { 1531 return [(WebBaseNetscapePluginView *)platformWidget() pluginLayer]; 1532 } 1533 #endif 1534 1514 1535 virtual void handleEvent(Event* event) 1515 1536 {
Note: See TracChangeset
for help on using the changeset viewer.