summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/Settings.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
commit6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch)
tree5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Source/WebCore/page/Settings.cpp
parent6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff)
downloadqtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Source/WebCore/page/Settings.cpp')
-rw-r--r--Source/WebCore/page/Settings.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/Source/WebCore/page/Settings.cpp b/Source/WebCore/page/Settings.cpp
index 2a4c7b4f0..df425964d 100644
--- a/Source/WebCore/page/Settings.cpp
+++ b/Source/WebCore/page/Settings.cpp
@@ -46,12 +46,10 @@ using namespace std;
namespace WebCore {
-static void setImageLoadingSettings(Page* page)
+static void setLoadsImagesAutomaticallyInAllFrames(Page* page)
{
- for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- frame->document()->cachedResourceLoader()->setImagesEnabled(page->settings()->areImagesEnabled());
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
frame->document()->cachedResourceLoader()->setAutoLoadImages(page->settings()->loadsImagesAutomatically());
- }
}
// Sets the entry in the font map for the given script. If family is the empty string, removes the entry instead.
@@ -90,6 +88,7 @@ bool Settings::gAVFoundationEnabled(false);
#endif
bool Settings::gMockScrollbarsEnabled = false;
+bool Settings::gUsesOverlayScrollbars = false;
#if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
bool Settings::gShouldUseHighResolutionTimers = true;
@@ -131,6 +130,7 @@ Settings::Settings(Page* page)
, m_minimumLogicalFontSize(0)
, m_defaultFontSize(0)
, m_defaultFixedFontSize(0)
+ , m_screenFontSubstitutionEnabled(true)
, m_validationMessageTimerMagnification(50)
, m_minimumAccelerated2dCanvasSize(257 * 256)
, m_layoutFallbackWidth(980)
@@ -291,7 +291,7 @@ Settings::Settings(Page* page)
, m_windowFocusRestricted(true)
, m_diagnosticLoggingEnabled(false)
, m_scrollingPerformanceLoggingEnabled(false)
- , m_setImageLoadingSettingsTimer(this, &Settings::imageLoadingSettingsTimerFired)
+ , m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired)
, m_incrementalRenderingSuppressionTimeoutInSeconds(defaultIncrementalRenderingSuppressionTimeoutInSeconds)
{
// A Frame may not have been created yet, so we initialize the AtomicString
@@ -419,6 +419,15 @@ void Settings::setDefaultFixedFontSize(int defaultFontSize)
m_page->setNeedsRecalcStyleInAllFrames();
}
+void Settings::setScreenFontSubstitutionEnabled(bool screenFontSubstitutionEnabled)
+{
+ if (m_screenFontSubstitutionEnabled == screenFontSubstitutionEnabled)
+ return;
+
+ m_screenFontSubstitutionEnabled = screenFontSubstitutionEnabled;
+ m_page->setNeedsRecalcStyleInAllFrames();
+}
+
#if ENABLE(TEXT_AUTOSIZING)
void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled)
{
@@ -457,12 +466,12 @@ void Settings::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
// Starting these loads synchronously is not important. By putting it on a 0-delay, properly closing the Page cancels them
// before they have a chance to really start.
// See http://webkit.org/b/60572 for more discussion.
- m_setImageLoadingSettingsTimer.startOneShot(0);
+ m_loadsImagesAutomaticallyTimer.startOneShot(0);
}
-void Settings::imageLoadingSettingsTimerFired(Timer<Settings>*)
+void Settings::loadsImagesAutomaticallyTimerFired(Timer<Settings>*)
{
- setImageLoadingSettings(m_page);
+ setLoadsImagesAutomaticallyInAllFrames(m_page);
}
void Settings::setLoadsSiteIconsIgnoringImageLoadingSetting(bool loadsSiteIcons)
@@ -508,9 +517,6 @@ void Settings::setJavaEnabledForLocalFiles(bool isJavaEnabledForLocalFiles)
void Settings::setImagesEnabled(bool areImagesEnabled)
{
m_areImagesEnabled = areImagesEnabled;
-
- // See comment in setLoadsImagesAutomatically.
- m_setImageLoadingSettingsTimer.startOneShot(0);
}
void Settings::setMediaEnabled(bool isMediaEnabled)
@@ -975,6 +981,16 @@ bool Settings::mockScrollbarsEnabled()
return gMockScrollbarsEnabled;
}
+void Settings::setUsesOverlayScrollbars(bool flag)
+{
+ gUsesOverlayScrollbars = flag;
+}
+
+bool Settings::usesOverlayScrollbars()
+{
+ return gUsesOverlayScrollbars;
+}
+
#if USE(JSC)
void Settings::setShouldRespectPriorityInCSSAttributeSetters(bool flag)
{