Bug 51871 - [Qt][WK2] QWKContext should offer the available process models
Summary: [Qt][WK2] QWKContext should offer the available process models
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-01-04 06:30 PST by Balazs Kelemen
Modified: 2011-01-25 09:53 PST (History)
1 user (show)

See Also:


Attachments
Patch (3.66 KB, patch)
2011-01-04 06:38 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (3.67 KB, patch)
2011-01-13 09:57 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (3.67 KB, patch)
2011-01-14 04:42 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (11.53 KB, patch)
2011-01-21 06:54 PST, Balazs Kelemen
kling: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2011-01-04 06:30:07 PST
QWKContext currently forces using the process model where a view has it's own web process. There is also an available model where all view
in a UI process has one web process and furthermore this was the default before introducing QWKContext and this is still the default on
other platforms. The separated thread model is not supported on Qt right now but it could be in the future. I would add API that makes the
user be able to decide which model to use.
Comment 1 Balazs Kelemen 2011-01-04 06:38:54 PST
Created attachment 77884 [details]
Patch
Comment 2 Balazs Kelemen 2011-01-13 09:57:07 PST
Created attachment 78820 [details]
Patch
Comment 3 Kenneth Rohde Christiansen 2011-01-13 10:25:41 PST
Comment on attachment 78820 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=78820&action=review

> WebKit2/UIProcess/API/qt/qwkcontext.cpp:56
> +    case QWKContext::DedicatedWebprocess:

Dedicated? you mean that we have one per page?  also here you call it Webprocess and not WebProcess. why not just SharedProcess, DedicatedProcessPerPage or so?

> WebKit2/UIProcess/API/qt/qwkcontext.h:37


What is most important here? The parent of the proessmodel? I guess the parent and if so it should be first.
Comment 4 Balazs Kelemen 2011-01-14 04:42:44 PST
Created attachment 78924 [details]
Patch
Comment 5 Balazs Kelemen 2011-01-14 04:43:21 PST
(In reply to comment #3)
> (From update of attachment 78820 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=78820&action=review
> 
> > WebKit2/UIProcess/API/qt/qwkcontext.cpp:56
> > +    case QWKContext::DedicatedWebprocess:
> 
> Dedicated? you mean that we have one per page?  also here you call it Webprocess and not WebProcess. why not just SharedProcess, DedicatedProcessPerPage or so?

I don't find DedicatedProcessPerPage really good. The process is dedicated to the context actually.
Just DedicatedProcess seems to be better.

> 
> > WebKit2/UIProcess/API/qt/qwkcontext.h:37
> 
> 
> What is most important here? The parent of the proessmodel? I guess the parent and if so it should be first.

Done.
Comment 6 Balazs Kelemen 2011-01-18 00:43:29 PST
Tried apply to trunk, still applies.
Comment 7 Andreas Kling 2011-01-20 07:26:52 PST
Comment on attachment 78924 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=78924&action=review

> Tools/MiniBrowser/qt/BrowserView.cpp:36
> -    , m_context(context ? context : new QWKContext(this))
> +    , m_context(context ? context : new QWKContext(this, QWKContext::SharedProcess))

I think we should test the shared context mode a lot more before making it the default.
The rest of this patch is fine, but you should add something like a CLI option to MiniBrowser to choose the mode.
Comment 8 Balazs Kelemen 2011-01-21 06:54:42 PST
Created attachment 79731 [details]
Patch
Comment 9 Andreas Kling 2011-01-24 04:57:05 PST
Comment on attachment 79731 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79731&action=review

> Source/WebKit2/UIProcess/API/qt/qwkcontext.h:38
> +    QWKContext(const QWKContext&);

QObject subclasses should never have copy constructors.
You'll need to accomplish this in some other way.
Comment 10 Balazs Kelemen 2011-01-24 06:45:52 PST
Discussed on IRC that this API change is not correct and not necessary 
at this time. With the current API the user can take care about sharing
the web process between pages by instantiating the pages with the same QWKContext.
Comment 11 Balazs Kelemen 2011-01-25 09:53:13 PST
New bug with patch that affects only MiniBrowser to be able to use and test
the shared process model: https://bugs.webkit.org/show_bug.cgi?id=53090