Commit 95fe3e51 authored by psolanki@apple.com's avatar psolanki@apple.com

PageGroup::groupSettings() should return a reference

https://bugs.webkit.org/show_bug.cgi?id=120319

Reviewed by Andreas Kling.

PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().

Source/WebCore:

* Modules/indexeddb/IDBFactory.cpp:
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::groupSettings):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):

Source/WebKit/gtk:

* webkit/webkitwebdatabase.cpp:
(webkit_set_web_database_directory_path):

Source/WebKit2:

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8e830e40
2013-08-26 Pratik Solanki <psolanki@apple.com>
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
* Modules/indexeddb/IDBFactory.cpp:
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::groupSettings):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2013-08-26 Andreas Kling <akling@apple.com>
WebCore: Let Page create the main Frame.
......@@ -86,7 +86,7 @@ static String getIndexedDBDatabasePath(ScriptExecutionContext* context)
ASSERT(isContextValid(context));
if (context->isDocument()) {
Document* document = toDocument(context);
return document->page()->group().groupSettings()->indexedDBDatabasePath();
return document->page()->group().groupSettings().indexedDBDatabasePath();
}
#if ENABLE(WORKERS)
WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(context);
......
......@@ -108,7 +108,7 @@ namespace WebCore {
const UserScriptMap* userScripts() const { return m_userScripts.get(); }
const UserStyleSheetMap* userStyleSheets() const { return m_userStyleSheets.get(); }
GroupSettings* groupSettings() const { return m_groupSettings.get(); }
GroupSettings& groupSettings() const { return *m_groupSettings; }
#if ENABLE(VIDEO_TRACK)
void captionPreferencesChanged();
......@@ -135,7 +135,7 @@ namespace WebCore {
OwnPtr<UserScriptMap> m_userScripts;
OwnPtr<UserStyleSheetMap> m_userStyleSheets;
OwnPtr<GroupSettings> m_groupSettings;
const OwnPtr<GroupSettings> m_groupSettings;
#if ENABLE(VIDEO_TRACK)
OwnPtr<CaptionUserPreferences> m_captionPreferences;
......
......@@ -57,7 +57,7 @@ PassRefPtr<StorageNamespace> StorageNamespaceImpl::localStorageNamespace(PageGro
// at this point we're stuck with it.
Page* page = *pageGroup->pages().begin();
const String& path = page->settings().localStorageDatabasePath();
unsigned quota = pageGroup->groupSettings()->localStorageQuotaBytes();
unsigned quota = pageGroup->groupSettings().localStorageQuotaBytes();
const String lookupPath = path.isNull() ? emptyString() : path;
LocalStorageNamespaceMap::AddResult result = localStorageNamespaceMap().add(lookupPath, 0);
......
......@@ -173,7 +173,7 @@ GroupSettings* SharedWorkerProxy::groupSettings() const
// Just pick the first active document, and use the groupsettings of that page.
Document* document = *(m_workerDocuments.begin());
if (document->page())
return document->page()->group().groupSettings();
return &document->page()->group().groupSettings();
return 0;
}
......
......@@ -303,7 +303,7 @@ void WorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL, const S
Document* document = static_cast<Document*>(m_scriptExecutionContext.get());
GroupSettings* settings = 0;
if (document->page())
settings = document->page()->group().groupSettings();
settings = &document->page()->group().groupSettings();
RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, settings, sourceCode, *this, *this, startMode, document->contentSecurityPolicy()->deprecatedHeader(), document->contentSecurityPolicy()->deprecatedHeaderType(), document->topOrigin());
workerThreadCreated(thread);
thread->start();
......
......@@ -5851,14 +5851,14 @@ void WebPagePrivate::didChangeSettings(WebSettings* webSettings)
coreSettings->setLocalStorageEnabled(webSettings->isLocalStorageEnabled());
coreSettings->setOfflineWebApplicationCacheEnabled(webSettings->isAppCacheEnabled());
m_page->group().groupSettings()->setLocalStorageQuotaBytes(webSettings->localStorageQuota());
m_page->group().groupSettings().setLocalStorageQuotaBytes(webSettings->localStorageQuota());
coreSettings->setSessionStorageQuota(webSettings->sessionStorageQuota());
coreSettings->setUsesPageCache(webSettings->maximumPagesInCache());
coreSettings->setFrameFlatteningEnabled(webSettings->isFrameFlatteningEnabled());
#endif
#if ENABLE(INDEXED_DATABASE)
m_page->group().groupSettings()->setIndexedDBDatabasePath(webSettings->indexedDataBasePath());
m_page->group().groupSettings().setIndexedDBDatabasePath(webSettings->indexedDataBasePath());
#endif
......
2013-08-26 Pratik Solanki <psolanki@apple.com>
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2013-08-24 Darin Adler <darin@apple.com>
Frame::tree should return a reference instead of a pointer
......
2013-08-26 Pratik Solanki <psolanki@apple.com>
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
* webkit/webkitwebdatabase.cpp:
(webkit_set_web_database_directory_path):
2013-08-26 Andreas Kling <akling@apple.com>
WebCore: Let Page create the main Frame.
......
......@@ -491,7 +491,7 @@ void webkit_set_web_database_directory_path(const gchar* path)
#endif
#if ENABLE(INDEXED_DATABASE)
WebCore::PageGroup::pageGroup(webkitPageGroupName())->groupSettings()->setIndexedDBDatabasePath(pathString);
WebCore::PageGroup::pageGroup(webkitPageGroupName())->groupSettings().setIndexedDBDatabasePath(pathString);
#endif
}
......
2013-08-26 Pratik Solanki <psolanki@apple.com>
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
2013-08-26 Andreas Kling <akling@apple.com>
WebCore: Let Page create the main Frame.
......
......@@ -56,7 +56,7 @@ PassRefPtr<StorageNamespaceImpl> StorageNamespaceImpl::createLocalStorageNamespa
if (!result.isNewEntry)
return result.iterator->value;
unsigned quota = pageGroup->groupSettings()->localStorageQuotaBytes();
unsigned quota = pageGroup->groupSettings().localStorageQuotaBytes();
RefPtr<StorageNamespaceImpl> localStorageNamespace = adoptRef(new StorageNamespaceImpl(LocalStorage, pageGroupID, quota));
result.iterator->value = localStorageNamespace.get();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment