diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-15 09:06:43 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-15 09:31:31 (GMT) |
commit | c411f16870f112c3407c28c22b617f613a82cff4 (patch) | |
tree | 29a1bcd590c8b31af2aab445bfe8a978dc5bf582 /src/3rdparty/webkit/WebCore/page/Settings.h | |
parent | 3d77b56b32a0c53ec0bbfaa07236fedb900ff336 (diff) | |
download | Qt-c411f16870f112c3407c28c22b617f613a82cff4.zip Qt-c411f16870f112c3407c28c22b617f613a82cff4.tar.gz Qt-c411f16870f112c3407c28c22b617f613a82cff4.tar.bz2 |
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit-4.6-snapshot-15062009 ( 65232bf00dc494ebfd978f998c88f58d18ecce1e )
Diffstat (limited to 'src/3rdparty/webkit/WebCore/page/Settings.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/page/Settings.h | 67 |
1 files changed, 57 insertions, 10 deletions
diff --git a/src/3rdparty/webkit/WebCore/page/Settings.h b/src/3rdparty/webkit/WebCore/page/Settings.h index d46a3c6..62cf7f6 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.h +++ b/src/3rdparty/webkit/WebCore/page/Settings.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * (C) 2006 Graham Dennis (graham.dennis@gmail.com) * * Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ #define Settings_h #include "AtomicString.h" -#include "FontDescription.h" +#include "FontRenderingMode.h" #include "KURL.h" namespace WebCore { @@ -36,7 +36,7 @@ namespace WebCore { class Page; enum EditableLinkBehavior { - EditableLinkDefaultBehavior = 0, + EditableLinkDefaultBehavior, EditableLinkAlwaysLive, EditableLinkOnlyLiveWithShiftKey, EditableLinkLiveWhenNotFocused, @@ -49,6 +49,21 @@ namespace WebCore { TextDirectionSubmenuAlwaysIncluded }; + // There are multiple editing details that are different on Windows than Macintosh. + // We use a single switch for all of them. Some examples: + // + // 1) Clicking below the last line of an editable area puts the caret at the end + // of the last line on Mac, but in the middle of the last line on Windows. + // 2) Pushing the down arrow key on the last line puts the caret at the end of the + // last line on Mac, but does nothing on Windows. A similar case exists on the + // top line. + // + // This setting is intended to control these sorts of behaviors. There are some other + // behaviors with individual function calls on EditorClient (smart copy and paste and + // selecting the space after a double click) that could be combined with this if + // if possible in the future. + enum EditingBehavior { EditingMacBehavior, EditingWindowsBehavior }; + class Settings { public: Settings(Page*); @@ -89,8 +104,14 @@ namespace WebCore { void setJavaScriptEnabled(bool); bool isJavaScriptEnabled() const { return m_isJavaScriptEnabled; } + void setWebSecurityEnabled(bool); + bool isWebSecurityEnabled() const { return m_isWebSecurityEnabled; } + + void setAllowUniversalAccessFromFileURLs(bool); + bool allowUniversalAccessFromFileURLs() const { return m_allowUniversalAccessFromFileURLs; } + void setJavaScriptCanOpenWindowsAutomatically(bool); - bool JavaScriptCanOpenWindowsAutomatically() const { return m_javaScriptCanOpenWindowsAutomatically; } + bool javaScriptCanOpenWindowsAutomatically() const { return m_javaScriptCanOpenWindowsAutomatically; } void setJavaEnabled(bool); bool isJavaEnabled() const { return m_isJavaEnabled; } @@ -106,9 +127,15 @@ namespace WebCore { void setPrivateBrowsingEnabled(bool); bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; } - + + void setCaretBrowsingEnabled(bool); + bool caretBrowsingEnabled() const { return m_caretBrowsingEnabled; } + void setDefaultTextEncodingName(const String&); const String& defaultTextEncodingName() const { return m_defaultTextEncodingName; } + + void setUsesEncodingDetector(bool); + bool usesEncodingDetector() const { return m_usesEncodingDetector; } void setUserStyleSheetLocation(const KURL&); const KURL& userStyleSheetLocation() const { return m_userStyleSheetLocation; } @@ -136,6 +163,12 @@ namespace WebCore { void setNeedsKeyboardEventDisambiguationQuirks(bool); bool needsKeyboardEventDisambiguationQuirks() const { return m_needsKeyboardEventDisambiguationQuirks; } + void setNeedsLeopardMailQuirks(bool); + bool needsLeopardMailQuirks() const { return m_needsLeopardMailQuirks; } + + void setNeedsTigerMailQuirks(bool); + bool needsTigerMailQuirks() const { return m_needsTigerMailQuirks; } + void setDOMPasteAllowed(bool); bool isDOMPasteAllowed() const { return m_isDOMPasteAllowed; } @@ -172,9 +205,6 @@ namespace WebCore { void setLocalStorageDatabasePath(const String&); const String& localStorageDatabasePath() const { return m_localStorageDatabasePath; } - void disableRangeMutationForOldAppleMail(bool); - bool rangeMutationDisabledForOldAppleMail() const { return m_rangeMutationDisabledForOldAppleMail; } - void setApplicationChromeMode(bool); bool inApplicationChromeMode() const { return m_inApplicationChromeMode; } @@ -199,6 +229,15 @@ namespace WebCore { static bool shouldPaintNativeControls() { return gShouldPaintNativeControls; } #endif + void setAllowScriptsToCloseWindows(bool); + bool allowScriptsToCloseWindows() const { return m_allowScriptsToCloseWindows; } + + void setEditingBehavior(EditingBehavior behavior) { m_editingBehavior = behavior; } + EditingBehavior editingBehavior() const { return static_cast<EditingBehavior>(m_editingBehavior); } + + void setDownloadableBinaryFontsEnabled(bool); + bool downloadableBinaryFontsEnabled() const { return m_downloadableBinaryFontsEnabled; } + private: Page* m_page; @@ -218,13 +257,17 @@ namespace WebCore { int m_minimumLogicalFontSize; int m_defaultFontSize; int m_defaultFixedFontSize; + size_t m_maximumDecodedImageSize; bool m_isJavaEnabled : 1; bool m_loadsImagesAutomatically : 1; bool m_privateBrowsingEnabled : 1; + bool m_caretBrowsingEnabled : 1; bool m_arePluginsEnabled : 1; bool m_databasesEnabled : 1; bool m_localStorageEnabled : 1; bool m_isJavaScriptEnabled : 1; + bool m_isWebSecurityEnabled : 1; + bool m_allowUniversalAccessFromFileURLs: 1; bool m_javaScriptCanOpenWindowsAutomatically : 1; bool m_shouldPrintBackgrounds : 1; bool m_textAreasAreResizable : 1; @@ -233,6 +276,8 @@ namespace WebCore { #endif bool m_needsAdobeFrameReloadingQuirk : 1; bool m_needsKeyboardEventDisambiguationQuirks : 1; + bool m_needsLeopardMailQuirks : 1; + bool m_needsTigerMailQuirks : 1; bool m_isDOMPasteAllowed : 1; bool m_shrinksStandaloneImagesToFit : 1; bool m_usesPageCache: 1; @@ -245,11 +290,13 @@ namespace WebCore { bool m_webArchiveDebugModeEnabled : 1; bool m_inApplicationChromeMode : 1; bool m_offlineWebApplicationCacheEnabled : 1; - bool m_rangeMutationDisabledForOldAppleMail : 1; bool m_shouldPaintCustomScrollbars : 1; bool m_zoomsTextOnly : 1; bool m_enforceCSSMIMETypeInStrictMode : 1; - size_t m_maximumDecodedImageSize; + bool m_usesEncodingDetector : 1; + bool m_allowScriptsToCloseWindows : 1; + unsigned m_editingBehavior : 1; + bool m_downloadableBinaryFontsEnabled : 1; #if USE(SAFARI_THEME) static bool gShouldPaintNativeControls; |