Bug 73150

Summary: [Qt] [WK2] Remove WebContext related code from QtWebPageProxy
Product: WebKit Reporter: Caio Marcelo de Oliveira Filho <cmarcelo>
Component: New BugsAssignee: Caio Marcelo de Oliveira Filho <cmarcelo>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann, jesus, kenneth, menard, webkit.review.bot
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 Caio Marcelo de Oliveira Filho 2011-11-25 16:17:14 PST
[Qt] [WK2] Remove WebContext related code from QtWebPageProxy
Comment 1 Caio Marcelo de Oliveira Filho 2011-11-25 16:26:26 PST
Created attachment 116643 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2011-11-25 16:42:49 PST
Comment on attachment 116643 [details]
Patch

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 Caio Marcelo de Oliveira Filho 2011-11-25 21:57:46 PST
Created attachment 116649 [details]
Patch for landing
Comment 4 Caio Marcelo de Oliveira Filho 2011-11-25 22:01:46 PST
Comment on attachment 116643 [details]
Patch

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 WebKit Review Bot 2011-11-25 23:18:16 PST
Comment on attachment 116649 [details]
Patch for landing

Clearing flags on attachment: 116649

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