Bug 73150

Summary: [Qt] [WK2] Remove WebContext related code from QtWebPageProxy
Product: WebKit Reporter: Caio Marcelo de Oliveira Filho <cmarcelo@webkit.org>
Component: New BugsAssignee: Caio Marcelo de Oliveira Filho <cmarcelo@webkit.org>
Status: RESOLVED FIXED    
Severity: Normal CC: alexis@webkit.org, hausmann@webkit.org, jesus@webkit.org, kenneth@webkit.org, webkit.review.bot@gmail.com
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 72943, 73151    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description From 2011-11-25 16:17:14 PST
[Qt] [WK2] Remove WebContext related code from QtWebPageProxy
------- Comment #1 From 2011-11-25 16:26:26 PST -------
Created an attachment (id=116643) [details]
Patch
------- Comment #2 From 2011-11-25 16:42:49 PST -------
(From update of attachment 116643 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=116643&action=review

> Source/WebKit2/UIProcess/qt/QtWebContext.cpp:49
> +// Used only by WebKitTestRunner. Not calling initialize() so we don't register any clients.

It avoids calling initialize(), so that we don't ...

> Source/WebKit2/UIProcess/qt/QtWebContext.cpp:64
> +    defaultContext->initialize();
> +    return defaultContext.release();

I prefer a newline before the return. It makes it easier to spot that it returns something

> Source/WebKit2/UIProcess/qt/QtWebContext.cpp:67
> +PassRefPtr<WebPageProxy> QtWebContext::createWebPage(PageClient* pageClient, WebPageGroup* webPageGroup)

Personally I would just call the arguments for client and pageGroup. At least pageGroup should be enough

> Source/WebKit2/UIProcess/qt/QtWebContext.cpp:72
> +void QtWebContext::setNavigatorQtObjectEnabled(WebPageProxy* webPageProxy, bool enabled)

What about setNavigationDotQtJSObjectEnabled...  It is hard to figure out what NavigationQt is all about

> Source/WebKit2/UIProcess/qt/QtWebContext.cpp:98
> +void QtWebContext::setupContextInjectedBundleClient()

Any reason this is called setup and not initialize?
------- Comment #3 From 2011-11-25 21:57:46 PST -------
Created an attachment (id=116649) [details]
Patch for landing
------- Comment #4 From 2011-11-25 22:01:46 PST -------
(From update of attachment 116643 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=116643&action=review

Thanks for the review. Followed your suggestions in the version for landing -- except for one.

>> Source/WebKit2/UIProcess/qt/QtWebContext.cpp:72
>> +void QtWebContext::setNavigatorQtObjectEnabled(WebPageProxy* webPageProxy, bool enabled)
> 
> What about setNavigationDotQtJSObjectEnabled...  It is hard to figure out what NavigationQt is all about

I have some work on navigator.qt object on the queue, so I'll fix that naming in a next patch.
------- Comment #5 From 2011-11-25 23:18:16 PST -------
(From update of attachment 116649 [details])
Clearing flags on attachment: 116649

Committed r101188: <http://trac.webkit.org/changeset/101188>
------- Comment #6 From 2011-11-25 23:18:21 PST -------
All reviewed patches have been landed.  Closing bug.