[Webkit-unassigned] [Bug 37939] Fix PluginViewNone.cpp compilation for ports that also compile PluginView.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 22 10:30:36 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37939





--- Comment #5 from Kevin Ollivier <kevino at theolliviers.com>  2010-04-22 10:30:36 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > I'm open to suggestions, but the fact that these methods are defined in this
> > file is the source of the confusion, and if we're to avoid similar breakages in
> > the future, we need to make sure people are clear about what the Mac port is
> > using this file for and how it differs from what everyone else is using this
> > file for. 
> 
> This is clearly not specific to the Mac since there are Chromium-related
> conditions in the #if statements.

Actually, those were added after I submitted my patch, and that change largely
does the same thing as my patch but without the note (and, it does not guard
one extra method it should).

http://trac.webkit.org/changeset/58043/trunk/WebCore/plugins/PluginViewNone.cpp

> > To avoid this approach, the three methods in this file needed by Mac need to
> > either go somewhere else (if so, where?) or we need to search the codebase for
> > the calls to these three methods and preface them with #if !PLATFORM(MAC). Any
> > thoughts / preferences? I'm open to any ideas that fix this right so that
> > people don't keep adding more stubbed versions of methods from PluginView.cpp
> > into this file (which will break compilation for pretty much any other port
> > using it).
> 
> I think that the right way to fix it is to unify the manner in which platforms
> that do not use PluginView build.  Some ports do not compile PluginView.cpp at
> all.  Others compile both PluginView.cpp and PluginViewNone.cpp.  I think that
> having all ports that fall in to this category treat things in a consistent
> manner would address the problems.

So if we're going to keep this all in one file, we'd need a system along the
lines of:

#if PLATFORM(MAC) || PLATFORM(CHROMIUM) || PLATFORM(EFL)
#define SUPPORTS_PLUGIN_VIEW 0
#else
#define SUPPORTS_PLUGIN_VIEW 1
#endif

#if SUPPORTS_PLUGIN_VIEW
// compile PluginView port-specific stubs
#else
// compile stubs for static PluginView methods or methods called after checking
widget->IsPluginView()
#endif

Thoughts?

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



More information about the webkit-unassigned mailing list