[Webkit-unassigned] [Bug 19055] New: Most plugin dirs should be added based on platform, not port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 14 12:39:20 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=19055

           Summary: Most plugin dirs should be added based on platform, not
                    port
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: Qt, Gtk, Wx
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kevino at theolliviers.com


While the wx port hasn't yet delved into plugins support, we recently came
across an issue while working on build fixes. Basically, we need to add stubs
for PluginDatabase::defualtPluginDirectories and
PluginDatabase::isPreferredPluginDatabase. We can stub them for now, but
looking at the code, the wx port would like to read plugins from most, if not
all, of the dirs defined by other ports. However, this would require us to add
PLATFORM(WX) defines to files which are already starting to get lots of
defines, such as PLATFORM(GTK) || (PLATFORM(QT) && defined(Q_WS_X11)) and
defined(GDK_WINDOWING_X11). I think instead of further complicating the
defines, these paths should be controlled by OS defines, perhaps with a set of
functions like so:

static void addMozillaPluginDirectoriesWin(Vector<String>& paths) {
#if PLATFORM(WIN_OS)
// ... add Windows Mozilla plugin dirs
#endif
}

static void addMozillaPluginDirectoriesMac(Vector<String>& paths) {
#if PLATFORM(DARWIN)
// ... add Windows Mozilla plugin dirs
#endif
}

etc. 

Then have something like: 

Vector<String> PluginDatabase::defaultPluginDirectories()
{
    addMozillaPluginDirectoriesWin(paths);
    addMozillaPluginDirectoriesMac(paths);
    addMozillaPluginDirectoriesUnix(paths);
    addPortDirectories(paths);
}

(Or maybe just use addMozillaPluginDirectories and have the implementation be
based on PLATFORM define.)

Thoughts? I could hack on this, but given that wx hasn't touched plugins yet, I
would be flying blind and don't feel comfortable writing a patch that affects
most other ports and which I have no way of testing myself.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list