ewk_page_group_create always creates new page group, but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "". It is unnecessary and just makes the confusion.
Created attachment 220039 [details] Patch
Comment on attachment 220039 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220039&action=review > Source/WebKit2/ChangeLog:9 > + but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "". How will the identifiers be same with "defaultPageGroupIdentifier" when passing null ?
Comment on attachment 220039 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220039&action=review >> Source/WebKit2/ChangeLog:9 >> + but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "". > > How will the identifiers be same with "defaultPageGroupIdentifier" when passing null ? The identifier of WebPageGroup is just what user passed or generated one if user passed empty string. But, our previous logic only passed "defaultPageGroupIdentifier" when we passed empty string. In fact, WebPageGroup uses pageGroupID(generated one) and identifier (string which user passed).
Comment on attachment 220039 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220039&action=review >>> Source/WebKit2/ChangeLog:9 >>> + but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "". >> >> How will the identifiers be same with "defaultPageGroupIdentifier" when passing null ? > > The identifier of WebPageGroup is just what user passed or generated one if user passed empty string. > But, our previous logic only passed "defaultPageGroupIdentifier" when we passed empty string. > > In fact, WebPageGroup uses pageGroupID(generated one) and identifier (string which user passed). If the same identifier is passed, WebCore's page get same page group identifier even a new WebPageGroup is created. WebPage.cpp m_page->setGroupName(m_pageGroup->identifier()); The reason I added "defaultPageGroupIdentifier" was to make pages have same group identifier even though developer did not set the identifier. But it would be better to remove this default identifier because it conflict the behavior of WebPageGroup.
Comment on attachment 220039 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220039&action=review >>>> Source/WebKit2/ChangeLog:9 >>>> + but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "". >>> >>> How will the identifiers be same with "defaultPageGroupIdentifier" when passing null ? >> >> The identifier of WebPageGroup is just what user passed or generated one if user passed empty string. >> But, our previous logic only passed "defaultPageGroupIdentifier" when we passed empty string. >> >> In fact, WebPageGroup uses pageGroupID(generated one) and identifier (string which user passed). > > If the same identifier is passed, WebCore's page get same page group identifier even a new WebPageGroup is created. > > WebPage.cpp > m_page->setGroupName(m_pageGroup->identifier()); > > The reason I added "defaultPageGroupIdentifier" was to make pages have same group identifier even though developer did not set the identifier. > But it would be better to remove this default identifier because it conflict the behavior of WebPageGroup. If WebPageGroup already support to generate an unique identifier when passing null as argument, I agree to remove the default identifier.
Comment on attachment 220039 [details] Patch Clearing flags on attachment: 220039 Committed r161254: <http://trac.webkit.org/changeset/161254>
All reviewed patches have been landed. Closing bug.