[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jorlow at chromium.org
jorlow at chromium.org
Wed Dec 22 11:57:52 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 09d1bc4dbbee789ce5cb01e9a3fd9e1fcd1992c6
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 12 10:03:23 2010 +0000
2010-08-10 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Adam Barth.
Some settings are linked to the PageGroup not the Page. Create a new class for those.
https://bugs.webkit.org/show_bug.cgi?id=43794
Since persistient storage is shared between pages, there's no way to modify
some settings related to it on a per page basis. As such, it's not technically
correct for these settings to be on the Page's settings. Create a new class
called GroupSettings, move the 2 group-wide local storage settings there, and
add a new setting for IndexedDB's path (which is prompting this change).
No behavior has changed, so no tests.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
(WebCore::PageGroup::localStorage):
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setSessionStorageQuota):
* page/Settings.h:
2010-08-10 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Adam Barth.
Some settings are linked to the PageGroup not the Page. Create a new class for those.
https://bugs.webkit.org/show_bug.cgi?id=43794
Change WebView to use the new GroupSettings class rather than Settings for the
settings that moved. This is sub-optimal since the settings aren't really
per-view, but we can't really change the API at this point.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
(-[WebView _preferencesChangedNotification:]):
2010-08-11 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Adam Barth.
Some settings are linked to the PageGroup not the Page. Create a new class for those.
https://bugs.webkit.org/show_bug.cgi?id=43794
Change WebSettings to use the new GroupSettings class rather than Settings for the
settings that moved. This is sub-optimal since the settings aren't really
per-view, but I don't see how we can change the API at this point.
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 316ed2a..cb647d5 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -370,6 +370,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
page/FrameView.cpp \
page/Geolocation.cpp \
page/GeolocationPositionCache.cpp \
+ page/GroupSettings.cpp \
page/History.cpp \
page/Location.cpp \
page/MouseEventWithHitTestResults.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 5332b4e..f7a2a0f 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1163,6 +1163,7 @@ SET(WebCore_SOURCES
page/Geolocation.cpp
page/GeolocationController.cpp
page/GeolocationPositionCache.cpp
+ page/GroupSettings.cpp
page/History.cpp
page/Location.cpp
page/MemoryInfo.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d8ba1c9..3a6beff 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,36 @@
+2010-08-10 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Some settings are linked to the PageGroup not the Page. Create a new class for those.
+ https://bugs.webkit.org/show_bug.cgi?id=43794
+
+ Since persistient storage is shared between pages, there's no way to modify
+ some settings related to it on a per page basis. As such, it's not technically
+ correct for these settings to be on the Page's settings. Create a new class
+ called GroupSettings, move the 2 group-wide local storage settings there, and
+ add a new setting for IndexedDB's path (which is prompting this change).
+
+ No behavior has changed, so no tests.
+
+ * Android.mk:
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.exp.in:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::PageGroup):
+ (WebCore::PageGroup::localStorage):
+ * page/PageGroup.h:
+ (WebCore::PageGroup::groupSettings):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setSessionStorageQuota):
+ * page/Settings.h:
+
2010-08-12 Benjamin Poulain <benjamin.poulain at nokia.com>
Reviewed by Simon Hausmann.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 7a14cb1..fb08207 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1798,6 +1798,7 @@ webcore_sources += \
WebCore/page/GeolocationPositionCache.cpp \
WebCore/page/GeolocationPositionCache.h \
WebCore/page/Geoposition.h \
+ WebCore/page/GroupSettings.h \
WebCore/page/HaltablePlugin.h \
WebCore/page/History.cpp \
WebCore/page/History.h \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 2da4dee..eba27d8 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -678,6 +678,7 @@ __ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv
__ZN7WebCore8Document4headEv
__ZN7WebCore8FormData6createEPKvm
__ZN7WebCore8FormDataD1Ev
+__ZN7WebCore13GroupSettings27setLocalStorageDatabasePathERKN3WTF6StringE
__ZN7WebCore8IntPointC1ERK8_NSPoint
__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEEi
__ZN7WebCore8Settings11setZoomModeENS_8ZoomModeE
@@ -722,7 +723,6 @@ __ZN7WebCore8Settings26setDefaultTextEncodingNameERKN3WTF6StringE
__ZN7WebCore8Settings26setNeedsSiteSpecificQuirksEb
__ZN7WebCore8Settings27setFTPDirectoryTemplatePathERKN3WTF6StringE
__ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb
-__ZN7WebCore8Settings27setLocalStorageDatabasePathERKN3WTF6StringE
__ZN7WebCore8Settings28setForceFTPDirectoryListingsEb
__ZN7WebCore8Settings29setAuthorAndUserStylesEnabledEb
__ZN7WebCore8Settings29setWebArchiveDebugModeEnabledEb
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index a2faf53..64d9eb8 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -2016,6 +2016,8 @@
'page/GeolocationPositionCache.cpp',
'page/GeolocationPositionCache.h',
'page/Geoposition.h',
+ 'page/GroupSettings.cpp',
+ 'page/GroupSettings.h',
'page/HaltablePlugin.h',
'page/History.cpp',
'page/History.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index bc87e25..23711ae 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -839,6 +839,7 @@ SOURCES += \
page/Geolocation.cpp \
page/GeolocationController.cpp \
page/GeolocationPositionCache.cpp \
+ page/GroupSettings.cpp \
page/History.cpp \
page/Location.cpp \
page/MemoryInfo.cpp \
@@ -1618,6 +1619,7 @@ HEADERS += \
page/Geolocation.h \
page/GeolocationPositionCache.h \
page/Geoposition.h \
+ page/GroupSettings.h \
page/HaltablePlugin.h \
page/History.h \
page/Location.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 463f5d9..f6cceea 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -22317,6 +22317,14 @@
>
</File>
<File
+ RelativePath="..\page\GroupSettings.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\page\GroupSettings.h"
+ >
+ </File>
+ <File
RelativePath="..\page\HaltablePlugin.h"
>
</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 90e53ab..85383bd 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -4954,6 +4954,8 @@
C0DFC8700DB6841A003EAE7C /* JSConsoleCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */; };
C105DA620F3AA68F001DD44F /* TextEncodingDetectorICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */; };
C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
+ C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50B561412119D23008B46E0 /* GroupSettings.cpp */; };
+ C50B561712119D23008B46E0 /* GroupSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = C50B561512119D23008B46E0 /* GroupSettings.h */; settings = {ATTRIBUTES = (Private, ); }; };
C50D0E820FF4272900AC2644 /* StorageNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50D0E800FF4272900AC2644 /* StorageNamespace.cpp */; };
C50D0E830FF4272900AC2644 /* StorageNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = C50D0E810FF4272900AC2644 /* StorageNamespace.h */; };
C5102D940FD9AA2D00FAFF04 /* StorageSyncManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C5102D920FD9AA2D00FAFF04 /* StorageSyncManager.h */; };
@@ -10704,6 +10706,8 @@
C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsoleCustom.cpp; sourceTree = "<group>"; };
C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = "<group>"; };
C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextEncodingDetector.h; sourceTree = "<group>"; };
+ C50B561412119D23008B46E0 /* GroupSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GroupSettings.cpp; sourceTree = "<group>"; };
+ C50B561512119D23008B46E0 /* GroupSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupSettings.h; sourceTree = "<group>"; };
C50D0E800FF4272900AC2644 /* StorageNamespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespace.cpp; sourceTree = "<group>"; };
C50D0E810FF4272900AC2644 /* StorageNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageNamespace.h; sourceTree = "<group>"; };
C5102D920FD9AA2D00FAFF04 /* StorageSyncManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageSyncManager.h; sourceTree = "<group>"; };
@@ -12516,6 +12520,8 @@
596229791133EFE200DC4CBB /* GeolocationPositionCache.h */,
FE80D7BB0E9C1F25000D6F75 /* Geoposition.h */,
FE80D7BC0E9C1F25000D6F75 /* Geoposition.idl */,
+ C50B561412119D23008B46E0 /* GroupSettings.cpp */,
+ C50B561512119D23008B46E0 /* GroupSettings.h */,
7693BACE106C2DCA007B0823 /* HaltablePlugin.h */,
BC94D1500C275C8B006BC617 /* History.cpp */,
BC94D1510C275C8B006BC617 /* History.h */,
@@ -20142,6 +20148,7 @@
2EED575812109EE4007656BB /* BlobRegistry.h in Headers */,
2EED575C12109EF3007656BB /* BlobData.h in Headers */,
978B6FCA12128821001595EF /* HTMLViewSourceParser.h in Headers */,
+ C50B561712119D23008B46E0 /* GroupSettings.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -22566,6 +22573,7 @@
2EED575512109ED0007656BB /* BlobURL.cpp in Sources */,
2EED575B12109EF3007656BB /* BlobData.cpp in Sources */,
978B6FC912128821001595EF /* HTMLViewSourceParser.cpp in Sources */,
+ C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/page/GroupSettings.cpp b/WebCore/page/GroupSettings.cpp
new file mode 100644
index 0000000..bdf81ac
--- /dev/null
+++ b/WebCore/page/GroupSettings.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GroupSettings.h"
+
+namespace WebCore {
+
+GroupSettings::GroupSettings()
+ : m_localStorageQuotaBytes(5 * 1024 * 1024) // Suggested by the HTML5 spec.
+{
+}
+
+void GroupSettings::setLocalStorageQuotaBytes(unsigned quota)
+{
+ m_localStorageQuotaBytes = quota;
+}
+
+void GroupSettings::setLocalStorageDatabasePath(const String& path)
+{
+ m_localStorageDatabasePath = path;
+}
+
+void GroupSettings::setIndexedDBDatabasePath(const String& path)
+{
+ m_indexedDBDatabasePath = path;
+}
+
+} // namespace WebCore
diff --git a/WebCore/page/GroupSettings.h b/WebCore/page/GroupSettings.h
new file mode 100644
index 0000000..8f82ce9
--- /dev/null
+++ b/WebCore/page/GroupSettings.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GroupSettings_h
+#define GroupSettings_h
+
+#include "PlatformString.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class PageGroup;
+
+class GroupSettings : public Noncopyable {
+public:
+ static PassOwnPtr<GroupSettings> create()
+ {
+ return adoptPtr(new GroupSettings());
+ }
+
+ void setLocalStorageQuotaBytes(unsigned);
+ unsigned localStorageQuotaBytes() const { return m_localStorageQuotaBytes; }
+
+ void setLocalStorageDatabasePath(const String&);
+ const String& localStorageDatabasePath() const { return m_localStorageDatabasePath; }
+
+ void setIndexedDBDatabasePath(const String&);
+ const String& indexedDBDatabasePath() const { return m_indexedDBDatabasePath; }
+
+private:
+ GroupSettings();
+
+ unsigned m_localStorageQuotaBytes;
+ String m_localStorageDatabasePath;
+ String m_indexedDBDatabasePath;
+};
+
+} // namespace WebCore
+
+#endif // GroupSettings_h
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index 12b1a41..48b9e24 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -30,6 +30,7 @@
#include "ChromeClient.h"
#include "Document.h"
#include "Frame.h"
+#include "GroupSettings.h"
#include "IDBFactoryBackendInterface.h"
#include "Page.h"
#include "Settings.h"
@@ -55,6 +56,7 @@ PageGroup::PageGroup(const String& name)
: m_name(name)
, m_visitedLinksPopulated(false)
, m_identifier(getUniqueIdentifier())
+ , m_groupSettings(GroupSettings::create())
{
}
@@ -194,16 +196,9 @@ void PageGroup::setShouldTrackVisitedLinks(bool shouldTrack)
StorageNamespace* PageGroup::localStorage()
{
if (!m_localStorage) {
- // Need a page in this page group to query the settings for the local storage database path.
- // Having these parameters attached to the page settings is unfortunate since these settings are
- // not per-page (and, in fact, we simply grab the settings from some page at random), but
- // at this point we're stuck with it.
- Page* page = *m_pages.begin();
- const String& path = page->settings()->localStorageDatabasePath();
- unsigned quota = page->settings()->localStorageQuota();
- m_localStorage = StorageNamespace::localStorageNamespace(path, quota);
+ m_localStorage = StorageNamespace::localStorageNamespace(m_groupSettings->localStorageDatabasePath(),
+ m_groupSettings->localStorageQuotaBytes());
}
-
return m_localStorage.get();
}
#endif
diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h
index 95db8c3..0234c65 100644
--- a/WebCore/page/PageGroup.h
+++ b/WebCore/page/PageGroup.h
@@ -36,6 +36,7 @@
namespace WebCore {
class KURL;
+ class GroupSettings;
class IDBFactoryBackendInterface;
class Page;
class StorageNamespace;
@@ -93,6 +94,8 @@ 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(); }
+
private:
void addVisitedLink(LinkHash stringHash);
void resetUserStyleCacheInAllFrames();
@@ -114,6 +117,8 @@ namespace WebCore {
OwnPtr<UserScriptMap> m_userScripts;
OwnPtr<UserStyleSheetMap> m_userStyleSheets;
+
+ OwnPtr<GroupSettings> m_groupSettings;
};
} // namespace WebCore
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 881c885..89bc589 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -64,10 +64,7 @@ Settings::Settings(Page* page)
, m_defaultFontSize(0)
, m_defaultFixedFontSize(0)
, m_maximumDecodedImageSize(numeric_limits<size_t>::max())
-#if ENABLE(DOM_STORAGE)
- , m_localStorageQuota(5 * 1024 * 1024) // Suggested by the HTML5 spec.
, m_sessionStorageQuota(StorageMap::noQuota)
-#endif
, m_pluginAllowedRunTime(numeric_limits<unsigned>::max())
, m_zoomMode(ZoomPage)
, m_isSpatialNavigationEnabled(false)
@@ -290,17 +287,10 @@ void Settings::setLocalStorageEnabled(bool localStorageEnabled)
m_localStorageEnabled = localStorageEnabled;
}
-#if ENABLE(DOM_STORAGE)
-void Settings::setLocalStorageQuota(unsigned localStorageQuota)
-{
- m_localStorageQuota = localStorageQuota;
-}
-
void Settings::setSessionStorageQuota(unsigned sessionStorageQuota)
{
m_sessionStorageQuota = sessionStorageQuota;
}
-#endif
void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
{
@@ -483,11 +473,6 @@ void Settings::setLocalFileContentSniffingEnabled(bool enabled)
m_localFileContentSniffingEnabled = enabled;
}
-void Settings::setLocalStorageDatabasePath(const String& path)
-{
- m_localStorageDatabasePath = path;
-}
-
void Settings::setApplicationChromeMode(bool mode)
{
m_inApplicationChromeMode = mode;
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index ae3ebea..ca4c39a 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -55,6 +55,8 @@ namespace WebCore {
public:
Settings(Page*);
+ Page* page() const { return m_page; }
+
void setStandardFontFamily(const AtomicString&);
const AtomicString& standardFontFamily() const { return m_standardFontFamily; }
@@ -129,16 +131,11 @@ namespace WebCore {
void setLocalStorageEnabled(bool);
bool localStorageEnabled() const { return m_localStorageEnabled; }
-#if ENABLE(DOM_STORAGE)
- void setLocalStorageQuota(unsigned);
- unsigned localStorageQuota() const { return m_localStorageQuota; }
-
// Allow clients concerned with memory consumption to set a quota on session storage
// since the memory used won't be released until the Page is destroyed.
// Default is noQuota.
void setSessionStorageQuota(unsigned);
unsigned sessionStorageQuota() const { return m_sessionStorageQuota; }
-#endif
// When this option is set, WebCore will avoid storing any record of browsing activity
// that may persist on disk or remain displayed when the option is reset.
@@ -239,9 +236,6 @@ namespace WebCore {
void setLocalFileContentSniffingEnabled(bool);
bool localFileContentSniffingEnabled() const { return m_localFileContentSniffingEnabled; }
-
- void setLocalStorageDatabasePath(const String&);
- const String& localStorageDatabasePath() const { return m_localStorageDatabasePath; }
void setApplicationChromeMode(bool);
bool inApplicationChromeMode() const { return m_inApplicationChromeMode; }
@@ -339,7 +333,6 @@ namespace WebCore {
String m_defaultTextEncodingName;
String m_ftpDirectoryTemplatePath;
- String m_localStorageDatabasePath;
KURL m_userStyleSheetLocation;
AtomicString m_standardFontFamily;
AtomicString m_fixedFontFamily;
@@ -354,10 +347,7 @@ namespace WebCore {
int m_defaultFontSize;
int m_defaultFixedFontSize;
size_t m_maximumDecodedImageSize;
-#if ENABLE(DOM_STORAGE)
- unsigned m_localStorageQuota;
unsigned m_sessionStorageQuota;
-#endif
unsigned m_pluginAllowedRunTime;
ZoomMode m_zoomMode;
bool m_isSpatialNavigationEnabled : 1;
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 3344c76..f8cf904 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-10 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Some settings are linked to the PageGroup not the Page. Create a new class for those.
+ https://bugs.webkit.org/show_bug.cgi?id=43794
+
+ Change WebView to use the new GroupSettings class rather than Settings for the
+ settings that moved. This is sub-optimal since the settings aren't really
+ per-view, but we can't really change the API at this point.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _preferencesChangedNotification:]):
+
2010-08-11 Gavin Barraclough <barraclough at apple.com>
Rubber stamps by Darin Adler & Sam Weinig.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index aefd56b..d8bc914 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -126,6 +126,7 @@
#import <WebCore/FrameTree.h>
#import <WebCore/FrameView.h>
#import <WebCore/GCController.h>
+#import <WebCore/GroupSettings.h>
#import <WebCore/HTMLMediaElement.h>
#import <WebCore/HTMLNames.h>
#import <WebCore/HistoryItem.h>
@@ -686,7 +687,10 @@ static bool shouldEnableLoadDeferring()
_private->page = new Page(pageClients);
_private->page->setCanStartMedia([self window]);
- _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
+
+ // FIXME: Whenever any future groupSettings need to be exposed to the embedder, they should NOT be exposed
+ // via the WebView since they aren't actually per-view settings.
+ _private->page->group().groupSettings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
[WebFrame _createMainFrameWithPage:_private->page frameName:frameName frameView:frameView];
@@ -1364,7 +1368,11 @@ static bool fastDocumentTeardownEnabled()
return;
Settings* settings = _private->page->settings();
-
+
+ // FIXME: Whenever any future groupSettings need to be exposed to the embedder, they should NOT be exposed
+ // via the WebView since they aren't actually per-view settings.
+ _private->page->group().groupSettings()->setLocalStorageDatabasePath([preferences _localStorageDatabasePath]);
+
settings->setCursiveFontFamily([preferences cursiveFontFamily]);
settings->setDefaultFixedFontSize([preferences defaultFixedFontSize]);
settings->setDefaultFontSize([preferences defaultFontSize]);
@@ -1374,7 +1382,6 @@ static bool fastDocumentTeardownEnabled()
settings->setFixedFontFamily([preferences fixedFontFamily]);
settings->setForceFTPDirectoryListings([preferences _forceFTPDirectoryListings]);
settings->setFTPDirectoryTemplatePath([preferences _ftpDirectoryTemplatePath]);
- settings->setLocalStorageDatabasePath([preferences _localStorageDatabasePath]);
settings->setJavaEnabled([preferences isJavaEnabled]);
settings->setJavaScriptEnabled([preferences isJavaScriptEnabled]);
settings->setWebSecurityEnabled([preferences isWebSecurityEnabled]);
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index edd07da..bfcf25f 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -28,8 +28,10 @@
#include "Cache.h"
#include "CrossOriginPreflightResultCache.h"
#include "FontCache.h"
+#include "GroupSettings.h"
#include "Page.h"
#include "PageCache.h"
+#include "PageGroup.h"
#include "Settings.h"
#include "KURL.h"
#include "PlatformString.h"
@@ -213,8 +215,10 @@ void QWebSettingsPrivate::apply()
QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
settings->setDefaultTextEncodingName(encoding);
+ // FIXME: Whenever any future groupSettings need to be exposed to the embedder, they should NOT be exposed
+ // via this class since they aren't actually per-view settings.
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
- settings->setLocalStorageDatabasePath(storagePath);
+ settings->page()->group().groupSettings()->setLocalStorageDatabasePath(storagePath);
value = attributes.value(QWebSettings::ZoomTextOnly,
global->attributes.value(QWebSettings::ZoomTextOnly));
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index e381407..0e8c4ff 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-11 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Some settings are linked to the PageGroup not the Page. Create a new class for those.
+ https://bugs.webkit.org/show_bug.cgi?id=43794
+
+ Change WebSettings to use the new GroupSettings class rather than Settings for the
+ settings that moved. This is sub-optimal since the settings aren't really
+ per-view, but I don't see how we can change the API at this point.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+
2010-08-11 Simon Hausmann <simon.hausmann at nokia.com>
[Qt] Update the Symbian def files
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list