summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/Settings.cpp')
-rw-r--r--WebCore/page/Settings.cpp44
1 files changed, 32 insertions, 12 deletions
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index acfe23a..069296a 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "Settings.h"
-#include "BackForwardList.h"
+#include "BackForwardController.h"
#include "CachedResourceLoader.h"
#include "CookieStorage.h"
#include "DOMTimer.h"
@@ -64,6 +64,27 @@ bool Settings::gShouldPaintNativeControls = true;
bool Settings::gShouldUseHighResolutionTimers = true;
#endif
+// NOTEs
+// 1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well QtWebKit and Chromium when built on Mac;
+// 2) EditingWindowsBehavior comprises Win32 and WinCE builds, as well as QtWebKit and Chromium when built on Windows;
+// 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS (and then abusing the terminology);
+// 99) MacEditingBehavior is used a fallback.
+static EditingBehaviorType editingBehaviorTypeForPlatform()
+{
+ return
+#if OS(DARWIN)
+ EditingMacBehavior
+#elif OS(WINDOWS)
+ EditingWindowsBehavior
+#elif OS(UNIX)
+ EditingUnixBehavior
+#else
+ // Fallback
+ EditingMacBehavior
+#endif
+ ;
+}
+
Settings::Settings(Page* page)
: m_page(page)
#ifdef ANDROID_LAYOUT
@@ -105,6 +126,7 @@ Settings::Settings(Page* page)
, m_javaScriptCanOpenWindowsAutomatically(false)
, m_javaScriptCanAccessClipboard(false)
, m_shouldPrintBackgrounds(false)
+ , m_shouldDelegateScrolling(false)
, m_textAreasAreResizable(false)
#if ENABLE(DASHBOARD_SUPPORT)
, m_usesDashboardBackwardCompatibilityMode(false)
@@ -132,14 +154,7 @@ Settings::Settings(Page* page)
, m_enforceCSSMIMETypeInNoQuirksMode(true)
, m_usesEncodingDetector(false)
, m_allowScriptsToCloseWindows(false)
- , m_editingBehaviorType(
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
- // (PLATFORM(MAC) is always false in Chromium, hence the extra condition.)
- EditingMacBehavior
-#else
- EditingWindowsBehavior
-#endif
- )
+ , m_editingBehaviorType(editingBehaviorTypeForPlatform())
// FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
// they can't use by. Leaving enabled for now to not change existing behavior.
, m_downloadableBinaryFontsEnabled(true)
@@ -380,6 +395,11 @@ void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds)
m_shouldPrintBackgrounds = shouldPrintBackgrounds;
}
+void Settings::setShouldDelegateScrolling(bool shouldDelegateScrolling)
+{
+ m_shouldDelegateScrolling = shouldDelegateScrolling;
+}
+
void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
{
if (m_textAreasAreResizable == textAreasAreResizable)
@@ -453,10 +473,10 @@ void Settings::setUsesPageCache(bool usesPageCache)
m_usesPageCache = usesPageCache;
if (!m_usesPageCache) {
- int first = -m_page->backForwardList()->backListCount();
- int last = m_page->backForwardList()->forwardListCount();
+ int first = -m_page->backForward()->backCount();
+ int last = m_page->backForward()->forwardCount();
for (int i = first; i <= last; i++)
- pageCache()->remove(m_page->backForwardList()->itemAtIndex(i));
+ pageCache()->remove(m_page->backForward()->itemAtIndex(i));
pageCache()->releaseAutoreleasedPagesNow();
}
}