Commit bf00db5b authored by abarth@webkit.org's avatar abarth@webkit.org

2010-04-22 Adam Barth <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * editing/execCommand/clipboard-access-expected.txt: Removed.
        * editing/execCommand/clipboard-access.html: Removed.
        * editing/execCommand/script-tests/clipboard-access.js: Removed.
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * WebCore.base.exp:
        * editing/EditorCommand.cpp:
        (WebCore::supportedPaste):
        (WebCore::createCommandMap):
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        * page/Settings.h:
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * public/WebSettings.h:
        * src/WebSettingsImpl.cpp:
        * src/WebSettingsImpl.h:
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * webkit/webkitwebsettings.cpp:
        (webkit_web_settings_class_init):
        (webkit_web_settings_set_property):
        (webkit_web_settings_get_property):
        (webkit_web_settings_copy):
        * webkit/webkitwebview.cpp:
        (webkit_web_view_update_settings):
        (webkit_web_view_settings_notify):
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * WebView/WebPreferenceKeysPrivate.h:
        * WebView/WebPreferences.mm:
        (+[WebPreferences initialize]):
        * WebView/WebPreferencesPrivate.h:
        * WebView/WebView.mm:
        (-[WebView _preferencesChangedNotification:]):
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * Api/qwebsettings.cpp:
        (QWebSettingsPrivate::apply):
        * Api/qwebsettings.h:
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * Interfaces/IWebPreferencesPrivate.idl:
        * WebPreferenceKeysPrivate.h:
        * WebPreferences.cpp:
        (WebPreferences::initializeDefaultSettings):
        * WebPreferences.h:
        * WebView.cpp:
        (WebView::notifyPreferencesChanged):
2010-04-22  Adam Barth  <abarth@webkit.org>

        Unreviewed, rolling out r58069.
        http://trac.webkit.org/changeset/58069
        https://bugs.webkit.org/show_bug.cgi?id=27751

        Broke compile on Windows.

        * DumpRenderTree/LayoutTestController.cpp:
        (LayoutTestController::staticFunctions):
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/chromium/LayoutTestController.cpp:
        (LayoutTestController::LayoutTestController):
        (LayoutTestController::overridePreference):
        * DumpRenderTree/chromium/LayoutTestController.h:
        * DumpRenderTree/chromium/TestShell.cpp:
        (TestShell::resetWebSettings):
        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
        * DumpRenderTree/mac/DumpRenderTree.mm:
        (resetDefaultsToConsistentValues):
        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
        (WebCore::WebPage::WebPage):
        (WebCore::WebPage::resetSettings):
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        * DumpRenderTree/qt/LayoutTestControllerQt.h:
        * DumpRenderTree/win/DumpRenderTree.cpp:
        (resetDefaultsToConsistentValues):
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 95c397d4
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* editing/execCommand/clipboard-access-expected.txt: Removed.
* editing/execCommand/clipboard-access.html: Removed.
* editing/execCommand/script-tests/clipboard-access.js: Removed.
2010-04-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
......
Run this test manually to check whether javascript programs can access clipboard.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/clipboard-access.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
description("Run this test manually to check whether javascript programs can access clipboard.");
var nonEditableParagraph = document.createElement("p");
nonEditableParagraph.appendChild(document.createTextNode("x"));
document.body.appendChild(nonEditableParagraph);
var editableParagraph = document.createElement("p");
editableParagraph.appendChild(document.createTextNode("x"));
editableParagraph.setAttribute("contentEditable", "true");
document.body.appendChild(editableParagraph);
var editablePlainTextParagraph = document.createElement("p");
editablePlainTextParagraph.appendChild(document.createTextNode("x"));
editablePlainTextParagraph.setAttribute("contentEditable", "plaintext-only");
document.body.appendChild(editablePlainTextParagraph);
// Cannot run this test inside layoutTestController
// since clipboard access is required for other layout tests.
if (!window.layoutTestController)
{
runTest();
}
function enabled(command, element, selectionStart, selectionEnd)
{
var selection = document.getSelection();
selection.removeAllRanges();
if (element) {
var range = document.createRange();
range.setStart(element.firstChild, selectionStart);
range.setEnd(element.firstChild, selectionEnd);
selection.addRange(range);
}
var result = document.queryCommandEnabled(command)
selection.removeAllRanges();
return result;
}
function whenEnabled(command)
{
var enabledWithNoSelection = enabled(command);
var enabledWithCaret = enabled(command, editableParagraph, 0, 0);
var enabledWithEditableRange = enabled(command, editableParagraph, 0, 1);
var enabledWithPlainTextCaret = enabled(command, editablePlainTextParagraph, 0, 0);
var enabledWithPlainTextEditableRange = enabled(command, editablePlainTextParagraph, 0, 1);
var enabledWithPoint = enabled(command, nonEditableParagraph, 0, 0);
var enabledWithNonEditableRange = enabled(command, nonEditableParagraph, 0, 1);
var summaryInteger = enabledWithNoSelection
| (enabledWithCaret << 1)
| (enabledWithEditableRange << 2)
| (enabledWithPlainTextCaret << 3)
| (enabledWithPlainTextEditableRange << 4)
| (enabledWithPoint << 5)
| (enabledWithNonEditableRange << 6);
if (summaryInteger === 0x7F)
return "always";
if (summaryInteger === 0x54)
return "range";
if (summaryInteger === 0x1E)
return "editable";
if (summaryInteger === 0x0A)
return "caret";
if (summaryInteger === 0x14)
return "editable range";
if (summaryInteger === 0x06)
return "richly editable";
if (summaryInteger === 0x02)
return "richly editable caret";
if (summaryInteger === 0x04)
return "richly editable range";
if (summaryInteger === 0x5E)
return "visible";
return summaryInteger;
}
function runTest()
{
shouldBe("whenEnabled('Copy')", "0");
shouldBe("whenEnabled('Cut')", "0");
shouldBe("whenEnabled('Paste')", "0");
shouldBe("whenEnabled('PasteAndMatchStyle')", "0");
}
document.body.removeChild(nonEditableParagraph);
document.body.removeChild(editableParagraph);
document.body.removeChild(editablePlainTextParagraph);
var successfullyParsed = true;
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* WebCore.base.exp:
* editing/EditorCommand.cpp:
(WebCore::supportedPaste):
(WebCore::createCommandMap):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
2010-04-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
......@@ -677,7 +677,6 @@ __ZN7WebCore8Settings28setForceFTPDirectoryListingsEb
__ZN7WebCore8Settings29setAuthorAndUserStylesEnabledEb
__ZN7WebCore8Settings29setWebArchiveDebugModeEnabledEb
__ZN7WebCore8Settings30setAllowFileAccessFromFileURLsEb
__ZN7WebCore8Settings31setJavaScriptCanAccessClipboardEb
__ZN7WebCore8Settings31setShrinksStandaloneImagesToFitEb
__ZN7WebCore8Settings32setAcceleratedCompositingEnabledEb
__ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb
......
......@@ -1069,21 +1069,6 @@ static bool supportedFromMenuOrKeyBinding(Frame*, EditorCommandSource source)
return source == CommandFromMenuOrKeyBinding;
}
static bool supportedCopyCut(Frame* frame, EditorCommandSource source)
{
switch (source) {
case CommandFromMenuOrKeyBinding:
return true;
case CommandFromDOM:
case CommandFromDOMWithUserInterface: {
Settings* settings = frame ? frame->settings() : 0;
return settings && settings->javaScriptCanAccessClipboard();
}
}
ASSERT_NOT_REACHED();
return false;
}
static bool supportedPaste(Frame* frame, EditorCommandSource source)
{
switch (source) {
......@@ -1092,7 +1077,7 @@ static bool supportedPaste(Frame* frame, EditorCommandSource source)
case CommandFromDOM:
case CommandFromDOMWithUserInterface: {
Settings* settings = frame ? frame->settings() : 0;
return settings && (settings->javaScriptCanAccessClipboard() || settings->isDOMPasteAllowed());
return settings && settings->isDOMPasteAllowed();
}
}
ASSERT_NOT_REACHED();
......@@ -1319,9 +1304,9 @@ static const CommandMap& createCommandMap()
{ "BackColor", { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueBackColor, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "BackwardDelete", { executeDeleteBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, // FIXME: remove BackwardDelete when Safari for Windows stops using it.
{ "Bold", { executeToggleBold, supported, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "Copy", { executeCopy, supportedCopyCut, enabledCopy, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
{ "Copy", { executeCopy, supported, enabledCopy, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
{ "CreateLink", { executeCreateLink, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "Cut", { executeCut, supportedCopyCut, enabledCut, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
{ "Cut", { executeCut, supported, enabledCut, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
{ "Delete", { executeDelete, supported, enabledDelete, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "DeleteBackward", { executeDeleteBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "DeleteBackwardByDecomposingPreviousCharacter", { executeDeleteBackwardByDecomposingPreviousCharacter, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
......
......@@ -84,7 +84,6 @@ Settings::Settings(Page* page)
, m_allowUniversalAccessFromFileURLs(true)
, m_allowFileAccessFromFileURLs(true)
, m_javaScriptCanOpenWindowsAutomatically(false)
, m_javaScriptCanAccessClipboard(false)
, m_shouldPrintBackgrounds(false)
, m_textAreasAreResizable(false)
#if ENABLE(DASHBOARD_SUPPORT)
......@@ -309,11 +308,6 @@ void Settings::setJavaScriptCanOpenWindowsAutomatically(bool javaScriptCanOpenWi
m_javaScriptCanOpenWindowsAutomatically = javaScriptCanOpenWindowsAutomatically;
}
void Settings::setJavaScriptCanAccessClipboard(bool javaScriptCanAccessClipboard)
{
m_javaScriptCanAccessClipboard = javaScriptCanAccessClipboard;
}
void Settings::setDefaultTextEncodingName(const String& defaultTextEncodingName)
{
m_defaultTextEncodingName = defaultTextEncodingName;
......
......@@ -122,9 +122,6 @@ namespace WebCore {
void setJavaScriptCanOpenWindowsAutomatically(bool);
bool javaScriptCanOpenWindowsAutomatically() const { return m_javaScriptCanOpenWindowsAutomatically; }
void setJavaScriptCanAccessClipboard(bool);
bool javaScriptCanAccessClipboard() const { return m_javaScriptCanAccessClipboard; }
void setSpatialNavigationEnabled(bool);
bool isSpatialNavigationEnabled() const { return m_isSpatialNavigationEnabled; }
......@@ -348,7 +345,6 @@ namespace WebCore {
bool m_allowUniversalAccessFromFileURLs: 1;
bool m_allowFileAccessFromFileURLs: 1;
bool m_javaScriptCanOpenWindowsAutomatically : 1;
bool m_javaScriptCanAccessClipboard : 1;
bool m_shouldPrintBackgrounds : 1;
bool m_textAreasAreResizable : 1;
#if ENABLE(DASHBOARD_SUPPORT)
......
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
* src/WebSettingsImpl.h:
2010-04-22 Tony Chang <tony@chromium.org>
Reviewed by Shinichiro Hamaji.
......
......@@ -72,7 +72,6 @@ public:
virtual void setAuthorAndUserStylesEnabled(bool) = 0;
virtual void setUsesPageCache(bool) = 0;
virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
virtual void setJavaScriptCanAccessClipboard(bool) = 0;
virtual void setXSSAuditorEnabled(bool) = 0;
virtual void setLocalStorageEnabled(bool) = 0;
virtual void setEditableLinkBehaviorNeverLive() = 0;
......
......@@ -200,11 +200,6 @@ void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled)
m_settings->setDownloadableBinaryFontsEnabled(enabled);
}
void WebSettingsImpl::setJavaScriptCanAccessClipboard(bool enabled)
{
m_settings->setJavaScriptCanAccessClipboard(enabled);
}
void WebSettingsImpl::setXSSAuditorEnabled(bool enabled)
{
m_settings->setXSSAuditorEnabled(enabled);
......
......@@ -74,7 +74,6 @@ public:
virtual void setAuthorAndUserStylesEnabled(bool);
virtual void setUsesPageCache(bool);
virtual void setDownloadableBinaryFontsEnabled(bool);
virtual void setJavaScriptCanAccessClipboard(bool);
virtual void setXSSAuditorEnabled(bool);
virtual void setLocalStorageEnabled(bool);
virtual void setEditableLinkBehaviorNeverLive();
......
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):
(webkit_web_settings_copy):
* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):
2010-04-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
......
......@@ -96,7 +96,6 @@ struct _WebKitWebSettingsPrivate {
gboolean enable_spatial_navigation;
gchar* user_agent;
gboolean javascript_can_open_windows_automatically;
gboolean javascript_can_access_clipboard;
gboolean enable_offline_web_application_cache;
WebKitEditingBehavior editing_behavior;
gboolean enable_universal_access_from_file_uris;
......@@ -146,7 +145,6 @@ enum {
PROP_ENABLE_SPATIAL_NAVIGATION,
PROP_USER_AGENT,
PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY,
PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD,
PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE,
PROP_EDITING_BEHAVIOR,
PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS,
......@@ -625,22 +623,6 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
_("Whether JavaScript can open windows automatically"),
FALSE,
flags));
/**
* WebKitWebSettings:javascript-can-access-clipboard
*
* Whether JavaScript can access Clipboard.
*
* Since: 1.3.0
*/
g_object_class_install_property(gobject_class,
PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD,
g_param_spec_boolean("javascript-can-access-clipboard",
_("JavaScript can access Clipboard"),
_("Whether JavaScript can access Clipboard"),
FALSE,
flags));
/**
* WebKitWebSettings:enable-offline-web-application-cache
*
......@@ -1041,9 +1023,6 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY:
priv->javascript_can_open_windows_automatically = g_value_get_boolean(value);
break;
case PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD:
priv->javascript_can_access_clipboard = g_value_get_boolean(value);
break;
case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
priv->enable_offline_web_application_cache = g_value_get_boolean(value);
break;
......@@ -1182,9 +1161,6 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY:
g_value_set_boolean(value, priv->javascript_can_open_windows_automatically);
break;
case PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD:
g_value_set_boolean(value, priv->javascript_can_access_clipboard);
break;
case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
g_value_set_boolean(value, priv->enable_offline_web_application_cache);
break;
......@@ -1279,7 +1255,6 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
"enable-spatial-navigation", priv->enable_spatial_navigation,
"user-agent", webkit_web_settings_get_user_agent(web_settings),
"javascript-can-open-windows-automatically", priv->javascript_can_open_windows_automatically,
"javascript-can-access-clipboard", priv->javascript_can_access_clipboard,
"enable-offline-web-application-cache", priv->enable_offline_web_application_cache,
"editing-behavior", priv->editing_behavior,
"enable-universal-access-from-file-uris", priv->enable_universal_access_from_file_uris,
......
......@@ -2695,8 +2695,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
gboolean autoLoadImages, autoShrinkImages, printBackgrounds,
enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas,
enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage,
enableXSSAuditor, enableSpatialNavigation, javascriptCanOpenWindows,
javaScriptCanAccessClipboard, enableOfflineWebAppCache,
enableXSSAuditor, enableSpatialNavigation, javascriptCanOpenWindows, enableOfflineWebAppCache,
enableUniversalAccessFromFileURI, enableFileAccessFromFileURI,
enableDOMPaste, tabKeyCyclesThroughElements,
enableSiteSpecificQuirks, usePageCache, enableJavaApplet;
......@@ -2726,7 +2725,6 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
"enable-xss-auditor", &enableXSSAuditor,
"enable-spatial-navigation", &enableSpatialNavigation,
"javascript-can-open-windows-automatically", &javascriptCanOpenWindows,
"javascript-can-access-clipboard", &javaScriptCanAccessClipboard,
"enable-offline-web-application-cache", &enableOfflineWebAppCache,
"editing-behavior", &editingBehavior,
"enable-universal-access-from-file-uris", &enableUniversalAccessFromFileURI,
......@@ -2762,7 +2760,6 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setXSSAuditorEnabled(enableXSSAuditor);
settings->setSpatialNavigationEnabled(enableSpatialNavigation);
settings->setJavaScriptCanOpenWindowsAutomatically(javascriptCanOpenWindows);
settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache);
settings->setEditingBehavior(core(editingBehavior));
settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
......@@ -2860,8 +2857,6 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
settings->setSpatialNavigationEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("javascript-can-open-windows-automatically"))
settings->setJavaScriptCanOpenWindowsAutomatically(g_value_get_boolean(&value));
else if (name == g_intern_string("javascript-can-access-clipboard"))
settings->setJavaScriptCanAccessClipboard(g_value_get_boolean(&value));
else if (name == g_intern_string("enable-offline-web-application-cache"))
settings->setOfflineWebApplicationCacheEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("editing-behavior"))
......
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChangedNotification:]):
2010-04-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
......
......@@ -84,7 +84,6 @@
#define WebKitEnableFullDocumentTeardownPreferenceKey @"WebKitEnableFullDocumentTeardown"
#define WebKitOfflineWebApplicationCacheEnabledPreferenceKey @"WebKitOfflineWebApplicationCacheEnabled"
#define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly"
#define WebKitJavaScriptCanAccessClipboardPreferenceKey @"WebKitJavaScriptCanAccessClipboard"
#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
#define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
......
......@@ -350,7 +350,6 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitLocalFileContentSniffingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitOfflineWebApplicationCacheEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey,
[NSNumber numberWithBool:NO], WebKitJavaScriptCanAccessClipboardPreferenceKey,
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
......@@ -832,16 +831,6 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue:flag forKey:WebKitZoomsTextOnlyPreferenceKey];
}
- (BOOL)javaScriptCanAccessClipboard
{
return [self _boolValueForKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
}
- (void)setJavaScriptCanAccessClipboard:(BOOL)flag
{
[self _setBoolValue:flag forKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
}
- (BOOL)isXSSAuditorEnabled
{
return [self _boolValueForKey:WebKitXSSAuditorEnabledPreferenceKey];
......
......@@ -107,9 +107,6 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)zoomsTextOnly;
- (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
- (BOOL)javaScriptCanAccessClipboard;
- (void)setJavaScriptCanAccessClipboard:(BOOL)flag;
- (BOOL)isXSSAuditorEnabled;
- (void)setXSSAuditorEnabled:(BOOL)flag;
......
......@@ -1345,7 +1345,6 @@ static bool fastDocumentTeardownEnabled()
settings->setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]);
settings->setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]);
settings->setZoomMode([preferences zoomsTextOnly] ? ZoomTextOnly : ZoomPage);
settings->setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
......
......@@ -187,8 +187,8 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
value = attributes.value(QWebSettings::DOMPasteAllowed,
global->attributes.value(QWebSettings::DOMPasteAllowed));
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
......@@ -238,10 +238,6 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
settings->setAllowFileAccessFromFileURLs(value);
value = attributes.value(QWebSettings::JavaScriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavaScriptCanAccessClipboard));
settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::XSSAuditingEnabled,
global->attributes.value(QWebSettings::XSSAuditingEnabled));
settings->setXSSAuditorEnabled(value);
......@@ -376,8 +372,8 @@ QWebSettings* QWebSettings::globalSettings()
recording visited pages in the history and storing web page icons.
\value JavascriptCanOpenWindows Specifies whether JavaScript programs
can open new windows.
\value DOMPasteAllowed Specifies whether JavaScript programs can
read clipboard contents.
\value JavascriptCanAccessClipboard Specifies whether JavaScript programs
can read or write to the clipboard.
\value DeveloperExtrasEnabled Enables extra tools for Web developers.
Currently this enables the "Inspect" element in the context menu as
well as the use of QWebInspector which controls the WebKit WebInspector
......@@ -405,7 +401,6 @@ QWebSettings* QWebSettings::globalSettings()
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
\value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls.
\value JavaScriptCanAccessClipboard Specifies whether JavaScript can access the clipboard.
\value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site scripting attempts.
\value AcceleratedCompositingEnabled This feature, when used in conjunction with
QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and
......
......@@ -55,7 +55,7 @@ public:
PluginsEnabled,
PrivateBrowsingEnabled,
JavascriptCanOpenWindows,
DOMPasteAllowed,
JavascriptCanAccessClipboard,
DeveloperExtrasEnabled,
LinksIncludedInFocusChain,
ZoomTextOnly,
......@@ -68,7 +68,6 @@ public:
#endif
LocalContentCanAccessRemoteUrls,
DnsPrefetchEnabled,
JavaScriptCanAccessClipboard,
XSSAuditingEnabled,
AcceleratedCompositingEnabled,
WebGLEnabled,
......
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
* Api/qwebsettings.h:
2010-04-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
......
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
http://trac.webkit.org/changeset/58069
https://bugs.webkit.org/show_bug.cgi?id=27751
Broke compile on Windows.
* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
2010-04-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
......
......@@ -109,7 +109,4 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setShowRepaintCounter([in] BOOL);
HRESULT showRepaintCounter([out, retval] BOOL*);
HRESULT javaScriptCanAccessClipboard([out, retval] BOOL *enabled);
HRESULT setJavaScriptCanAccessClipboard([in] BOOL enabled);
}
......@@ -125,8 +125,6 @@
#define WebKitZoomsTextOnlyPreferenceKey "WebKitZoomsTextOnly"
#define WebKitJavaScriptCanAccessClipboard "WebKitJavaScriptCanAccessClipboard"
#define WebKitXSSAuditorEnabledPreferenceKey "WebKitXSSAuditorEnabled"
#define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers"
......
......@@ -206,7 +206,6 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitWebSecurityEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanAccessClipboardPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitXSSAuditorEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue);
......@@ -810,20 +809,6 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setAllowFileAccessFromFileURLs(
return S_OK;
}
HRESULT STDMETHODCALLTYPE WebPreferences::javaScriptCanAccessClipboard(