diff options
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.cc | 9 | ||||
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.h | 5 | ||||
-rw-r--r-- | chrome/worker/worker_webkitclient_impl.cc | 7 | ||||
-rw-r--r-- | chrome/worker/worker_webkitclient_impl.h | 5 | ||||
-rw-r--r-- | webkit/glue/webdatasource.h | 3 | ||||
-rw-r--r-- | webkit/glue/webdatasource_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webdatasource_impl.h | 1 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 52 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_webkit_init.h | 5 | ||||
-rwxr-xr-x | webkit/tools/test_shell/test_webview_delegate.cc | 12 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 2 |
12 files changed, 28 insertions, 79 deletions
@@ -19,7 +19,7 @@ deps = { "http://googletest.googlecode.com/svn/trunk@214", "src/third_party/WebKit": - "/trunk/deps/third_party/WebKit@13799", + "/trunk/deps/third_party/WebKit@13842", "src/third_party/icu38": "/trunk/deps/third_party/icu38@13472", diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc index f35e9d1..3a02adb 100644 --- a/chrome/renderer/renderer_webkitclient_impl.cc +++ b/chrome/renderer/renderer_webkitclient_impl.cc @@ -23,7 +23,7 @@ using WebKit::WebURL; WebKit::WebClipboard* RendererWebKitClientImpl::clipboard() { return &clipboard_; -} +} WebKit::WebMimeRegistry* RendererWebKitClientImpl::mimeRegistry() { return &mime_registry_; @@ -37,13 +37,14 @@ WebKit::WebSandboxSupport* RendererWebKitClientImpl::sandboxSupport() { #endif } -uint64_t RendererWebKitClientImpl::visitedLinkHash(const char* canonical_url, - size_t length) { +unsigned long long RendererWebKitClientImpl::visitedLinkHash( + const char* canonical_url, + size_t length) { return RenderThread::current()->visited_link_slave()->ComputeURLFingerprint( canonical_url, length); } -bool RendererWebKitClientImpl::isLinkVisited(uint64_t link_hash) { +bool RendererWebKitClientImpl::isLinkVisited(unsigned long long link_hash) { return RenderThread::current()->visited_link_slave()->IsVisited(link_hash); } diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h index 2efdf66..3c4cb48 100644 --- a/chrome/renderer/renderer_webkitclient_impl.h +++ b/chrome/renderer/renderer_webkitclient_impl.h @@ -19,8 +19,9 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { virtual WebKit::WebClipboard* clipboard(); virtual WebKit::WebMimeRegistry* mimeRegistry(); virtual WebKit::WebSandboxSupport* sandboxSupport(); - virtual uint64_t visitedLinkHash(const char* canonicalURL, size_t length); - virtual bool isLinkVisited(uint64_t linkHash); + virtual unsigned long long visitedLinkHash( + const char* canonicalURL, size_t length); + virtual bool isLinkVisited(unsigned long long linkHash); virtual void setCookies( const WebKit::WebURL& url, const WebKit::WebURL& policy_url, const WebKit::WebString&); diff --git a/chrome/worker/worker_webkitclient_impl.cc b/chrome/worker/worker_webkitclient_impl.cc index 96fc6ed..45a13e8 100644 --- a/chrome/worker/worker_webkitclient_impl.cc +++ b/chrome/worker/worker_webkitclient_impl.cc @@ -23,13 +23,14 @@ WebKit::WebSandboxSupport* WorkerWebKitClientImpl::sandboxSupport() { return NULL; } -uint64_t WorkerWebKitClientImpl::visitedLinkHash(const char* canonical_url, - size_t length) { +unsigned long long WorkerWebKitClientImpl::visitedLinkHash( + const char* canonical_url, + size_t length) { NOTREACHED(); return 0; } -bool WorkerWebKitClientImpl::isLinkVisited(uint64_t link_hash) { +bool WorkerWebKitClientImpl::isLinkVisited(unsigned long long link_hash) { NOTREACHED(); return false; } diff --git a/chrome/worker/worker_webkitclient_impl.h b/chrome/worker/worker_webkitclient_impl.h index e507cc0..474e1b2 100644 --- a/chrome/worker/worker_webkitclient_impl.h +++ b/chrome/worker/worker_webkitclient_impl.h @@ -13,8 +13,9 @@ class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl { virtual WebKit::WebClipboard* clipboard(); virtual WebKit::WebMimeRegistry* mimeRegistry(); virtual WebKit::WebSandboxSupport* sandboxSupport(); - virtual uint64_t visitedLinkHash(const char* canonicalURL, size_t length); - virtual bool isLinkVisited(uint64_t linkHash); + virtual unsigned long long visitedLinkHash(const char* canonicalURL, + size_t length); + virtual bool isLinkVisited(unsigned long long linkHash); virtual void setCookies(const WebKit::WebURL& url, const WebKit::WebURL& policy_url, const WebKit::WebString& value); diff --git a/webkit/glue/webdatasource.h b/webkit/glue/webdatasource.h index 70c4283..8ca7b1c 100644 --- a/webkit/glue/webdatasource.h +++ b/webkit/glue/webdatasource.h @@ -34,9 +34,6 @@ class WebDataSource { public: virtual ~WebDataSource() {} - // Returns the frame that represents this data source. - virtual WebFrame* GetWebFrame() = 0; - // Returns a reference to the original request data that created the // datasource. This request will be unmodified by WebKit. // diff --git a/webkit/glue/webdatasource_impl.cc b/webkit/glue/webdatasource_impl.cc index 9d31b0f..13c15cc 100644 --- a/webkit/glue/webdatasource_impl.cc +++ b/webkit/glue/webdatasource_impl.cc @@ -39,10 +39,6 @@ WebDataSourceImpl::WebDataSourceImpl(const WebCore::ResourceRequest& request, WebDataSourceImpl::~WebDataSourceImpl() { } -WebFrame* WebDataSourceImpl::GetWebFrame() { - return WebFrameImpl::FromFrame(frame()); -} - const WebRequest& WebDataSourceImpl::GetInitialRequest() const { // WebKit may change the frame load request as it sees fit, so we must sync // our request object. diff --git a/webkit/glue/webdatasource_impl.h b/webkit/glue/webdatasource_impl.h index 90f8313..b18482b 100644 --- a/webkit/glue/webdatasource_impl.h +++ b/webkit/glue/webdatasource_impl.h @@ -27,7 +27,6 @@ class WebDataSourceImpl : public WebCore::DocumentLoader, public WebDataSource { } // WebDataSource methods: - virtual WebFrame* GetWebFrame(); virtual const WebRequest& GetInitialRequest() const; virtual const WebRequest& GetRequest() const; virtual const WebResponse& GetResponse() const; diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index 84d42b4..62202a0 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -638,8 +638,8 @@ bool WebFrameImpl::GetPreviousHistoryState(std::string* history_state) const { } bool WebFrameImpl::GetCurrentHistoryState(std::string* state) const { - if (frame_->loader()) - frame_->loader()->saveDocumentAndScrollState(); + frame_->loader()->saveDocumentAndScrollState(); + RefPtr<HistoryItem> item = frame_->page()->backForwardList()->currentItem(); if (!item) return false; @@ -683,8 +683,6 @@ static WebDataSource* DataSourceForDocLoader(DocumentLoader* loader) { } WebDataSource* WebFrameImpl::GetDataSource() const { - if (!frame_->loader()) - return NULL; return DataSourceForDocLoader(frame_->loader()->documentLoader()); } @@ -694,8 +692,6 @@ WebDataSourceImpl* WebFrameImpl::GetDataSourceImpl() const { WebDataSource* WebFrameImpl::GetProvisionalDataSource() const { FrameLoader* frame_loader = frame_->loader(); - if (!frame_loader) - return NULL; // We regard the policy document loader as still provisional. DocumentLoader* doc_loader = frame_loader->provisionalDocumentLoader(); @@ -1449,50 +1445,6 @@ void WebFrameImpl::Cut() { d->UserMetricsRecordAction(L"Cut"); } -#if defined(OS_WIN) -// Returns a copy of data from a data handle retrieved from the clipboard. The -// data is decoded according to the format that it is in. The caller is -// responsible for freeing the data. -static wchar_t* GetDataFromHandle(HGLOBAL data_handle, - unsigned int clipboard_format) { - switch (clipboard_format) { - case CF_TEXT: { - char* string_data = static_cast<char*>(::GlobalLock(data_handle)); - int n_chars = ::MultiByteToWideChar(CP_ACP, 0, string_data, -1, NULL, 0); - wchar_t* wcs_data = - static_cast<wchar_t*>(malloc((n_chars * sizeof(wchar_t)) + - sizeof(wchar_t))); - if (!wcs_data) { - ::GlobalUnlock(data_handle); - return NULL; - } - - ::MultiByteToWideChar(CP_ACP, 0, string_data, -1, wcs_data, n_chars); - ::GlobalUnlock(data_handle); - wcs_data[n_chars] = '\0'; - return wcs_data; - } - case CF_UNICODETEXT: { - wchar_t* string_data = static_cast<wchar_t*>(::GlobalLock(data_handle)); - size_t data_size_in_bytes = ::GlobalSize(data_handle); - wchar_t* wcs_data = - static_cast<wchar_t*>(malloc(data_size_in_bytes + sizeof(wchar_t))); - if (!wcs_data) { - ::GlobalUnlock(data_handle); - return NULL; - } - - size_t n_chars = static_cast<int>(data_size_in_bytes / sizeof(wchar_t)); - wmemcpy_s(wcs_data, n_chars, string_data, n_chars); - ::GlobalUnlock(data_handle); - wcs_data[n_chars] = '\0'; - return wcs_data; - } - } - return NULL; -} -#endif - void WebFrameImpl::Paste() { frame()->editor()->paste(); diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h index 013d46f..40ffdca 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.h +++ b/webkit/tools/test_shell/test_shell_webkit_init.h @@ -62,11 +62,12 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { return NULL; } - virtual uint64_t visitedLinkHash(const char* canonicalURL, size_t length) { + virtual unsigned long long visitedLinkHash(const char* canonicalURL, + size_t length) { return 0; } - virtual bool isLinkVisited(uint64_t linkHash) { + virtual bool isLinkVisited(unsigned long long linkHash) { return false; } diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 9ba64e0..a27d948 100755 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -76,7 +76,7 @@ std::wstring UrlSuitableForTestResult(const std::wstring& url) { // Adds a file called "DRTFakeFile" to |data_object| (CF_HDROP). Use to fake // dragging a file. void AddDRTFakeFileToDataObject(WebDragData* drag_data) { - drag_data->appendFileName(WebString::fromUTF8("DRTFakeFile")); + drag_data->appendToFileNames(WebString::fromUTF8("DRTFakeFile")); } // Get a debugging string from a WebNavigationType. @@ -273,7 +273,7 @@ void TestWebViewDelegate::DidFailProvisionalLoadWithError( GetFrameDescription(frame).c_str()); } - LocationChangeDone(frame->GetProvisionalDataSource()); + LocationChangeDone(frame); // Don't display an error page if we're running layout tests, because // DumpRenderTree doesn't. @@ -337,7 +337,7 @@ void TestWebViewDelegate::DidFinishLoadForFrame(WebView* webview, } UpdateAddressBar(webview); - LocationChangeDone(frame->GetDataSource()); + LocationChangeDone(frame); } void TestWebViewDelegate::DidFailLoadWithError(WebView* webview, @@ -348,7 +348,7 @@ void TestWebViewDelegate::DidFailLoadWithError(WebView* webview, GetFrameDescription(frame).c_str()); } - LocationChangeDone(frame->GetDataSource()); + LocationChangeDone(frame); } void TestWebViewDelegate::DidFinishDocumentLoadForFrame(WebView* webview, @@ -783,8 +783,8 @@ void TestWebViewDelegate::UpdateAddressBar(WebView* webView) { SetAddressBarURL(dataSource->GetRequest().GetMainDocumentURL()); } -void TestWebViewDelegate::LocationChangeDone(WebDataSource* data_source) { - if (data_source->GetWebFrame() == top_loading_frame_) { +void TestWebViewDelegate::LocationChangeDone(WebFrame* frame) { + if (frame == top_loading_frame_) { top_loading_frame_ = NULL; if (shell_->layout_test_mode()) diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 15f92f5..c3d436d 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -288,7 +288,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, // In the Mac code, this is called to trigger the end of a test after the // page has finished loading. From here, we can generate the dump for the // test. - void LocationChangeDone(WebDataSource* data_source); + void LocationChangeDone(WebFrame*); WebWidgetHost* GetHostForWidget(WebWidget* webwidget); |