Bug 103229 - [EFL][WK2] Duplicated WebPageGroup initialization
Summary: [EFL][WK2] Duplicated WebPageGroup initialization
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jinwoo Song
URL:
Keywords:
Depends on: 103604 103692
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-26 01:41 PST by Jinwoo Song
Modified: 2012-12-11 23:42 PST (History)
9 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2012-11-26 01:49 PST, Jinwoo Song
kenneth: review+
Details | Formatted Diff | Diff
patch (1.71 KB, patch)
2012-11-30 22:26 PST, Jinwoo Song
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jinwoo Song 2012-11-26 01:41:37 PST
WebPageGroup does not need to be created in creating EwkView when the pageGroupRef is 0
because the default WebPageGroup(m_defaultPageGroup) is created in WebContext constructor.

As a side effect on the duplicated initialization, pageGroupID increases
even when the EwkView is created with default context.

The issue can be easily detected with the following test case. 
(Even the window name is same, the new window is created.)
http://www.w3schools.com/js/tryit.asp?filename=try_win_name
Comment 1 Jinwoo Song 2012-11-26 01:49:50 PST
Created attachment 175942 [details]
Patch
Comment 2 Kangil Han 2012-11-27 19:18:15 PST
LGTM, thanks. :)
Comment 3 Ryuan Choi 2012-11-27 19:50:27 PST
LGTM too
Comment 4 WebKit Review Bot 2012-11-27 21:29:14 PST
Comment on attachment 175942 [details]
Patch

Clearing flags on attachment: 175942

Committed r135973: <http://trac.webkit.org/changeset/135973>
Comment 5 WebKit Review Bot 2012-11-27 21:29:18 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Review Bot 2012-11-28 22:48:58 PST
Re-opened since this is blocked by bug 103604
Comment 7 Jinwoo Song 2012-11-29 17:39:28 PST
ewk_setting API test cases should be fixed to land this patch. (bug 103692)
Comment 8 Chris Dumez 2012-11-30 00:31:04 PST
Kenneth, could you please take a look at this?

This patch changes the behavior a bit. All the views from the default context will be in the same PageGroup, meaning that they will share the settings.
Previously, we were creating a new PageGroup for each view and therefore, each view had its own settings.
Comment 9 Kenneth Rohde Christiansen 2012-11-30 01:07:59 PST
Comment on attachment 175942 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:512
>      ASSERT(!smartData->priv);
> -    RefPtr<WebPageGroup> pageGroup = pageGroupRef ? toImpl(pageGroupRef) : WebPageGroup::create();
> -    smartData->priv = new EwkViewImpl(ewkView, context, pageGroup, behavior);
> +    smartData->priv = new EwkViewImpl(ewkView, context, toImpl(pageGroupRef), behavior);
>      return ewkView;

I wonder whether we should add a comment?
Comment 10 Yael 2012-11-30 05:23:30 PST
(In reply to comment #8)
> Kenneth, could you please take a look at this?
> 
> This patch changes the behavior a bit. All the views from the default context will be in the same PageGroup, meaning that they will share the settings.
> Previously, we were creating a new PageGroup for each view and therefore, each view had its own settings.
That behavior was wrong. If a page creates a named popup, and then tries to create it again with the same name, we were creating a new popup instead of replacing the existing one.
Comment 11 Jinwoo Song 2012-11-30 22:23:23 PST
(In reply to comment #9)
> (From update of attachment 175942 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=175942&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:512
> >      ASSERT(!smartData->priv);
> > -    RefPtr<WebPageGroup> pageGroup = pageGroupRef ? toImpl(pageGroupRef) : WebPageGroup::create();
> > -    smartData->priv = new EwkViewImpl(ewkView, context, pageGroup, behavior);
> > +    smartData->priv = new EwkViewImpl(ewkView, context, toImpl(pageGroupRef), behavior);
> >      return ewkView;
> 
> I wonder whether we should add a comment?

I added the comment here.
Comment 12 Jinwoo Song 2012-11-30 22:26:29 PST
Created attachment 177086 [details]
patch

Patch with more comments.
Comment 13 WebKit Review Bot 2012-12-11 23:42:09 PST
Comment on attachment 177086 [details]
patch

Clearing flags on attachment: 177086

Committed r137423: <http://trac.webkit.org/changeset/137423>
Comment 14 WebKit Review Bot 2012-12-11 23:42:14 PST
All reviewed patches have been landed.  Closing bug.