diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 22:31:35 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 22:31:35 +0000 |
commit | de56f378336660dcc848763c80267a5e063ae47d (patch) | |
tree | 7f551b88923b35bc4022ce6ab3a3f602fb60d91c /chrome | |
parent | dc4f63c80cb90efe594131030aad6776e5945fcc (diff) | |
download | chromium_src-de56f378336660dcc848763c80267a5e063ae47d.zip chromium_src-de56f378336660dcc848763c80267a5e063ae47d.tar.gz chromium_src-de56f378336660dcc848763c80267a5e063ae47d.tar.bz2 |
Merge the chrome_webkit_merge_branch back on to trunk. This brings us
up to webkit@36102.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/chrome.dll.deps | 4 | ||||
-rw-r--r-- | chrome/browser/iframe_uitest.cc | 4 | ||||
-rw-r--r-- | chrome/common/resource_bundle.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/renderer_glue.cc | 51 | ||||
-rw-r--r-- | chrome/views/view.cc | 3 |
6 files changed, 24 insertions, 46 deletions
diff --git a/chrome/app/chrome.dll.deps b/chrome/app/chrome.dll.deps index d54ab1e..fce19b4 100644 --- a/chrome/app/chrome.dll.deps +++ b/chrome/app/chrome.dll.deps @@ -17,6 +17,9 @@ dependents = [ 'OLEAUT32.dll',
'OLEACC.dll',
'secur32.dll',
+# IPHLPAPI.dll was added as part of the Sept 2008 WebKit merge
+# We probably don't need it, but we're adding it for now.
+ 'iphlpapi.dll',
]
delay_loaded = [
@@ -31,3 +34,4 @@ delay_loaded = [ 'COMDLG32.dll',
'urlmon.dll',
]
+
diff --git a/chrome/browser/iframe_uitest.cc b/chrome/browser/iframe_uitest.cc index 3046fd5..1c46b88 100644 --- a/chrome/browser/iframe_uitest.cc +++ b/chrome/browser/iframe_uitest.cc @@ -28,7 +28,9 @@ TEST_F(IFrameTest, Crash) { NavigateAndVerifyTitle(L"iframe.html", L"iframe test"); } -TEST_F(IFrameTest, InEmptyFrame) { +// http://crbug.com/3035 : Triggers a DCHECK in web_contents.cc. Need to +// investigate. +TEST_F(IFrameTest, DISABLED_InEmptyFrame) { NavigateAndVerifyTitle(L"iframe_in_empty_frame.html", L"iframe test"); } diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc index 49c58f8..133020d 100644 --- a/chrome/common/resource_bundle.cc +++ b/chrome/common/resource_bundle.cc @@ -153,8 +153,9 @@ SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) { // If not found load and store the image if (found == skia_images_.end()) { - // Load the image - bitmap = LoadBitmap(theme_dll_, resource_id); + // Try to load the bitmap from the theme dll. + if (theme_dll_) + bitmap = LoadBitmap(theme_dll_, resource_id); // We did not find the bitmap in the theme DLL, try the current one. if (!bitmap) bitmap = LoadBitmap(_AtlBaseModule.GetModuleInstance(), resource_id); diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index af907c1..4fe474d 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1367,6 +1367,9 @@ void RenderView::DidChangeLocationWithinPageForFrame(WebView* webview, WebFrame* frame, bool is_new_navigation) { DidCommitLoadForFrame(webview, frame, is_new_navigation); + const std::wstring& title = + webview->GetMainFrame()->GetDataSource()->GetPageTitle(); + UpdateTitle(frame, title); } void RenderView::DidReceiveIconForFrame(WebView* webview, diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index 324c87c..9de5f15 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -68,53 +68,16 @@ class ResizableStackArray { namespace webkit_glue { -bool HistoryContains(const wchar_t* url, int url_length, - const char* document_host, int document_host_length, - bool is_dns_prefetch_enabled) { - if (url_length == 0) - return false; // Empty URLs are not visited. - - // Use big stack buffer to avoid allocation when possible. - url_parse::Parsed parsed; - url_canon::RawCanonOutput<2048> canon; - - if (!url_util::Canonicalize(url, url_length, NULL, &canon, &parsed)) - return false; // Invalid URLs are not visited. - - char* parsed_host = canon.data() + parsed.host.begin; - - // If the hostnames match or is_dns_prefetch_enabled is true, do the prefetch. - if (parsed.host.is_nonempty()) { - if (is_dns_prefetch_enabled || - (document_host_length > 0 && parsed.host.len == document_host_length && - strncmp(parsed_host, document_host, parsed.host.len) == 0)) - DnsPrefetchCString(parsed_host, parsed.host.len); - } - - return RenderThread::current()->visited_link_slave()-> - IsVisited(canon.data(), canon.length()); -} - -void DnsPrefetchUrl(const wchar_t* url, int url_length) { - if (url_length == 0) - return; // Empty URLs have no hostnames. - - // Use big stack buffer to avoid allocation when possible. - url_parse::Parsed parsed; - url_canon::RawCanonOutput<2048> canon; - - if (!url_util::Canonicalize(url, url_length, NULL, &canon, &parsed)) - return; // Invalid URLs don't have hostnames. - - // Call for prefetching without creating a std::string(). - if (parsed.host.is_nonempty()) - DnsPrefetchCString(canon.data() + parsed.host.begin, parsed.host.len); +void PrefetchDns(const std::string& hostname) { + if (!hostname.empty()) + DnsPrefetchCString(hostname.c_str(), hostname.length()); } void PrecacheUrl(const wchar_t* url, int url_length) { // TBD: jar: Need implementation that loads the targetted URL into our cache. // For now, at least prefetch DNS lookup - DnsPrefetchUrl(url, url_length); + GURL parsed_url(std::wstring(url, url_length)); + PrefetchDns(parsed_url.host()); } void webkit_glue::AppendToLog(const char* file, int line, const char* msg) { @@ -168,6 +131,10 @@ std::string webkit_glue::GetDataResource(int resource_id) { return ResourceBundle::GetSharedInstance().GetDataResource(resource_id); } +SkBitmap* webkit_glue::GetBitmapResource(int resource_id) { + return ResourceBundle::GetSharedInstance().GetBitmapNamed(resource_id); +} + HCURSOR webkit_glue::LoadCursor(int cursor_id) { return ResourceBundle::GetSharedInstance().LoadCursor(cursor_id); } diff --git a/chrome/views/view.cc b/chrome/views/view.cc index 8230e58..4df9cc2 100644 --- a/chrome/views/view.cc +++ b/chrome/views/view.cc @@ -1445,7 +1445,8 @@ bool View::IsVisibleInRootView() const { } bool View::HitTest(const CPoint& l) const { - if (l.x >= 0 && l.x < width() && l.y >= 0 && l.y < height()) { + if (l.x >= 0 && l.x < static_cast<int>(width()) && + l.y >= 0 && l.y < static_cast<int>(height())) { if (HasHitTestMask()) { gfx::Path mask; GetHitTestMask(&mask); |