summaryrefslogtreecommitdiffstats
path: root/webkit/glue/glue_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Start using WebCursorInfo from the WebKit API. WebCursorInfo is adarin@google.com2009-07-081-0/+7
| | | | | | | | | | | | | | | | lightweight struct containing a description of a cursor that the embedder should render. WebCursor still exists. Instead of WebCursor initializing from a PlatformCursor, it now initializes from a WebCursorInfo. TEST=none BUG=10039 R=jam Review URL: http://codereview.chromium.org/155172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20194 0039d316-1c4b-4281-b951-d872f2087c98
* Add Reload and LoadData methods to WebFrame. LoadData replacesdarin@chromium.org2009-07-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LoadAlternateHTMLString, changing types to WebKit API types and allowing for more flexibility (supports loading non-HTML data). LoadHTMLString is modified to support some optional parameters. Note: Since WebFrame is going to soon be part of the WebKit API, it is OK style-wise for it to use optional parameters. This patch also includes a change to remove the securityInfo property from WebURLRequest. I did this so that I could eliminate the need to pass a WebURLRequest to LoadData / LoadHTMLString. This also fixes a TODO of mine to eliminate this field on WebCore::ResourceRequest since securityInfo (SSL cert info) is really more of a response property. It was only part of the request as a hack to support certain error pages. I work around that by leveraging NavigationState in chrome/renderer. I added some templatized, implicit constructors to WebData for convenience. I plan to make similar changes to WebCString and WebString in a future CL. This CL is a incremental step toward moving ResourceFetcher out of WebFrame. BUG=15648 TEST=none R=dglazkov Review URL: http://codereview.chromium.org/150146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19742 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up WebHistoryItem and push HistoryItem serialization out of WebFrame.darin@chromium.org2009-06-251-1/+15
| | | | | | | | | | | | | | | | WebHistoryItem is a copy-on-write wrapper for a WebCore::HistoryItem. Pushing history item serialization out of WebFrame allows us to avoid a dependency on base/pickle from WebFrame. This helps get us closer to being able to move WebFrame into the WebKit API. BUG=10043 TEST=none R=dglazkov,sky Review URL: http://codereview.chromium.org/146075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19275 0039d316-1c4b-4281-b951-d872f2087c98
* Delete files from webkit/glue that have been made obsolete by correspondingdarin@chromium.org2009-06-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files in webkit/api. Here's the mapping: webkit/glue/webdatasource.h -> webkit/api/public/WebDataSource.h webkit/glue/weberror.h -> webkit/api/public/WebURLError.h webkit/glue/weburlrequest.h -> webkit/api/public/WebURLRequest.h webkit/glue/webresponse.h -> webkit/api/public/WebURLResponse.h I kept the implementation of WebDataSource in webkit/glue for now because it helps to have it close to WebFrameImpl and WebFrameLoaderClient. To facilitate this change, I needed to make use of WrappedResourceRequest and WrappedResourceResponse from webkit/api/src within the implementation files of webkit/glue. This is only a temporary usage of webkit/api/src from the outside. It will go away when WebFrame, etc. get moved into webkit/api. I modified these wrapper classes to expose the 'bind' function so that I can re-bind a wrapper. This is used in WebDataSourceImpl::request() and related methods to allow the interface to return a const reference to a WebURLRequest and WebURLResponse. The changes here are fairly mechanical. I'm not too happy about the way WebDataSource::redirectChain now works. I would prefer a solution that didn't involve so much copying, but I'm not going to worry about optimizing that now. R=brettw BUG=10041 TEST=none Review URL: http://codereview.chromium.org/126286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18747 0039d316-1c4b-4281-b951-d872f2087c98
* Extract form related classes from the guts of WebFrameImpl.darin@chromium.org2009-06-151-0/+14
| | | | | | | | | | | | | | | | | | | Instead of having WebFrameImpl generate SearchableFormData, PasswordForm, and AutofillForm classes, allow the embedder (RenderView) to do so. This is done to help minimize the dependencies WebFrameImpl has on other code, which will make it easier to move WebFrame and WebDataSource into the WebKit API. Most significant change: Now, RenderView always sets a NavigationState on WebDataSource instances. We used to only do so for browser initiated navigations. This is done so that we can store things like SearchableFormData and friends on the NavigationState. To facilitate this change, it was necessary to add a way through the WebKit API to refer to a HTMLFormElement. This CL introduces WebForm, which is like a RefPtr<HTMLFormElement>, so you can just copy a WebForm around by value and the right thing happens. Some of the other changes are about moving more things into the webkit_glue namespace. On hindsight, I probably should have done that as a separate CL. BUG=10041 TEST=none R=brettw Review URL: http://codereview.chromium.org/126083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18395 0039d316-1c4b-4281-b951-d872f2087c98
* Start using WebURLLoader, et. al. from the WebKit API.darin@chromium.org2009-06-091-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Moves our ResourceHandle to webkit/api/src/ResourceHandle.cpp from webkit/glue/resource_handle_impl.cc. A portion of resource_handle_impl.cc was moved into weburlloader_impl.{h,cc}, which now contains our implementation of WebURLLoader. The annoying parts of this CL involve WebPluginImpl. I had to convert it over to using WebURLLoader instead of ResourceHandle so that MultipartResourceDelegate can be shared. There is some complexity in WebURLRequest / WebURLResponse to make it cheap to wrap a ResourceRequest / ResourceResponse. I think this is worth it since there is a lot of conversion between the two types. Originally reviewed here: http://codereview.chromium.org/113928 BUG=10038 TEST=covered by existing tests R=dglazkov Review URL: http://codereview.chromium.org/118438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17962 0039d316-1c4b-4281-b951-d872f2087c98
* Revert WebURLLoader landing. Too many layout test failures.darin@chromium.org2009-05-301-39/+3
| | | | | | | | TBR=dglazkov Review URL: http://codereview.chromium.org/115973 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17293 0039d316-1c4b-4281-b951-d872f2087c98
* Start using WebURLLoader, et. al. from the WebKit API.darin@chromium.org2009-05-301-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | Moves our ResourceHandle to webkit/api/src/ResourceHandle.cpp from webkit/glue/resource_handle_impl.cc. A portion of resource_handle_impl.cc was moved into weburlloader_impl.{h,cc}, which now contains our implementation of WebURLLoader. The annoying parts of this CL involve WebPluginImpl. I had to convert it over to using WebURLLoader instead of ResourceHandle so that MultipartResourceDelegate can be shared. There is some complexity in WebURLRequest / WebURLResponse to make it cheap to wrap a ResourceRequest / ResourceResponse. I think this is worth it since there is a lot of conversion between the two types. BUG=10038 TEST=covered by existing tests R=dglazkov Review URL: http://codereview.chromium.org/113928 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17290 0039d316-1c4b-4281-b951-d872f2087c98
* Move WebKit API to src/webkit/api.darin@chromium.org2009-05-101-8/+8
| | | | | | | | R=dglazkov Review URL: http://codereview.chromium.org/113186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15739 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using WebPoint, WebRect, and WebSize in more of the gluedarin@chromium.org2009-04-091-0/+22
| | | | | | | | | | | | | | | | | layer interface. This will help when we move those interfaces into the WebKit API. This is a second attempt at r13381, which was already reviewed here: http://codereview.chromium.org/63126 The only change between that CL and this one is in render_view.h, where I needed to change a parameter type from gfx::Rect to WebRect. TBR=dglazkov Review URL: http://codereview.chromium.org/64005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13424 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting dfisher changes 133386 and 13381cpu@google.com2009-04-081-22/+0
| | | | | | | | | | TBR=darin Review URL: http://codereview.chromium.org/58018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13387 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using WebPoint, WebRect, and WebSize in more of the gluedarin@chromium.org2009-04-081-0/+22
| | | | | | | | | | | layer interface. This will help when we move those interfaces into the WebKit API. R=dglazkov Review URL: http://codereview.chromium.org/63126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13381 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using WebDragData in WebView and WebViewDelegate.darin@chromium.org2009-04-071-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | I also cleaned up some of the WebView and WebViewDelegate methods to pass WebPoint instead of pairs of ints or gfx::Point. With this change, I am keeping webkit/glue/webdropdata.{h,cc}, which is what Chrome uses to pass around the equivalent data. Now, it is possible to construct a WebDropData from a WebKit::WebDragData and to also get a WebKit::WebDragData from a WebDropData. Hence, the conversion between WebDropData and ChromiumDataObject (see clipboard_conversion.{h,cc}) is now removed in favor of conversion between WebDropData and WebKit::WebDragData. Conversion between WebKit::WebDragData and WebCore::ChromiumDataObject is very cheap (just reference counting). Finally, this change also brings in WebData, which is now used by the return value of WebKitClient::loadResource. As a companion to that change, I also changed webkit_glue::GetDataResource to return StringPiece instead of std::string. That also saves on an unnecessary buffer copy. R=dglazkov Review URL: http://codereview.chromium.org/63084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13305 0039d316-1c4b-4281-b951-d872f2087c98
* Use WebScriptSource and WebFindInPageRequest from the WebKit API.darin@chromium.org2009-03-311-5/+33
| | | | | | | | | | | | | | | | | | This change introduces some helper functions in glue_util.cc for efficient conversion between WebString and WebCore::String when inside the implementation of webkit/glue. This is a temporary change since eventually all code in glue that uses WebCore will be moved into the WebKit API implementation. Instead of making the Chrome automation use WebFindInPageRequest, I decided to introduce AutomationMsg_Find_Params as a copy of the old FindInPageRequest structure. That preserves the IPC protocol and avoids making the automation library depend on WebKit. R=dglazkov Review URL: http://codereview.chromium.org/57060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12881 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome-side of moving webkit/glue/cache_manager.{h,cc} to the WebKit API layer.darin@chromium.org2009-03-191-6/+1
| | | | | | | | | | | | | | This also includes a change to not have third_party/WebKit/WebKit/chromium/public in the global include path. Most of the code changes pertain to this. I also took this opportunity to do some renaming: browser/cache_manager_host -> browser/renderer_host/web_cache_manager R=brettw Review URL: http://codereview.chromium.org/42194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12085 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-111-1/+0
| | | | | | | | | Normalize end of file newlines in webkit/. All files end in a single newline. Review URL: http://codereview.chromium.org/42070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11443 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup in webkit/glue:darin@chromium.org2009-03-021-16/+4
| | | | | | | | | | | | | | | - created dom_operations_private.h for things that mention WebCore types that are only needed within webkit/glue. - moved contents of webkit_glue.h to the right locations. - moved FilePath::StringType <-> WebString conversion out of glue_util into webkit_glue since it is part of the public API. - minimized includes in webkit_glue.h R=dglazkov Review URL: http://codereview.chromium.org/27351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10747 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side to implement WebMimeRegistry.darin@chromium.org2009-02-261-1/+18
| | | | | | | | R=dglazkov Review URL: http://codereview.chromium.org/27222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10532 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the amount of included header files. Vast change like in "Oh God! ↵maruel@chromium.org2009-02-181-8/+13
| | | | | | | | This revision changes half of the source files!". Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
* WebKit Merge 40875:41017, Chromium sidedglazkov@google.com2009-02-161-1/+2
| | | | | | | | | | | | | | R=tc BUG=NONE The changes are to account for: http://trac.webkit.org/changeset/40925 -- Adding MediaPlayerPrivate http://trac.webkit.org/changeset/40981 -- Converting GKURL constructor arg to CString. Review URL: http://codereview.chromium.org/20409 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9860 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux build bustageestade@chromium.org2009-02-141-1/+1
| | | | | | | tbr=jhawkins git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9810 0039d316-1c4b-4281-b951-d872f2087c98
* Change mime type utils to operate on platform-specific string types for ↵estade@chromium.org2009-02-141-0/+18
| | | | | | | | filenames/file extensions. Review URL: http://codereview.chromium.org/21327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9809 0039d316-1c4b-4281-b951-d872f2087c98
* Convert webkit_glue::GetLocalizedString to return a string16tc@google.com2009-02-051-0/+5
| | | | | | | | | | instead of a wstring. Convert the linux data pack files to pack message strings as utf16 instead of utf8. Review URL: http://codereview.chromium.org/20060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9193 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side of unforking. I need to pull WebKit with the change that unforks ↵brettw@google.com2008-12-181-2/+2
| | | | | | | | | | | | KURL.h This makes us defile USE(GOOGLEURL) and use that instead of USE_GOOGLE_URL_LIBRARY. I also fixed some places to be able to compile without it if possible (I think I will be wanting that capability in the future to test changes they may make upstream). Review URL: http://codereview.chromium.org/14494 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7231 0039d316-1c4b-4281-b951-d872f2087c98
* Landing 36102:37604 merge on trunkdglazkov@google.com2008-10-301-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4222 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb the referrer throughout the OpenURL APIs.ericroman@google.com2008-10-271-2/+5
| | | | | | | | | | | | | http://code.google.com/p/chromium/issues/detail?id=3224 Caveats: * Did not update TabNavigation yet. Hence session restore will continue to load the tabs with empty referrer. * Did not plumb referrer into incognito url open. (Not sure what the right thing to do is here with respect to privacy vs compatibility.) * Did not plumb referrer throughout the automation controller. No functional impact here, but it makes the code inconsistent with the non-automation version. Review URL: http://codereview.chromium.org/8186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4036 0039d316-1c4b-4281-b951-d872f2087c98
* Disable PLATFORM(WIN) !!darin@chromium.org2008-10-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | port/platform/chromium/PlatformKeyboardEventChromium.cpp - this is KeyEventWin.cpp renamed and mostly deleted. we just needed to define two static methods. - the big switch case goes to event_conversion.cc. port/platform/chromium/DragDataChromium.cpp - yay, no more dropData wrapper! port/platform/chromium/TemporaryLinkStubs.cpp - just stubbing scheduleDispatchFunctionsOnMainThread() for now since i think we should really use an implementation based on MessageLoop, and we don't use background threads in webkit yet. port/platform/chromium/DragImageChromium.cpp - PLATFORM(WIN) to PLATFORM(WIN_OS) port/platform/chromium/PopupMenuChromium.cpp - lots of nice cleanup. no more dummy HWNDs! port/platform/chromium/PlatformScrollBarChromium.cpp port/platform/chromium/ScrollViewChromium.cpp - GraphicsContext::getWindowsContext is gone. just use the skia canvas directly. port/platform/network/chromium/NetworkStateNotifierChromium.cpp - delete the PLATFORM(WIN) stubs port/platform/win/KeyEventWin.cpp port/platform/win/PlatformMouseEventWin.cpp port/platform/graphics/IntPointWin.cpp port/platform/graphics/IntSizeWin.cpp port/platform/graphics/IntRectWin.cpp - deleted :) port/platform/win/ScreenWin.cpp - compensate for no longer having implicit conversion between RECT and IntRect port/platform/UniscribeStateTextRun.cpp - scriptCache and scriptFontProperties now live on FontPlatformData as discussed with brett and hyatt. port/platform/graphics/FontCacheWin.cpp - getFontLinkInterface() function doesn't exist outside of PLATFORM(WIN) port/platform/graphics/FontPlatformData.h port/platform/graphics/FontPlatformDataWin.cpp - support storing script{Cache,FontProperties} on FontPlatformData. need to implement assignment operator and copy constructor. the script{Cache,FontProperties} objects are not copied per discussion with hyatt. - i moved m_isMLangFont into RefCountedHFONT so that we would know how to "destroy" the HFONT. port/platform/graphics/SimpleFontDataWin.cpp port/platform/graphics/GlyphPageTreeNodeWin.cpp - modified to support changes to FontPlatformData port/platform/graphics/ImageSkia.cpp - getHBITMAP, etc. were never used and are not needed port/platform/graphics/IconWin.cpp - modifications corresponding to my changes to Icon.h. m_icon is of type PlatformIcon. port/platform/graphics/GraphicsContextSkia.cpp - {get,release}WindowsContext are no longer defined port/platform/Cursor.h pending/NetworkStateNotifier.h pending/PlatformKeyboardEvent.h - we no longer need to fork these files. port/page/chromium/EventHandlerChromium.cpp - add #include "Clipboard.h" to support non-WIN_OS port/page/chromium/AccessibilityObjectWrapper.h - changed to no longer be a COM interface port/page/AccessibilityObjectWrapperWin.h - moved to port/page/chromium/AccessibilityObjectWrapper.h pending/AccessibleBase.cpp pending/AccessibleBase.h - modified to support changes to a11y wrapper class - by the way, these files should not be in pending! will fix that later. glue/glue_util.cc glue/glue_util.h - add conversion functions for rect structures. glue/webframe_impl.cc glue/webplugin_impl.cc - use new webkit_glue rect conversion functions. glue/glue_accessibility.cc - add header that is needed to build this file on windows glue/webview_impl.cc - no longer supports auto-conversion between IntPoint and POINT glue/event_conversion.cc - initialize by modifying member variables of the base class directly. - moved a static function from KeyEventWin.cpp R=tony,brettw BUG=3488 Review URL: http://codereview.chromium.org/7495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3587 0039d316-1c4b-4281-b951-d872f2087c98
* Replace MSVC pragmas with the macro. Also adds two filestc@google.com2008-10-161-2/+3
| | | | | | | | | | | | from webkit/glue to the build rule. Patch from icefox (TorchMobile) http://codereview.chromium.org/7418 Review URL: http://codereview.chromium.org/7454 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3490 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug where if we converted a std::string into a WebCore::String,brettw@google.com2008-10-141-1/+2
| | | | | | | | | the encoding will be incorrect. We assume std::string is UTF-8, but WebCore assume it's Latin-1 when you use the 8-bit constructor. Review URL: http://codereview.chromium.org/7266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3375 0039d316-1c4b-4281-b951-d872f2087c98
* base/logging.h defines LOG when webkit is about to so undef iterg@google.com2008-10-081-0/+1
| | | | | | | | Review URL: http://codereview.chromium.org/6204 Patch from icefox. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3042 0039d316-1c4b-4281-b951-d872f2087c98
* Merge the chrome_webkit_merge_branch back on to trunk. This brings ustc@google.com2008-10-011-31/+4
| | | | | | | up to webkit@36102. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2778 0039d316-1c4b-4281-b951-d872f2087c98
* Move std::string16 to base::string16. Don't pollute the std namespace. Don'tmmentovai@google.com2008-08-271-8/+8
| | | | | | assume that all string types can be represented as std::basic_string<CHAR>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1464 0039d316-1c4b-4281-b951-d872f2087c98
* Add UTF8 <-> UTF-16 conversion functions, and a WebCore::String -> ↵brettw@google.com2008-08-261-0/+8
| | | | | | std::string function. We already have a std::string -> WebCore::String function. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1393 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Rev string conversions to work in UTF-32 land.avi@google.com2008-08-181-1/+31
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@993 0039d316-1c4b-4281-b951-d872f2087c98
* Add webkit to the repository.initial.commit2008-07-271-0/+107
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18 0039d316-1c4b-4281-b951-d872f2087c98