Bug 25988 - PluginPackage*.cpp cleanup
Summary: PluginPackage*.cpp cleanup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-24 01:27 PDT by Holger Freyther
Modified: 2009-05-25 05:55 PDT (History)
1 user (show)

See Also:


Attachments
Move the big m_browserfuncs assignment to PluginPackage.cpp (14.65 KB, patch)
2009-05-24 01:28 PDT, Holger Freyther
no flags Details | Formatted Diff | Diff
Move hash and equal to PluginPackage (6.24 KB, patch)
2009-05-24 01:30 PDT, Holger Freyther
no flags Details | Formatted Diff | Diff
Cleanup the hash implementation (2.22 KB, patch)
2009-05-24 01:37 PDT, Holger Freyther
no flags Details | Formatted Diff | Diff
Update PluginPackageMac.cpp too (5.08 KB, patch)
2009-05-24 21:05 PDT, Holger Freyther
hausmann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 2009-05-24 01:27:28 PDT
Currently there is quite some thing that could be shared between PluginPackageWin.cpp, PluginPackageQt.cpp and PluginPackageGtk.cpp. Recently the duplication has created the usual problem that one site was updated, the two others not. Attempt to improve the situation.
Comment 1 Holger Freyther 2009-05-24 01:28:58 PDT
Created attachment 30627 [details]
Move the big m_browserfuncs assignment to PluginPackage.cpp

Move the big set of assignment statements from PluginPackageWin.cpp to PluginPackage.cpp and remove them from PluginPackageQt.cpp and PluginPackageGtk.cpp.
Comment 2 Holger Freyther 2009-05-24 01:30:17 PDT
Created attachment 30628 [details]
Move hash and equal to PluginPackage

The hash, equal and compare version can be shared between Gtk and Qt. Move them into PluginPackage.cpp and guard the implementation with a #if USE() as the windows version is specialized and will not be happy with the simple implementation.
Comment 3 Holger Freyther 2009-05-24 01:37:07 PDT
Created attachment 30629 [details]
Cleanup the hash implementation

Small cleanups, less hardcoded magic numbers (two in this case) and the size of UChar.
Comment 4 Maciej Stachowiak 2009-05-24 03:46:34 PDT
Comment on attachment 30627 [details]
Move the big m_browserfuncs assignment to PluginPackage.cpp

r=me
Comment 5 Maciej Stachowiak 2009-05-24 03:48:16 PDT
Comment on attachment 30628 [details]
Move hash and equal to PluginPackage

The ifdef should be an ENABLE not a USE, since it's about optional code inside WebKit (ENABLE), not an optional external dependency (USE). Please change that when landing. Otherwise r=me
Comment 6 Maciej Stachowiak 2009-05-24 03:48:33 PDT
Comment on attachment 30629 [details]
Cleanup the hash implementation

r=me
Comment 7 Holger Freyther 2009-05-24 21:05:31 PDT
Created attachment 30640 [details]
Update PluginPackageMac.cpp too

I forgot to update PluginPackageMac.cpp which is used by Qt.
Comment 8 Simon Hausmann 2009-05-25 05:04:10 PDT
Comment on attachment 30640 [details]
Update PluginPackageMac.cpp too

Nice!!
Comment 9 Simon Hausmann 2009-05-25 05:55:56 PDT
Last fix landed in r44129