diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 01:10:49 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 01:10:49 +0000 |
commit | 4948b51a517efd203e142f222bc6911dc6ec1779 (patch) | |
tree | ffab6aef8322e58d132084feb5c6e4bd09f94109 /webkit | |
parent | 265ef6ce9128b4806092066bf6223dc6782c5aa0 (diff) | |
download | chromium_src-4948b51a517efd203e142f222bc6911dc6ec1779.zip chromium_src-4948b51a517efd203e142f222bc6911dc6ec1779.tar.gz chromium_src-4948b51a517efd203e142f222bc6911dc6ec1779.tar.bz2 |
Revert "Implement setSmartInsertDeleteEnabled and
setSelectTrailingWhitespaceEnabled" because of layout test regressions.
This reverts commit r6404.
Review URL: http://codereview.chromium.org/13155
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webview_delegate.h | 15 | ||||
-rw-r--r-- | webkit/tools/layout_tests/test_lists/tests_fixable.txt | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 22 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.h | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.h | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 22 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 13 |
7 files changed, 6 insertions, 81 deletions
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h index cfdc99e..6ea074c 100644 --- a/webkit/glue/webview_delegate.h +++ b/webkit/glue/webview_delegate.h @@ -30,7 +30,6 @@ #include <vector> #include "base/basictypes.h" -#include "base/logging.h" #include "googleurl/src/gurl.h" #include "webkit/glue/context_node_types.h" #include "webkit/glue/webwidget_delegate.h" @@ -632,13 +631,7 @@ class WebViewDelegate : virtual public WebWidgetDelegate { } virtual bool SmartInsertDeleteEnabled() { - return true; - } - - virtual void SetSmartInsertDeleteEnabled(bool enabled) { - // This method is only used in test shell, which overrides this - // method. - NOTREACHED(); + return false; } virtual bool IsSelectTrailingWhitespaceEnabled() { @@ -649,12 +642,6 @@ class WebViewDelegate : virtual public WebWidgetDelegate { #endif } - virtual void SetSelectTrailingWhitespaceEnabled(bool enabled) { - // This method is only used in test shell, which overrides this - // method. - NOTREACHED(); - } - virtual void DidBeginEditing() { } virtual void DidChangeSelection(bool is_empty_selection) { } virtual void DidChangeContents() { } diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt index 7e945d5..a86162a 100644 --- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt +++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt @@ -1343,6 +1343,7 @@ LayoutTests/http/tests/misc/dns-prefetch-control.html = FAIL TIMEOUT PASS DEBUG : LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody.html = FAIL PASS // NEW FOR MERGE 37604:38097 +LayoutTests/editing/deleting/smart-editing-disabled.html = FAIL LayoutTests/fast/events/destroyed-atomic-string.html = FAIL LayoutTests/fast/js/exception-thrown-from-new.html = FAIL LayoutTests/fast/js/global-constructors.html = FAIL @@ -1460,6 +1461,7 @@ LayoutTests/http/tests/misc/single-character-pi-stylesheet.xhtml = FAIL LayoutTests/fast/workers/stress-js-execution.html = TIMEOUT // MERGE 38729:38760: New tests +LayoutTests/editing/selection/doubleclick-whitespace.html = FAIL LayoutTests/fast/workers/worker-terminate.html = TIMEOUT LayoutTests/http/tests/misc/timer-vs-loading.html = TIMEOUT diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index 79494b2..86e0527 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -94,8 +94,6 @@ LayoutTestController::LayoutTestController(TestShell* shell) { BindMethod("execCommand", &LayoutTestController::execCommand); BindMethod("setPopupBlockingEnabled", &LayoutTestController::setPopupBlockingEnabled); BindMethod("setStopProvisionalFrameLoads", &LayoutTestController::setStopProvisionalFrameLoads); - BindMethod("setSmartInsertDeleteEnabled", &LayoutTestController::setSmartInsertDeleteEnabled); - BindMethod("setSelectTrailingWhitespaceEnabled", &LayoutTestController::setSelectTrailingWhitespaceEnabled); // The following are stubs. BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive); @@ -536,25 +534,6 @@ void LayoutTestController::setStopProvisionalFrameLoads( stop_provisional_frame_loads_ = true; } -void LayoutTestController::setSmartInsertDeleteEnabled( - const CppArgumentList& args, CppVariant* result) { - if (args.size() > 0 && args[0].isBool()) { - shell_->delegate()->SetSmartInsertDeleteEnabled(args[0].value.boolValue); - } - - result->SetNull(); -} - -void LayoutTestController::setSelectTrailingWhitespaceEnabled( - const CppArgumentList& args, CppVariant* result) { - if (args.size() > 0 && args[0].isBool()) { - shell_->delegate()->SetSelectTrailingWhitespaceEnabled( - args[0].value.boolValue); - } - - result->SetNull(); -} - // // Unimplemented stubs // @@ -636,3 +615,4 @@ void LayoutTestController::fallbackMethod( } result->SetNull(); } + diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h index f6ddc82..c6a46e2 100644 --- a/webkit/tools/test_shell/layout_test_controller.h +++ b/webkit/tools/test_shell/layout_test_controller.h @@ -122,14 +122,6 @@ class LayoutTestController : public CppBoundClass { void setStopProvisionalFrameLoads(const CppArgumentList& args, CppVariant* result); - // Enable or disable smart insert/delete. This is enabled by default. - void setSmartInsertDeleteEnabled(const CppArgumentList& args, - CppVariant* result); - - // Enable or disable trailing whitespace selection on double click. - void setSelectTrailingWhitespaceEnabled(const CppArgumentList& args, - CppVariant* result); - // The following are only stubs. TODO(pamg): Implement any of these that // are needed to pass the layout tests. void dumpAsWebArchive(const CppArgumentList& args, CppVariant* result); diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h index 90c7f64..95b0d47 100644 --- a/webkit/tools/test_shell/test_shell.h +++ b/webkit/tools/test_shell/test_shell.h @@ -119,11 +119,6 @@ public: void ResetTestController() { layout_test_controller_->Reset(); event_sending_controller_->Reset(); - - // Reset state in the test webview delegate. We don't need to call - // SetSelectTrailingWhitespaceEnabled because enabling smart - // insert/delete will disable select trailing whitespace. - delegate()->SetSmartInsertDeleteEnabled(true); } // Passes options from LayoutTestController through to the delegate (or diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 99be83c..061cc9b 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -548,27 +548,7 @@ bool TestWebViewDelegate::ShouldApplyStyle(WebView* webview, } bool TestWebViewDelegate::SmartInsertDeleteEnabled() { - return smart_insert_delete_enabled_; -} - -void TestWebViewDelegate::SetSmartInsertDeleteEnabled(bool enabled) { - smart_insert_delete_enabled_ = enabled; - // In upstream WebKit, smart insert/delete is mutually exclusive with select - // trailing whitespace. - if (enabled) - select_trailing_whitespace_enabled_ = false; -} - -bool TestWebViewDelegate::IsSelectTrailingWhitespaceEnabled() { - return select_trailing_whitespace_enabled_; -} - -void TestWebViewDelegate::SetSelectTrailingWhitespaceEnabled(bool enabled) { - select_trailing_whitespace_enabled_ = enabled; - // In upstream WebKit, smart insert/delete is mutually exclusive with select - // trailing whitespace. - if (enabled) - smart_insert_delete_enabled_ = false; + return true; } void TestWebViewDelegate::DidBeginEditing() { diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 66d7d84..1bded4f 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -59,9 +59,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, shell_(shell), top_loading_frame_(NULL), page_id_(-1), - last_page_id_updated_(-1), - smart_insert_delete_enabled_(true), - select_trailing_whitespace_enabled_(false) + last_page_id_updated_(-1) #if defined(OS_WIN) , custom_cursor_(NULL) #elif defined(OS_LINUX) @@ -177,9 +175,6 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, std::wstring style, std::wstring range); virtual bool SmartInsertDeleteEnabled(); - virtual void SetSmartInsertDeleteEnabled(bool enabled); - virtual bool IsSelectTrailingWhitespaceEnabled(); - virtual void SetSelectTrailingWhitespaceEnabled(bool enabled); virtual void DidBeginEditing(); virtual void DidChangeSelection(bool is_empty_selection); virtual void DidChangeContents(); @@ -300,12 +295,6 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, ResourceMap resource_identifier_map_; std::string GetResourceDescription(uint32 identifier); - // true if we want to enable smart insert/delete. - bool smart_insert_delete_enabled_; - - // true if we want to enable selection of trailing whitespaces - bool select_trailing_whitespace_enabled_; - #if defined(OS_WIN) HCURSOR custom_cursor_; |