diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 22:13:03 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 22:13:03 +0000 |
commit | 04fc948392b6fba1e640bd97eeea2293d9ed9b7e (patch) | |
tree | 3c413c4bf8d139cdf932fdfc4b8a7e3cc812313f /webkit | |
parent | e0d0014eb45448bf6bc59d905707d242f7517ba6 (diff) | |
download | chromium_src-04fc948392b6fba1e640bd97eeea2293d9ed9b7e.zip chromium_src-04fc948392b6fba1e640bd97eeea2293d9ed9b7e.tar.gz chromium_src-04fc948392b6fba1e640bd97eeea2293d9ed9b7e.tar.bz2 |
Fold WebEditingClient into WebViewClient.
R=dglazkov
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/211032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/public/WebEditingClient.h | 71 | ||||
-rw-r--r-- | webkit/api/public/WebViewClient.h | 31 | ||||
-rw-r--r-- | webkit/glue/editor_client_impl.cc | 104 | ||||
-rw-r--r-- | webkit/glue/editor_client_impl.h | 9 | ||||
-rw-r--r-- | webkit/glue/webview.h | 4 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 11 | ||||
-rw-r--r-- | webkit/glue/webview_impl.h | 4 | ||||
-rw-r--r-- | webkit/glue/webworker_impl.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/keyboard_unittest.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/mac/webview_host.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 278 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 80 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_gtk.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_win.cc | 2 | ||||
-rw-r--r-- | webkit/webkit.gyp | 1 |
15 files changed, 240 insertions, 363 deletions
diff --git a/webkit/api/public/WebEditingClient.h b/webkit/api/public/WebEditingClient.h deleted file mode 100644 index 9b20593..0000000 --- a/webkit/api/public/WebEditingClient.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebEditingClient_h -#define WebEditingClient_h - -#include "WebEditingAction.h" -#include "WebTextAffinity.h" - -namespace WebKit { - class WebNode; - class WebRange; - class WebString; - - // This interface allow the client to intercept and overrule editing - // operations. - class WebEditingClient { - public: - virtual bool shouldBeginEditing(const WebRange&) = 0; - virtual bool shouldEndEditing(const WebRange&) = 0; - virtual bool shouldInsertNode( - const WebNode&, const WebRange&, WebEditingAction) = 0; - virtual bool shouldInsertText( - const WebString&, const WebRange&, WebEditingAction) = 0; - virtual bool shouldChangeSelectedRange( - const WebRange& from, const WebRange& to, WebTextAffinity, - bool stillSelecting) = 0; - virtual bool shouldDeleteRange(const WebRange&) = 0; - virtual bool shouldApplyStyle(const WebString& style, const WebRange&) = 0; - - virtual bool isSmartInsertDeleteEnabled() = 0; - virtual bool isSelectTrailingWhitespaceEnabled() = 0; - virtual void setInputMethodEnabled(bool enabled) = 0; - - virtual void didBeginEditing() = 0; - virtual void didChangeSelection(bool isSelectionEmpty) = 0; - virtual void didChangeContents() = 0; - virtual void didExecuteCommand(const WebString& commandName) = 0; - virtual void didEndEditing() = 0; - }; - -} // namespace WebKit - -#endif diff --git a/webkit/api/public/WebViewClient.h b/webkit/api/public/WebViewClient.h index 07717c8..c0f22c1 100644 --- a/webkit/api/public/WebViewClient.h +++ b/webkit/api/public/WebViewClient.h @@ -32,6 +32,8 @@ #define WebViewClient_h #include "WebDragOperation.h" +#include "WebEditingAction.h" +#include "WebTextAffinity.h" #include "WebWidgetClient.h" class WebView; // FIXME: Move into the WebKit namespace. @@ -40,6 +42,8 @@ namespace WebKit { class WebDragData; class WebFileChooserCompletion; class WebFrame; + class WebNode; + class WebRange; class WebString; class WebWidget; struct WebConsoleMessage; @@ -83,6 +87,33 @@ namespace WebKit { virtual void didStopLoading() = 0; + // Editing ------------------------------------------------------------- + + // These methods allow the client to intercept and overrule editing + // operations. + virtual bool shouldBeginEditing(const WebRange&) = 0; + virtual bool shouldEndEditing(const WebRange&) = 0; + virtual bool shouldInsertNode( + const WebNode&, const WebRange&, WebEditingAction) = 0; + virtual bool shouldInsertText( + const WebString&, const WebRange&, WebEditingAction) = 0; + virtual bool shouldChangeSelectedRange( + const WebRange& from, const WebRange& to, WebTextAffinity, + bool stillSelecting) = 0; + virtual bool shouldDeleteRange(const WebRange&) = 0; + virtual bool shouldApplyStyle(const WebString& style, const WebRange&) = 0; + + virtual bool isSmartInsertDeleteEnabled() = 0; + virtual bool isSelectTrailingWhitespaceEnabled() = 0; + virtual void setInputMethodEnabled(bool enabled) = 0; + + virtual void didBeginEditing() = 0; + virtual void didChangeSelection(bool isSelectionEmpty) = 0; + virtual void didChangeContents() = 0; + virtual void didExecuteCommand(const WebString& commandName) = 0; + virtual void didEndEditing() = 0; + + // Spellchecker -------------------------------------------------------- // The client should perform spell-checking on the given word diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc index 1502a3c..e64cc20 100644 --- a/webkit/glue/editor_client_impl.cc +++ b/webkit/glue/editor_client_impl.cc @@ -24,7 +24,6 @@ #undef LOG #include "webkit/api/public/WebEditingAction.h" -#include "webkit/api/public/WebEditingClient.h" #include "webkit/api/public/WebKit.h" #include "webkit/api/public/WebNode.h" #include "webkit/api/public/WebRange.h" @@ -38,7 +37,6 @@ #include "webkit/glue/webview_impl.h" using WebKit::WebEditingAction; -using WebKit::WebEditingClient; using WebKit::WebString; using WebKit::WebTextAffinity; using webkit_glue::AutofillForm; @@ -53,10 +51,8 @@ static const size_t kMaximumUndoStackDepth = 1000; // (so to avoid sending long strings through IPC). static const size_t kMaximumTextSizeForAutofill = 1000; -EditorClientImpl::EditorClientImpl(WebViewImpl* web_view, - WebEditingClient* editing_client) - : web_view_(web_view), - editing_client_(editing_client), +EditorClientImpl::EditorClientImpl(WebViewImpl* webview) + : webview_(webview), in_redo_(false), backspace_or_delete_pressed_(false), spell_check_this_field_status_(SPELLCHECK_AUTOMATIC), @@ -68,9 +64,7 @@ EditorClientImpl::~EditorClientImpl() { } void EditorClientImpl::pageDestroyed() { - // Our lifetime is bound to the WebViewImpl. This is our signal that we - // should no longer notify the consumer. - editing_client_ = NULL; + // Our lifetime is bound to the WebViewImpl. } bool EditorClientImpl::shouldShowDeleteInterface(WebCore::HTMLElement* elem) { @@ -82,14 +76,14 @@ bool EditorClientImpl::shouldShowDeleteInterface(WebCore::HTMLElement* elem) { } bool EditorClientImpl::smartInsertDeleteEnabled() { - if (editing_client_) - return editing_client_->isSmartInsertDeleteEnabled(); + if (webview_->client()) + return webview_->client()->isSmartInsertDeleteEnabled(); return true; } bool EditorClientImpl::isSelectTrailingWhitespaceEnabled() { - if (editing_client_) - return editing_client_->isSelectTrailingWhitespaceEnabled(); + if (webview_->client()) + return webview_->client()->isSelectTrailingWhitespaceEnabled(); #if defined(OS_WIN) return true; @@ -101,7 +95,7 @@ bool EditorClientImpl::isSelectTrailingWhitespaceEnabled() { bool EditorClientImpl::ShouldSpellcheckByDefault() { // Spellcheck should be enabled for all editable areas (such as textareas, // contentEditable regions, and designMode docs), except text inputs. - const WebCore::Frame* frame = web_view_->GetFocusedWebCoreFrame(); + const WebCore::Frame* frame = webview_->GetFocusedWebCoreFrame(); if (!frame) return false; const WebCore::Editor* editor = frame->editor(); @@ -161,16 +155,16 @@ bool EditorClientImpl::isEditable() { } bool EditorClientImpl::shouldBeginEditing(WebCore::Range* range) { - if (editing_client_) { - return editing_client_->shouldBeginEditing( + if (webview_->client()) { + return webview_->client()->shouldBeginEditing( webkit_glue::RangeToWebRange(range)); } return true; } bool EditorClientImpl::shouldEndEditing(WebCore::Range* range) { - if (editing_client_) { - return editing_client_->shouldEndEditing( + if (webview_->client()) { + return webview_->client()->shouldEndEditing( webkit_glue::RangeToWebRange(range)); } return true; @@ -179,8 +173,8 @@ bool EditorClientImpl::shouldEndEditing(WebCore::Range* range) { bool EditorClientImpl::shouldInsertNode(WebCore::Node* node, WebCore::Range* range, WebCore::EditorInsertAction action) { - if (editing_client_) { - return editing_client_->shouldInsertNode( + if (webview_->client()) { + return webview_->client()->shouldInsertNode( webkit_glue::NodeToWebNode(node), webkit_glue::RangeToWebRange(range), static_cast<WebEditingAction>(action)); @@ -191,8 +185,8 @@ bool EditorClientImpl::shouldInsertNode(WebCore::Node* node, bool EditorClientImpl::shouldInsertText(const WebCore::String& text, WebCore::Range* range, WebCore::EditorInsertAction action) { - if (editing_client_) { - return editing_client_->shouldInsertText( + if (webview_->client()) { + return webview_->client()->shouldInsertText( webkit_glue::StringToWebString(text), webkit_glue::RangeToWebRange(range), static_cast<WebEditingAction>(action)); @@ -202,8 +196,8 @@ bool EditorClientImpl::shouldInsertText(const WebCore::String& text, bool EditorClientImpl::shouldDeleteRange(WebCore::Range* range) { - if (editing_client_) { - return editing_client_->shouldDeleteRange( + if (webview_->client()) { + return webview_->client()->shouldDeleteRange( webkit_glue::RangeToWebRange(range)); } return true; @@ -213,8 +207,8 @@ bool EditorClientImpl::shouldChangeSelectedRange(WebCore::Range* from_range, WebCore::Range* to_range, WebCore::EAffinity affinity, bool still_selecting) { - if (editing_client_) { - return editing_client_->shouldChangeSelectedRange( + if (webview_->client()) { + return webview_->client()->shouldChangeSelectedRange( webkit_glue::RangeToWebRange(from_range), webkit_glue::RangeToWebRange(to_range), static_cast<WebTextAffinity>(affinity), @@ -225,9 +219,9 @@ bool EditorClientImpl::shouldChangeSelectedRange(WebCore::Range* from_range, bool EditorClientImpl::shouldApplyStyle(WebCore::CSSStyleDeclaration* style, WebCore::Range* range) { - if (editing_client_) { + if (webview_->client()) { // TODO(darin): Pass a reference to the CSSStyleDeclaration somehow. - return editing_client_->shouldApplyStyle( + return webview_->client()->shouldApplyStyle( WebString(), webkit_glue::RangeToWebRange(range)); } @@ -241,26 +235,26 @@ bool EditorClientImpl::shouldMoveRangeAfterDelete( } void EditorClientImpl::didBeginEditing() { - if (editing_client_) - editing_client_->didBeginEditing(); + if (webview_->client()) + webview_->client()->didBeginEditing(); } void EditorClientImpl::respondToChangedSelection() { - if (editing_client_) { - WebCore::Frame* frame = web_view_->GetFocusedWebCoreFrame(); + if (webview_->client()) { + WebCore::Frame* frame = webview_->GetFocusedWebCoreFrame(); if (frame) - editing_client_->didChangeSelection(!frame->selection()->isRange()); + webview_->client()->didChangeSelection(!frame->selection()->isRange()); } } void EditorClientImpl::respondToChangedContents() { - if (editing_client_) - editing_client_->didChangeContents(); + if (webview_->client()) + webview_->client()->didChangeContents(); } void EditorClientImpl::didEndEditing() { - if (editing_client_) - editing_client_->didEndEditing(); + if (webview_->client()) + webview_->client()->didEndEditing(); } void EditorClientImpl::didWriteSelectionToPasteboard() { @@ -564,8 +558,8 @@ bool EditorClientImpl::handleEditingKeyboardEvent( if (command.isTextInsertion() || command_name.isEmpty()) return false; if (command.execute(evt)) { - if (editing_client_) { - editing_client_->didExecuteCommand( + if (webview_->client()) { + webview_->client()->didExecuteCommand( webkit_glue::StringToWebString(command_name)); } return true; @@ -574,8 +568,8 @@ bool EditorClientImpl::handleEditingKeyboardEvent( } if (command.execute(evt)) { - if (editing_client_) { - editing_client_->didExecuteCommand( + if (webview_->client()) { + webview_->client()->didExecuteCommand( webkit_glue::StringToWebString(command_name)); } return true; @@ -639,7 +633,7 @@ void EditorClientImpl::handleKeyboardEvent(WebCore::KeyboardEvent* evt) { // Calls WebViewDelegate's HandleCurrentKeyboardEvent() first to give it a // chance to handle the keyboard event. Bypass handleEditingKeyboardEvent(), // if WebViewDelegate handles the event. - WebViewDelegate* d = web_view_->delegate(); + WebViewDelegate* d = webview_->delegate(); if ((d && d->HandleCurrentKeyboardEvent()) || handleEditingKeyboardEvent(evt)) evt->setDefaultHandled(); } @@ -660,9 +654,9 @@ void EditorClientImpl::textFieldDidEndEditing(WebCore::Element* element) { autofill_timer_.stop(); // Hide any showing popup. - web_view_->HideAutoCompletePopup(); + webview_->HideAutoCompletePopup(); - if (!editing_client_) + if (!webview_->client()) return; // The page is getting closed, don't fill the password. // Notify any password-listener of the focus change. @@ -752,7 +746,7 @@ void EditorClientImpl::DoAutofill(WebCore::Timer<EditorClientImpl>* timer) { true; // When |require_caret_at_end| is false, just pretend we are at // the end. if ((!args->autofill_on_empty_value && value.empty()) || !is_caret_at_end) { - web_view_->HideAutoCompletePopup(); + webview_->HideAutoCompletePopup(); return; } @@ -776,8 +770,8 @@ void EditorClientImpl::DoAutofill(WebCore::Timer<EditorClientImpl>* timer) { std::wstring name = AutofillForm::GetNameForInputElement(input_element); ASSERT(static_cast<int>(name.length()) > 0); - if (web_view_->delegate()) - web_view_->delegate()->QueryFormFieldAutofill(name, value, + if (webview_->delegate()) + webview_->delegate()->QueryFormFieldAutofill(name, value, reinterpret_cast<int64>(input_element)); } @@ -836,7 +830,7 @@ void EditorClientImpl::checkSpellingOfString(const UChar* str, int length, // caller expects if the word is spelled correctly. int spell_location = -1; int spell_length = 0; - WebViewDelegate* d = web_view_->delegate(); + WebViewDelegate* d = webview_->delegate(); // Check to see if the provided str is spelled correctly. if (isContinuousSpellCheckingEnabled() && d) { @@ -858,7 +852,7 @@ void EditorClientImpl::checkSpellingOfString(const UChar* str, int length, WebCore::String EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord( const WebCore::String& misspelledWord) { - WebViewDelegate* d = web_view_->delegate(); + WebViewDelegate* d = webview_->delegate(); if (!(isContinuousSpellCheckingEnabled() && d)) return WebCore::String(); @@ -894,25 +888,25 @@ void EditorClientImpl::updateSpellingUIWithGrammarString(const WebCore::String&, void EditorClientImpl::updateSpellingUIWithMisspelledWord( const WebCore::String& misspelled_word) { std::wstring word = webkit_glue::StringToStdWString(misspelled_word); - WebViewDelegate* d = web_view_->delegate(); + WebViewDelegate* d = webview_->delegate(); if (d) { d->UpdateSpellingUIWithMisspelledWord(word); } } void EditorClientImpl::showSpellingUI(bool show) { - WebViewDelegate* d = web_view_->delegate(); + WebViewDelegate* d = webview_->delegate(); if (d) { d->ShowSpellingUI(show); } } bool EditorClientImpl::spellingUIIsShowing() { - // SpellingPanel visibility is stored in the web_view_ every time a toggle + // SpellingPanel visibility is stored in the webview_ every time a toggle // message is sent from the browser. If we were to send a message to the // browser and ask for the visibility, then we run into problems accessing // cocoa methods on the UI thread. - return web_view_->GetSpellingPanelVisibility(); + return webview_->GetSpellingPanelVisibility(); } void EditorClientImpl::getGuessesForWord(const WebCore::String&, @@ -921,6 +915,6 @@ void EditorClientImpl::getGuessesForWord(const WebCore::String&, } void EditorClientImpl::setInputMethodState(bool enabled) { - if (editing_client_) - editing_client_->setInputMethodEnabled(enabled); + if (webview_->client()) + webview_->client()->setInputMethodEnabled(enabled); } diff --git a/webkit/glue/editor_client_impl.h b/webkit/glue/editor_client_impl.h index c2712a9..9d93711 100644 --- a/webkit/glue/editor_client_impl.h +++ b/webkit/glue/editor_client_impl.h @@ -16,16 +16,12 @@ class HTMLInputElement; class Node; class PlatformKeyboardEvent; } -namespace WebKit { -class WebEditingClient; -} class WebViewImpl; class EditorClientImpl : public WebCore::EditorClient { public: - EditorClientImpl(WebViewImpl* web_view, - WebKit::WebEditingClient* editing_client); + EditorClientImpl(WebViewImpl* webview); virtual ~EditorClientImpl(); virtual void pageDestroyed(); @@ -156,8 +152,7 @@ class EditorClientImpl : public WebCore::EditorClient { // for text fields and create a flag to over-write the default behavior. bool ShouldSpellcheckByDefault(); - WebViewImpl* web_view_; - WebKit::WebEditingClient* editing_client_; + WebViewImpl* webview_; bool in_redo_; typedef Deque< RefPtr<WebCore::EditCommand> > EditCommandStack; diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h index 7968aa4..53ab714 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -14,7 +14,6 @@ namespace WebKit { class WebDragData; -class WebEditingClient; class WebFrameClient; class WebFrame; class WebSettings; @@ -55,8 +54,7 @@ class WebView : public WebKit::WebWidget { // to call InitializeMainFrame to finish the initialization. You may pass // NULL for the editing_client parameter if you are not interested in those // notifications. - static WebView* Create( - WebViewDelegate* delegate, WebKit::WebEditingClient* editing_client); + static WebView* Create(WebViewDelegate* delegate); // After creating a WebView, you should immediately call this function. You // can optionally modify the settings (via GetSettings()) in between. The diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 5bb7b72..278b115 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -99,7 +99,6 @@ using WebKit::WebDragOperation; using WebKit::WebDragOperationCopy; using WebKit::WebDragOperationNone; using WebKit::WebDragOperationsMask; -using WebKit::WebEditingClient; using WebKit::WebFrame; using WebKit::WebFrameClient; using WebKit::WebInputEvent; @@ -333,9 +332,8 @@ static const WebCore::PopupContainerSettings kAutocompletePopupSettings = { // WebView ---------------------------------------------------------------- /*static*/ -WebView* WebView::Create(WebViewDelegate* delegate, - WebEditingClient* editing_client) { - WebViewImpl* instance = new WebViewImpl(delegate, editing_client); +WebView* WebView::Create(WebViewDelegate* delegate) { + WebViewImpl* instance = new WebViewImpl(delegate); instance->AddRef(); return instance; } @@ -373,14 +371,13 @@ void WebView::ResetVisitedLinkState() { } -WebViewImpl::WebViewImpl(WebViewDelegate* delegate, - WebEditingClient* editing_client) +WebViewImpl::WebViewImpl(WebViewDelegate* delegate) : delegate_(delegate), ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)), ALLOW_THIS_IN_INITIALIZER_LIST(chrome_client_impl_(this)), ALLOW_THIS_IN_INITIALIZER_LIST(context_menu_client_impl_(this)), ALLOW_THIS_IN_INITIALIZER_LIST(drag_client_impl_(this)), - ALLOW_THIS_IN_INITIALIZER_LIST(editor_client_impl_(this, editing_client)), + ALLOW_THIS_IN_INITIALIZER_LIST(editor_client_impl_(this)), ALLOW_THIS_IN_INITIALIZER_LIST(inspector_client_impl_(this)), observed_new_navigation_(false), #ifndef NDEBUG diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h index cc947e9..5687590 100644 --- a/webkit/glue/webview_impl.h +++ b/webkit/glue/webview_impl.h @@ -42,7 +42,6 @@ class Widget; } namespace WebKit { -class WebEditingClient; class WebKeyboardEvent; class WebMouseEvent; class WebMouseWheelEvent; @@ -264,8 +263,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> { void OnImageFetchComplete(webkit_glue::ImageResourceFetcher* fetcher, const SkBitmap& bitmap); - WebViewImpl( - WebViewDelegate* delegate, WebKit::WebEditingClient* editing_client); + WebViewImpl(WebViewDelegate* delegate); ~WebViewImpl(); void ModifySelection(uint32 message, diff --git a/webkit/glue/webworker_impl.cc b/webkit/glue/webworker_impl.cc index b5a7861..f306c91 100644 --- a/webkit/glue/webworker_impl.cc +++ b/webkit/glue/webworker_impl.cc @@ -137,7 +137,7 @@ void WebWorkerImpl::startWorkerContext(const WebURL& script_url, // loading requests from the worker context to the rest of WebKit and Chromium // infrastructure. DCHECK(!web_view_); - web_view_ = WebView::Create(NULL, NULL); + web_view_ = WebView::Create(NULL); WebPreferences().Apply(web_view_); web_view_->InitializeMainFrame(WorkerWebFrameClient::GetSharedInstance()); diff --git a/webkit/tools/test_shell/keyboard_unittest.cc b/webkit/tools/test_shell/keyboard_unittest.cc index 85e6ff6..3ced54e 100644 --- a/webkit/tools/test_shell/keyboard_unittest.cc +++ b/webkit/tools/test_shell/keyboard_unittest.cc @@ -39,7 +39,7 @@ class KeyboardTest : public testing::Test { const char* InterpretKeyEvent( const WebKeyboardEvent& keyboard_event, PlatformKeyboardEvent::Type key_type) { - EditorClientImpl editor_impl(NULL, NULL); + EditorClientImpl editor_impl(NULL); PlatformKeyboardEventBuilder evt(keyboard_event); evt.setKeyType(key_type); diff --git a/webkit/tools/test_shell/mac/webview_host.mm b/webkit/tools/test_shell/mac/webview_host.mm index 846fdfe..b27a603 100644 --- a/webkit/tools/test_shell/mac/webview_host.mm +++ b/webkit/tools/test_shell/mac/webview_host.mm @@ -35,7 +35,7 @@ WebViewHost* WebViewHost::Create(NSView* parent_view, [parent_view addSubview:host->view_]; [host->view_ release]; - host->webwidget_ = WebView::Create(delegate, delegate); + host->webwidget_ = WebView::Create(delegate); prefs.Apply(host->webview()); host->webview()->InitializeMainFrame(delegate); host->webwidget_->resize(WebSize(content_rect.size.width, diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index e8346dc..043d62f 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -327,13 +327,119 @@ void TestWebViewDelegate::didAddMessageToConsole( } } -void TestWebViewDelegate::printPage(WebFrame* frame) { +// The output from these methods in layout test mode should match that +// expected by the layout tests. See EditingDelegate.m in DumpRenderTree. + +bool TestWebViewDelegate::shouldBeginEditing(const WebRange& range) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", + GetRangeDescription(range).c_str()); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::shouldEndEditing(const WebRange& range) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", + GetRangeDescription(range).c_str()); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::shouldInsertNode(const WebNode& node, + const WebRange& range, + WebEditingAction action) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldInsertNode:%s " + "replacingDOMRange:%s givenAction:%s\n", + GetNodeDescription(node, 0).c_str(), + GetRangeDescription(range).c_str(), + GetEditingActionDescription(action).c_str()); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::shouldInsertText(const WebString& text, + const WebRange& range, + WebEditingAction action) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldInsertText:%s " + "replacingDOMRange:%s givenAction:%s\n", + text.utf8().data(), + GetRangeDescription(range).c_str(), + GetEditingActionDescription(action).c_str()); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::shouldChangeSelectedRange(const WebRange& from_range, + const WebRange& to_range, + WebTextAffinity affinity, + bool still_selecting) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s " + "toDOMRange:%s affinity:%s stillSelecting:%s\n", + GetRangeDescription(from_range).c_str(), + GetRangeDescription(to_range).c_str(), + GetTextAffinityDescription(affinity).c_str(), + (still_selecting ? "TRUE" : "FALSE")); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::shouldDeleteRange(const WebRange& range) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", + GetRangeDescription(range).c_str()); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::shouldApplyStyle(const WebString& style, + const WebRange& range) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n", + style.utf8().data(), + GetRangeDescription(range).c_str()); + } + return shell_->AcceptsEditing(); +} + +bool TestWebViewDelegate::isSmartInsertDeleteEnabled() { + return smart_insert_delete_enabled_; +} + +bool TestWebViewDelegate::isSelectTrailingWhitespaceEnabled() { + return select_trailing_whitespace_enabled_; } -void TestWebViewDelegate::didStartLoading() { +void TestWebViewDelegate::didBeginEditing() { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: " + "webViewDidBeginEditing:WebViewDidBeginEditingNotification\n"); + } } -void TestWebViewDelegate::didStopLoading() { +void TestWebViewDelegate::didChangeSelection(bool is_empty_selection) { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: " + "webViewDidChangeSelection:WebViewDidChangeSelectionNotification\n"); + } + UpdateSelectionClipboard(is_empty_selection); +} + +void TestWebViewDelegate::didChangeContents() { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: " + "webViewDidChange:WebViewDidChangeNotification\n"); + } +} + +void TestWebViewDelegate::didEndEditing() { + if (shell_->ShouldDumpEditingCallbacks()) { + printf("EDITING DELEGATE: " + "webViewDidEndEditing:WebViewDidEndEditingNotification\n"); + } } void TestWebViewDelegate::runModalAlertDialog( @@ -381,13 +487,6 @@ void TestWebViewDelegate::setStatusText(const WebString& text) { } } -void TestWebViewDelegate::setMouseOverURL(const WebURL& url) { -} - -void TestWebViewDelegate::setToolTipText( - const WebString& text, WebTextDirection hint) { -} - void TestWebViewDelegate::startDragging( const WebPoint& mouse_coords, const WebDragData& data, WebDragOperationsMask mask) { @@ -416,12 +515,6 @@ void TestWebViewDelegate::startDragging( shell_->webView()->DragSourceSystemDragEnded(); } -void TestWebViewDelegate::focusNext() { -} - -void TestWebViewDelegate::focusPrevious() { -} - void TestWebViewDelegate::navigateBackForwardSoon(int offset) { shell_->navigation_controller()->GoToOffset(offset); } @@ -438,9 +531,6 @@ int TestWebViewDelegate::historyForwardListCount() { return shell_->navigation_controller()->GetEntryCount() - current_index - 1; } -void TestWebViewDelegate::didAddHistoryItem() { -} - // WebWidgetClient ----------------------------------------------------------- void TestWebViewDelegate::didInvalidateRect(const WebRect& rect) { @@ -471,122 +561,6 @@ WebScreenInfo TestWebViewDelegate::screenInfo() { return WebScreenInfo(); } -// WebEditingClient ---------------------------------------------------------- -// The output from these methods in layout test mode should match that -// expected by the layout tests. See EditingDelegate.m in DumpRenderTree. - -bool TestWebViewDelegate::shouldBeginEditing(const WebRange& range) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", - GetRangeDescription(range).c_str()); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::shouldEndEditing(const WebRange& range) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", - GetRangeDescription(range).c_str()); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::shouldInsertNode(const WebNode& node, - const WebRange& range, - WebEditingAction action) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldInsertNode:%s " - "replacingDOMRange:%s givenAction:%s\n", - GetNodeDescription(node, 0).c_str(), - GetRangeDescription(range).c_str(), - GetEditingActionDescription(action).c_str()); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::shouldInsertText(const WebString& text, - const WebRange& range, - WebEditingAction action) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldInsertText:%s " - "replacingDOMRange:%s givenAction:%s\n", - text.utf8().data(), - GetRangeDescription(range).c_str(), - GetEditingActionDescription(action).c_str()); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::shouldChangeSelectedRange(const WebRange& from_range, - const WebRange& to_range, - WebTextAffinity affinity, - bool still_selecting) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s " - "toDOMRange:%s affinity:%s stillSelecting:%s\n", - GetRangeDescription(from_range).c_str(), - GetRangeDescription(to_range).c_str(), - GetTextAffinityDescription(affinity).c_str(), - (still_selecting ? "TRUE" : "FALSE")); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::shouldDeleteRange(const WebRange& range) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", - GetRangeDescription(range).c_str()); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::shouldApplyStyle(const WebString& style, - const WebRange& range) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n", - style.utf8().data(), - GetRangeDescription(range).c_str()); - } - return shell_->AcceptsEditing(); -} - -bool TestWebViewDelegate::isSmartInsertDeleteEnabled() { - return smart_insert_delete_enabled_; -} - -bool TestWebViewDelegate::isSelectTrailingWhitespaceEnabled() { - return select_trailing_whitespace_enabled_; -} - -void TestWebViewDelegate::didBeginEditing() { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: " - "webViewDidBeginEditing:WebViewDidBeginEditingNotification\n"); - } -} - -void TestWebViewDelegate::didChangeSelection(bool is_empty_selection) { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: " - "webViewDidChangeSelection:WebViewDidChangeSelectionNotification\n"); - } - UpdateSelectionClipboard(is_empty_selection); -} - -void TestWebViewDelegate::didChangeContents() { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: " - "webViewDidChange:WebViewDidChangeNotification\n"); - } -} - -void TestWebViewDelegate::didEndEditing() { - if (shell_->ShouldDumpEditingCallbacks()) { - printf("EDITING DELEGATE: " - "webViewDidEndEditing:WebViewDidEndEditingNotification\n"); - } -} - // WebFrameClient ------------------------------------------------------------ WebPlugin* TestWebViewDelegate::createPlugin( @@ -624,9 +598,6 @@ WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( return new webkit_glue::WebMediaPlayerImpl(client, factory); } -void TestWebViewDelegate::willClose(WebFrame* frame) { -} - void TestWebViewDelegate::loadURLExternally( WebFrame* frame, const WebURLRequest& request, WebNavigationPolicy policy) { @@ -658,10 +629,6 @@ WebNavigationPolicy TestWebViewDelegate::decidePolicyForNavigation( return result; } -void TestWebViewDelegate::willSubmitForm(WebFrame* frame, const WebForm&) { - // Ignore -} - void TestWebViewDelegate::willPerformClientRedirect( WebFrame* frame, const WebURL& from, const WebURL& to, double interval, double fire_time) { @@ -679,10 +646,6 @@ void TestWebViewDelegate::didCancelClientRedirect(WebFrame* frame) { } } -void TestWebViewDelegate::didCompleteClientRedirect( - WebFrame* frame, const WebURL& from) { -} - void TestWebViewDelegate::didCreateDataSource( WebFrame* frame, WebDataSource* ds) { ds->setExtraData(pending_extra_data_.release()); @@ -751,12 +714,6 @@ void TestWebViewDelegate::didFailProvisionalLoad( error_text, GURL("testshell-error:"), error.unreachableURL, replace); } -void TestWebViewDelegate::didReceiveDocumentData( - WebFrame* frame, const char* data, size_t length, - bool& preventDefault) { - // Ignore -} - void TestWebViewDelegate::didCommitProvisionalLoad( WebFrame* frame, bool is_new_navigation) { if (shell_->ShouldDumpFrameLoadCallbacks()) { @@ -770,10 +727,6 @@ void TestWebViewDelegate::didClearWindowObject(WebFrame* frame) { shell_->BindJSObjectsToWindow(frame); } -void TestWebViewDelegate::didCreateDocumentElement(WebFrame* frame) { - // Ignore -} - void TestWebViewDelegate::didReceiveTitle( WebFrame* frame, const WebString& title) { std::wstring wtitle = UTF16ToWideHack(title); @@ -920,11 +873,6 @@ void TestWebViewDelegate::didFailResourceLoad( resource_identifier_map_.erase(identifier); } -void TestWebViewDelegate::didLoadResourceFromMemoryCache( - WebFrame* frame, const WebURLRequest&, - const WebURLResponse&) { -} - void TestWebViewDelegate::didDisplayInsecureContent(WebFrame* frame) { if (shell_->ShouldDumpFrameLoadCallbacks()) printf("didDisplayInsecureContent\n"); @@ -936,14 +884,6 @@ void TestWebViewDelegate::didRunInsecureContent( printf("didRunInsecureContent\n"); } -void TestWebViewDelegate::didExhaustMemoryAvailableForScript(WebFrame* frame) { -} - -void TestWebViewDelegate::didChangeContentsSize( - WebFrame* frame, const WebSize&) { -} - - // Public methods ------------------------------------------------------------ TestWebViewDelegate::TestWebViewDelegate(TestShell* shell) diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 35c6ad9..ee2bc71 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -24,7 +24,6 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/weak_ptr.h" -#include "webkit/api/public/WebEditingClient.h" #include "webkit/api/public/WebFrameClient.h" #if defined(OS_MACOSX) #include "webkit/api/public/WebRect.h" @@ -46,7 +45,6 @@ class TestShell; class WebWidgetHost; class TestWebViewDelegate : public WebViewDelegate, - public WebKit::WebEditingClient, public WebKit::WebFrameClient, public webkit_glue::WebPluginPageDelegate, public base::SupportsWeakPtr<TestWebViewDelegate> { @@ -91,9 +89,31 @@ class TestWebViewDelegate : public WebViewDelegate, virtual void didAddMessageToConsole( const WebKit::WebConsoleMessage& message, const WebKit::WebString& source_name, unsigned source_line); - virtual void printPage(WebKit::WebFrame* frame); - virtual void didStartLoading(); - virtual void didStopLoading(); + virtual void printPage(WebKit::WebFrame* frame) {} + virtual void didStartLoading() {} + virtual void didStopLoading() {} + virtual bool shouldBeginEditing(const WebKit::WebRange& range); + virtual bool shouldEndEditing(const WebKit::WebRange& range); + virtual bool shouldInsertNode( + const WebKit::WebNode& node, const WebKit::WebRange& range, + WebKit::WebEditingAction action); + virtual bool shouldInsertText( + const WebKit::WebString& text, const WebKit::WebRange& range, + WebKit::WebEditingAction action); + virtual bool shouldChangeSelectedRange( + const WebKit::WebRange& from, const WebKit::WebRange& to, + WebKit::WebTextAffinity affinity, bool still_selecting); + virtual bool shouldDeleteRange(const WebKit::WebRange& range); + virtual bool shouldApplyStyle( + const WebKit::WebString& style, const WebKit::WebRange& range); + virtual bool isSmartInsertDeleteEnabled(); + virtual bool isSelectTrailingWhitespaceEnabled(); + virtual void setInputMethodEnabled(bool enabled) {} + virtual void didBeginEditing(); + virtual void didChangeSelection(bool is_selection_empty); + virtual void didChangeContents(); + virtual void didExecuteCommand(const WebKit::WebString& command_name) {} + virtual void didEndEditing(); virtual void runModalAlertDialog( WebKit::WebFrame* frame, const WebKit::WebString& message); virtual bool runModalConfirmDialog( @@ -104,18 +124,18 @@ class TestWebViewDelegate : public WebViewDelegate, virtual bool runModalBeforeUnloadDialog( WebKit::WebFrame* frame, const WebKit::WebString& message); virtual void setStatusText(const WebKit::WebString& text); - virtual void setMouseOverURL(const WebKit::WebURL& url); + virtual void setMouseOverURL(const WebKit::WebURL& url) {} virtual void setToolTipText( - const WebKit::WebString& text, WebKit::WebTextDirection hint); + const WebKit::WebString& text, WebKit::WebTextDirection hint) {} virtual void startDragging( const WebKit::WebPoint& from, const WebKit::WebDragData& data, WebKit::WebDragOperationsMask mask); - virtual void focusNext(); - virtual void focusPrevious(); + virtual void focusNext() {} + virtual void focusPrevious() {} virtual void navigateBackForwardSoon(int offset); virtual int historyBackListCount(); virtual int historyForwardListCount(); - virtual void didAddHistoryItem(); + virtual void didAddHistoryItem() {} // WebKit::WebWidgetClient virtual void didInvalidateRect(const WebKit::WebRect& rect); @@ -133,30 +153,6 @@ class TestWebViewDelegate : public WebViewDelegate, virtual WebKit::WebRect windowResizerRect(); virtual WebKit::WebScreenInfo screenInfo(); - // WebKit::WebEditingClient - virtual bool shouldBeginEditing(const WebKit::WebRange& range); - virtual bool shouldEndEditing(const WebKit::WebRange& range); - virtual bool shouldInsertNode( - const WebKit::WebNode& node, const WebKit::WebRange& range, - WebKit::WebEditingAction action); - virtual bool shouldInsertText( - const WebKit::WebString& text, const WebKit::WebRange& range, - WebKit::WebEditingAction action); - virtual bool shouldChangeSelectedRange( - const WebKit::WebRange& from, const WebKit::WebRange& to, - WebKit::WebTextAffinity affinity, bool still_selecting); - virtual bool shouldDeleteRange(const WebKit::WebRange& range); - virtual bool shouldApplyStyle( - const WebKit::WebString& style, const WebKit::WebRange& range); - virtual bool isSmartInsertDeleteEnabled(); - virtual bool isSelectTrailingWhitespaceEnabled(); - virtual void setInputMethodEnabled(bool enabled) {} - virtual void didBeginEditing(); - virtual void didChangeSelection(bool is_selection_empty); - virtual void didChangeContents(); - virtual void didExecuteCommand(const WebKit::WebString& command_name) {} - virtual void didEndEditing(); - // WebKit::WebFrameClient virtual WebKit::WebPlugin* createPlugin( WebKit::WebFrame*, const WebKit::WebPluginParams&); @@ -164,7 +160,7 @@ class TestWebViewDelegate : public WebViewDelegate, WebKit::WebFrame*, WebKit::WebWorkerClient*); virtual WebKit::WebMediaPlayer* createMediaPlayer( WebKit::WebFrame*, WebKit::WebMediaPlayerClient*); - virtual void willClose(WebKit::WebFrame*); + virtual void willClose(WebKit::WebFrame*) {} virtual void loadURLExternally( WebKit::WebFrame*, const WebKit::WebURLRequest&, WebKit::WebNavigationPolicy); @@ -172,13 +168,13 @@ class TestWebViewDelegate : public WebViewDelegate, WebKit::WebFrame*, const WebKit::WebURLRequest&, WebKit::WebNavigationType, WebKit::WebNavigationPolicy default_policy, bool isRedirect); - virtual void willSubmitForm(WebKit::WebFrame*, const WebKit::WebForm&); + virtual void willSubmitForm(WebKit::WebFrame*, const WebKit::WebForm&) {} virtual void willPerformClientRedirect( WebKit::WebFrame*, const WebKit::WebURL& from, const WebKit::WebURL& to, double interval, double fire_time); virtual void didCancelClientRedirect(WebKit::WebFrame*); virtual void didCompleteClientRedirect( - WebKit::WebFrame*, const WebKit::WebURL& from); + WebKit::WebFrame*, const WebKit::WebURL& from) {} virtual void didCreateDataSource( WebKit::WebFrame*, WebKit::WebDataSource*); virtual void didStartProvisionalLoad(WebKit::WebFrame*); @@ -187,11 +183,11 @@ class TestWebViewDelegate : public WebViewDelegate, WebKit::WebFrame*, const WebKit::WebURLError&); virtual void didReceiveDocumentData( WebKit::WebFrame*, const char* data, size_t length, - bool& preventDefault); + bool& preventDefault) {} virtual void didCommitProvisionalLoad( WebKit::WebFrame*, bool is_new_navigation); virtual void didClearWindowObject(WebKit::WebFrame*); - virtual void didCreateDocumentElement(WebKit::WebFrame*); + virtual void didCreateDocumentElement(WebKit::WebFrame*) {} virtual void didReceiveTitle( WebKit::WebFrame*, const WebKit::WebString& title); virtual void didFinishDocumentLoad(WebKit::WebFrame*); @@ -215,13 +211,13 @@ class TestWebViewDelegate : public WebViewDelegate, WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLError&); virtual void didLoadResourceFromMemoryCache( WebKit::WebFrame*, const WebKit::WebURLRequest&, - const WebKit::WebURLResponse&); + const WebKit::WebURLResponse&) {} virtual void didDisplayInsecureContent(WebKit::WebFrame* frame); virtual void didRunInsecureContent( WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin); - virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame*); + virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame*) {} virtual void didChangeContentsSize( - WebKit::WebFrame*, const WebKit::WebSize&); + WebKit::WebFrame*, const WebKit::WebSize&) {} // webkit_glue::WebPluginPageDelegate virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate( diff --git a/webkit/tools/test_shell/webview_host_gtk.cc b/webkit/tools/test_shell/webview_host_gtk.cc index 65335d0..21f982f 100644 --- a/webkit/tools/test_shell/webview_host_gtk.cc +++ b/webkit/tools/test_shell/webview_host_gtk.cc @@ -24,7 +24,7 @@ WebViewHost* WebViewHost::Create(GtkWidget* parent_view, host->view_ = WebWidgetHost::CreateWidget(parent_view, host); host->plugin_container_manager_.set_host_widget(host->view_); - host->webwidget_ = WebView::Create(delegate, delegate); + host->webwidget_ = WebView::Create(delegate); prefs.Apply(host->webview()); host->webview()->InitializeMainFrame(delegate); host->webwidget_->layout(); diff --git a/webkit/tools/test_shell/webview_host_win.cc b/webkit/tools/test_shell/webview_host_win.cc index 68af5f9..864f4d5 100644 --- a/webkit/tools/test_shell/webview_host_win.cc +++ b/webkit/tools/test_shell/webview_host_win.cc @@ -39,7 +39,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view, GetModuleHandle(NULL), NULL); win_util::SetWindowUserData(host->view_, host); - host->webwidget_ = WebView::Create(delegate, delegate); + host->webwidget_ = WebView::Create(delegate); prefs.Apply(host->webview()); host->webview()->InitializeMainFrame(delegate); diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 4432323..e085f5a 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -62,7 +62,6 @@ 'api/public/WebDataSource.h', 'api/public/WebDragData.h', 'api/public/WebEditingAction.h', - 'api/public/WebEditingClient.h', 'api/public/WebFindOptions.h', 'api/public/WebFrame.h', 'api/public/WebFrameClient.h', |