Bug 108548

Summary: [Qt][WK2] Another attempt to fix build after recent WebKit2 changes
Product: WebKit Reporter: Rafael Brandao <rafael.lobo>
Component: New BugsAssignee: Rafael Brandao <rafael.lobo>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, andersca, cmarcelo, hausmann, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Rafael Brandao 2013-01-31 16:32:58 PST
[Qt][WK2] Another attempt to fix build after recent WebKit2 changes
Comment 1 Rafael Brandao 2013-01-31 16:34:54 PST
Created attachment 185892 [details]
Patch
Comment 2 Rafael Brandao 2013-01-31 16:36:17 PST
I believe one of the errors came after patch from bug #108407
Comment 3 Rafael Brandao 2013-01-31 16:55:10 PST
(In reply to comment #2)
> I believe one of the errors came after patch from bug #108407

The problem is getPluginPath was moved to WebPageProxy but it is slightly different. It now uses some PluginModuleInfo attributes that are protected by PLATFORM(MAC) on trunk. What I did was to allow other ports to use it too, but protect only pluginArchitecture (which seems to be included by mach/machine.h).
Comment 4 Rafael Brandao 2013-01-31 16:57:11 PST
Comment on attachment 185892 [details]
Patch

There are now other build failures, I will try to solve them all at once.
Comment 5 Anders Carlsson 2013-01-31 16:58:12 PST
(In reply to comment #3)
> (In reply to comment #2)
> > I believe one of the errors came after patch from bug #108407
> 
> The problem is getPluginPath was moved to WebPageProxy but it is slightly different. It now uses some PluginModuleInfo attributes that are protected by PLATFORM(MAC) on trunk. What I did was to allow other ports to use it too, but protect only pluginArchitecture (which seems to be included by mach/machine.h).

Ah, thanks for the explanation!

A better fix is to just put these lines in WebPageProxy::getPluginPath inside an #if PLATFORM(MAC) block.

    pluginLoadPolicy = m_uiClient.shouldInstantiatePlugin(this, plugin.bundleIdentifier, plugin.info.name) ? PluginModuleLoadNormally : PluginModuleBlocked;
    if (pluginLoadPolicy != PluginModuleLoadNormally)
        return;
Comment 6 Rafael Brandao 2013-01-31 17:49:50 PST
Created attachment 185907 [details]
Patch
Comment 7 Rafael Brandao 2013-01-31 18:01:37 PST
Anders, please look when you have time. I've put into the ChangeLog the references to the bugs that caused each error and tried to follow those changes to get similar solutions.
Comment 8 Rafael Brandao 2013-01-31 18:03:17 PST
Comment on attachment 185907 [details]
Patch

Also, I need to leave now. Please cq+ if you feel like this is correct.
Comment 9 WebKit Review Bot 2013-01-31 19:53:46 PST
Comment on attachment 185907 [details]
Patch

Clearing flags on attachment: 185907

Committed r141528: <http://trac.webkit.org/changeset/141528>
Comment 10 WebKit Review Bot 2013-01-31 19:53:50 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Simon Hausmann 2013-01-31 23:23:32 PST
Thanks Rafael