diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 02:23:25 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 02:23:25 +0000 |
commit | ca9608b447a4b42d74d1d8343cb98c0f7ff123f4 (patch) | |
tree | 9a935384cfcbdefd757ca47f0c2c65d6a2328374 /webkit/glue | |
parent | 1df3e154f06c18631f7819d8924da972d643835a (diff) | |
download | chromium_src-ca9608b447a4b42d74d1d8343cb98c0f7ff123f4.zip chromium_src-ca9608b447a4b42d74d1d8343cb98c0f7ff123f4.tar.gz chromium_src-ca9608b447a4b42d74d1d8343cb98c0f7ff123f4.tar.bz2 |
WebKit merge 40474:40500 [chromium-side].
Review URL: http://codereview.chromium.org/21029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webframeloaderclient_impl.cc | 20 | ||||
-rw-r--r-- | webkit/glue/webframeloaderclient_impl.h | 12 | ||||
-rw-r--r-- | webkit/glue/webplugin_impl.cc | 13 | ||||
-rw-r--r-- | webkit/glue/webplugin_impl.h | 10 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 12 |
5 files changed, 35 insertions, 32 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc index 3363485..4c1d044 100644 --- a/webkit/glue/webframeloaderclient_impl.cc +++ b/webkit/glue/webframeloaderclient_impl.cc @@ -13,8 +13,8 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "CString.h" #include "Document.h" #include "DocumentLoader.h" -#include "Element.h" #include "HistoryItem.h" +#include "HTMLAppletElement.h" #include "HTMLFormElement.h" // needed by FormState.h #include "HTMLFormControlElement.h" #include "HTMLInputElement.h" @@ -1340,10 +1340,11 @@ static void DeleteToArray(char** arr) { } Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, // TODO(erikkay): how do we use this? - Element *element, const KURL &url, - const Vector<String> ¶m_names, - const Vector<String> ¶m_values, - const String &mime_type, + HTMLPlugInElement* element, + const KURL&url, + const Vector<String>& param_names, + const Vector<String>& param_values, + const String& mime_type, bool load_manually) { WebViewImpl* webview = webframe_->webview_impl(); WebViewDelegate* d = webview->delegate(); @@ -1449,11 +1450,12 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) { Widget* WebFrameLoaderClient::createJavaAppletWidget( const IntSize& size, - Element *element, const KURL &url, - const Vector<String> ¶m_names, - const Vector<String> ¶m_values) { + HTMLAppletElement* element, + const KURL& url, + const Vector<String>& param_names, + const Vector<String>& param_values) { return createPlugin(size, element, url, param_names, param_values, - "application/x-java-applet", false); + "application/x-java-applet", false); } ObjectContentType WebFrameLoaderClient::objectContentType( diff --git a/webkit/glue/webframeloaderclient_impl.h b/webkit/glue/webframeloaderclient_impl.h index e743951..12e1959 100644 --- a/webkit/glue/webframeloaderclient_impl.h +++ b/webkit/glue/webframeloaderclient_impl.h @@ -168,7 +168,7 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { bool allowsScrolling, int marginWidth, int marginHeight); virtual WebCore::Widget* createPlugin(const WebCore::IntSize&, - WebCore::Element*, + WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WebCore::String>&, const WTF::Vector<WebCore::String>&, @@ -176,10 +176,12 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { bool loadManually); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); - virtual WebCore::Widget* createJavaAppletWidget(const WebCore::IntSize&, - WebCore::Element*, const WebCore::KURL& baseURL, - const WTF::Vector<WebCore::String>& paramNames, - const WTF::Vector<WebCore::String>& paramValues); + virtual WebCore::Widget* createJavaAppletWidget( + const WebCore::IntSize&, + WebCore::HTMLAppletElement*, + const WebCore::KURL& baseURL, + const WTF::Vector<WebCore::String>& paramNames, + const WTF::Vector<WebCore::String>& paramValues); virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType); diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc index 292ff9e..deb2ff9 100644 --- a/webkit/glue/webplugin_impl.cc +++ b/webkit/glue/webplugin_impl.cc @@ -11,7 +11,6 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "Cursor.h" #include "Document.h" #include "DocumentLoader.h" -#include "Element.h" #include "Event.h" #include "EventNames.h" #include "FloatPoint.h" @@ -279,8 +278,8 @@ WebCore::Widget* WebPluginImpl::Create(const GURL& url, char** argn, char** argv, int argc, - WebCore::Element *element, - WebFrameImpl *frame, + WebCore::HTMLPlugInElement* element, + WebFrameImpl* frame, WebPluginDelegate* delegate, bool load_manually, const std::string& mime_type) { @@ -300,7 +299,7 @@ WebCore::Widget* WebPluginImpl::Create(const GURL& url, return container; } -WebPluginImpl::WebPluginImpl(WebCore::Element* element, +WebPluginImpl::WebPluginImpl(WebCore::HTMLPlugInElement* element, WebFrameImpl* webframe, WebPluginDelegate* delegate, const GURL& plugin_url, @@ -538,11 +537,7 @@ NPObject* WebPluginImpl::GetWindowScriptNPObject() { } NPObject* WebPluginImpl::GetPluginElement() { - // We don't really know that this is a - // HTMLPluginElement. Cast to it and hope? - WebCore::HTMLPlugInElement *plugin_element = - static_cast<WebCore::HTMLPlugInElement*>(element_); - return plugin_element->getNPObject(); + return element_->getNPObject(); } void WebPluginImpl::SetCookie(const GURL& url, diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h index 58c633e..d2c9988 100644 --- a/webkit/glue/webplugin_impl.h +++ b/webkit/glue/webplugin_impl.h @@ -32,9 +32,9 @@ class WebPluginImpl; class MultipartResponseDelegate; namespace WebCore { - class Element; class Event; class Frame; + class HTMLPlugInElement; class IntRect; class KeyboardEvent; class KURL; @@ -124,7 +124,7 @@ class WebPluginImpl : public WebPlugin, char** argn, char** argv, int argc, - WebCore::Element* element, + WebCore::HTMLPlugInElement* element, WebFrameImpl* frame, WebPluginDelegate* delegate, bool load_manually, @@ -135,13 +135,13 @@ class WebPluginImpl : public WebPlugin, // Helper function for sorting post data. static bool SetPostData(WebCore::ResourceRequest* request, - const char *buf, + const char* buf, uint32 length); private: friend class WebPluginContainer; - WebPluginImpl(WebCore::Element *element, WebFrameImpl *frame, + WebPluginImpl(WebCore::HTMLPlugInElement* element, WebFrameImpl* frame, WebPluginDelegate* delegate, const GURL& plugin_url, bool load_manually, const std::string& mime_type, int arg_count, char** arg_names, char** arg_values); @@ -325,7 +325,7 @@ class WebPluginImpl : public WebPlugin, bool windowless_; gfx::NativeView window_; - WebCore::Element* element_; + WebCore::HTMLPlugInElement* element_; WebFrameImpl* webframe_; WebPluginDelegate* delegate_; diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 1dda5c1..b2a6a6d 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -252,6 +252,13 @@ class AutocompletePopupMenuClient WebViewImpl* webview_; }; +static const WebCore::PopupContainerSettings kAutocompletePopupSettings = { + false, // focusOnShow + false, // setTextOnIndexChange + false, // acceptOnAbandon + true, // loopSelectionNavigation +}; + // WebView ---------------------------------------------------------------- /*static*/ @@ -1504,10 +1511,7 @@ void WebViewImpl::AutofillSuggestionsForNode( // have focus so the user can keep typing when the popup is showing. autocomplete_popup_ = WebCore::PopupContainer::create(autocomplete_popup_client_.get(), - false); - autocomplete_popup_->setTextOnIndexChange(false); - autocomplete_popup_->setAcceptOnAbandon(false); - autocomplete_popup_->setLoopSelectionNavigation(true); + kAutocompletePopupSettings); autocomplete_popup_->show(focused_node->getRect(), page_->mainFrame()->view(), 0); } else { |