Changeset 62964 in webkit
- Timestamp:
- Jul 9, 2010 10:14:03 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r62963 r62964 1 2010-07-09 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Instantiate Netscape plug-ins, pass geometry information to Plugin 6 https://bugs.webkit.org/show_bug.cgi?id=41960 7 8 * WebCore.exp.in: 9 Export ScrollView::contentsToWindow. 10 1 11 2010-07-09 Patrick Gansterer <paroga@paroga.com> 2 12 -
trunk/WebCore/WebCore.exp.in
r62876 r62964 778 778 __ZNK7WebCore10ScrollView12documentViewEv 779 779 __ZNK7WebCore10ScrollView14scrollbarModesERNS_13ScrollbarModeES2_ 780 __ZNK7WebCore10ScrollView16contentsToWindowERKNS_7IntRectE 780 781 __ZNK7WebCore10ScrollView18visibleContentRectEb 781 782 __ZNK7WebCore11CachedImage5imageEv -
trunk/WebKit2/ChangeLog
r62959 r62964 1 2010-07-09 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Instantiate Netscape plug-ins, pass geometry information to Plugin 6 https://bugs.webkit.org/show_bug.cgi?id=41960 7 8 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: 9 Handle NPNVsupportsCoreGraphicsBool and NPNVsupportsCocoaBool. 10 11 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 12 (WebKit::NetscapePlugin::NetscapePlugin): 13 Set npp.ndata. 14 15 (WebKit::NetscapePlugin::initialize): 16 Try to instantiate the plug-in by calling NPP_New. 17 18 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 19 Store the NetscapePluginModule and the NPP struct. 20 21 * WebProcess/Plugins/Netscape/NetscapePluginModule.h: 22 Add a getter for the NPPluginFuncs vtable. 23 24 * WebProcess/Plugins/PluginView.cpp: 25 (WebKit::PluginView::frameRectsChanged): 26 Make sure to call viewGeometryDidChange. 27 28 (WebKit::PluginView::setParent): 29 Ditto. 30 31 (WebKit::PluginView::viewGeometryDidChange): 32 Convert the frame rect to window coordinates and pass it to the plug-in. 33 34 * WebProcess/Plugins/PluginView.h: 35 Add function declarations. 36 1 37 2010-07-08 Diego Gonzalez <diegohcg@webkit.org> 2 38 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
r62865 r62964 203 203 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value) 204 204 { 205 notImplemented(); 206 return NPERR_GENERIC_ERROR; 205 switch (variable) { 206 #if PLATFORM(MAC) 207 case NPNVsupportsCoreGraphicsBool: 208 // Always claim to support the Core Graphics drawing model. 209 *(NPBool *)value = true; 210 break; 211 212 case NPNVsupportsCocoaBool: 213 // Always claim to support the Cocoa event model. 214 *(NPBool *)value = true; 215 break; 216 #endif 217 default: 218 notImplemented(); 219 return NPERR_GENERIC_ERROR; 220 } 221 222 return NPERR_NO_ERROR; 207 223 } 208 224 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r62869 r62964 26 26 #include "NetscapePlugin.h" 27 27 28 #include <WebCore/IntRect.h> 29 28 30 using namespace WebCore; 29 31 … … 31 33 32 34 NetscapePlugin::NetscapePlugin(PassRefPtr<NetscapePluginModule> pluginModule) 35 : m_pluginModule(pluginModule) 33 36 { 37 m_npp.ndata = this; 38 m_npp.pdata = 0; 34 39 } 35 40 … … 40 45 bool NetscapePlugin::initialize(const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 41 46 { 47 uint16_t mode = loadManually ? NP_FULL : NP_EMBED; 48 49 // FIXME: Pass arguments to NPP_New. 50 NPError error = m_pluginModule->pluginFuncs().newp(0, &m_npp, mode, 0, 0, 0, 0); 51 if (error != NPERR_NO_ERROR) 52 return false; 53 42 54 return true; 43 55 } -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
r62869 r62964 48 48 virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect); 49 49 virtual void geometryDidChange(const WebCore::IntRect& frameRect); 50 51 RefPtr<NetscapePluginModule> m_pluginModule; 52 NPP_t m_npp; 50 53 }; 51 54 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.h
r62854 r62964 41 41 static PassRefPtr<NetscapePluginModule> create(const WebCore::String& pluginPath); 42 42 43 const NPPluginFuncs& pluginFuncs() const { return m_pluginFuncs; } 44 43 45 private: 44 46 explicit NetscapePluginModule(const WebCore::String& pluginPath); -
trunk/WebKit2/WebProcess/Plugins/PluginView.cpp
r62813 r62964 28 28 #include "Plugin.h" 29 29 #include <WebCore/GraphicsContext.h> 30 #include <WebCore/ScrollView.h> 30 31 31 32 using namespace WebCore; … … 61 62 } 62 63 64 65 void PluginView::frameRectsChanged() 66 { 67 Widget::frameRectsChanged(); 68 viewGeometryDidChange(); 69 } 70 71 void PluginView::setParent(ScrollView* scrollView) 72 { 73 Widget::setParent(scrollView); 74 viewGeometryDidChange(); 75 } 76 63 77 void PluginView::viewGeometryDidChange() 64 78 { 65 m_plugin->geometryDidChange(frameRect()); 79 if (!parent()) 80 return; 81 82 IntRect frameRectInWindowCoordinates = parent()->contentsToWindow(frameRect()); 83 84 m_plugin->geometryDidChange(frameRectInWindowCoordinates); 66 85 } 67 86 -
trunk/WebKit2/WebProcess/Plugins/PluginView.h
r62886 r62964 51 51 virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&); 52 52 virtual void invalidateRect(const WebCore::IntRect&); 53 53 virtual void frameRectsChanged(); 54 virtual void setParent(WebCore::ScrollView*); 55 54 56 RefPtr<Plugin> m_plugin; 55 57 };
Note: See TracChangeset
for help on using the changeset viewer.