summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webdatasource.h3
-rw-r--r--webkit/glue/webdatasource_impl.cc4
-rw-r--r--webkit/glue/webdatasource_impl.h1
-rw-r--r--webkit/glue/webframe_impl.cc52
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h5
-rwxr-xr-xwebkit/tools/test_shell/test_webview_delegate.cc12
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h2
7 files changed, 12 insertions, 67 deletions
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);