Update to Chromium revision 198276.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1249 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-05-07 21:48:34 +00:00
parent 1cd4c79994
commit 2801cfd5b1
27 changed files with 148 additions and 161 deletions

View File

@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '194165',
'chromium_revision': '198276',
}

View File

@ -142,7 +142,7 @@
'action': [
'cp',
'-Rf',
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/WebCore/Resources/',
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/core/Resources/',
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources/'
],
},
@ -360,7 +360,7 @@
'action': [
'cp',
'-Rf',
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/WebCore/Resources/',
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/core/Resources/',
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources/'
],
},
@ -809,7 +809,7 @@
'<(DEPTH)/net/net.gyp:net_with_v8',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
'<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(DEPTH)/third_party/WebKit/Source/core/core.gyp/core.gyp:webcore',
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
'<(DEPTH)/ui/gl/gl.gyp:gl',

View File

@ -478,12 +478,6 @@ typedef struct _cef_browser_settings_t {
///
cef_state_t text_area_resize;
///
// Controls whether the fastback (back/forward) page cache will be used. Also
// configurable using the "enable-fastback" command-line switch.
///
cef_state_t page_cache;
///
// Controls whether the tab key can advance focus to links. Also configurable
// using the "disable-tab-to-links" command-line switch.

View File

@ -448,7 +448,6 @@ struct CefBrowserSettingsTraits {
target->image_shrink_standalone_to_fit =
src->image_shrink_standalone_to_fit;
target->text_area_resize = src->text_area_resize;
target->page_cache = src->page_cache;
target->tab_to_links = src->tab_to_links;
target->author_and_user_styles = src->author_and_user_styles;
target->local_storage = src->local_storage;

View File

@ -1750,7 +1750,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (!command_line.HasSwitch(switches::kEnableMediaStream)) {
// Cancel the request.
callback.Run(devices);
callback.Run(devices, scoped_ptr<content::MediaStreamUI>());
return;
}
@ -1783,7 +1783,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
}
}
callback.Run(devices);
callback.Run(devices, scoped_ptr<content::MediaStreamUI>());
}

View File

@ -283,7 +283,7 @@ bool RunOpenMultiFileDialog(const content::FileChooserParams& params,
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = owner;
scoped_array<wchar_t> filename(new wchar_t[UNICODE_STRING_MAX_CHARS]);
scoped_ptr<wchar_t[]> filename(new wchar_t[UNICODE_STRING_MAX_CHARS]);
filename[0] = 0;
ofn.lpstrFile = filename.get();

View File

@ -12,8 +12,6 @@
#include "include/internal/cef_types_wrappers.h"
#include "webkit/glue/webpreferences.h"
using webkit_glue::WebPreferences;
// Set default preferences based on CEF command-line flags. Chromium command-
// line flags should not exist for these preferences.
void SetDefaults(WebPreferences& web) {
@ -70,27 +68,27 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
SetDefaults(web);
if (cef.standard_font_family.length > 0) {
web.standard_font_family_map[WebPreferences::kCommonScript] =
web.standard_font_family_map[webkit_glue::kCommonScript] =
CefString(&cef.standard_font_family);
}
if (cef.fixed_font_family.length > 0) {
web.fixed_font_family_map[WebPreferences::kCommonScript] =
web.fixed_font_family_map[webkit_glue::kCommonScript] =
CefString(&cef.fixed_font_family);
}
if (cef.serif_font_family.length > 0) {
web.serif_font_family_map[WebPreferences::kCommonScript] =
web.serif_font_family_map[webkit_glue::kCommonScript] =
CefString(&cef.serif_font_family);
}
if (cef.sans_serif_font_family.length > 0) {
web.sans_serif_font_family_map[WebPreferences::kCommonScript] =
web.sans_serif_font_family_map[webkit_glue::kCommonScript] =
CefString(&cef.sans_serif_font_family);
}
if (cef.cursive_font_family.length > 0) {
web.cursive_font_family_map[WebPreferences::kCommonScript] =
web.cursive_font_family_map[webkit_glue::kCommonScript] =
CefString(&cef.cursive_font_family);
}
if (cef.fantasy_font_family.length > 0) {
web.fantasy_font_family_map[WebPreferences::kCommonScript] =
web.fantasy_font_family_map[webkit_glue::kCommonScript] =
CefString(&cef.fantasy_font_family);
}
@ -132,7 +130,6 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
SET_STATE(cef.image_shrink_standalone_to_fit,
web.shrinks_standalone_images_to_fit);
SET_STATE(cef.text_area_resize, web.text_areas_are_resizable);
SET_STATE(cef.page_cache, web.uses_page_cache);
SET_STATE(cef.tab_to_links, web.tabs_to_links);
SET_STATE(cef.author_and_user_styles, web.author_and_user_styles_enabled);
SET_STATE(cef.local_storage, web.local_storage_enabled);

View File

@ -8,11 +8,8 @@
#include "include/internal/cef_types_wrappers.h"
namespace webkit_glue {
struct WebPreferences;
}
void BrowserToWebSettings(const CefBrowserSettings& cef,
webkit_glue::WebPreferences& web);
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web);
#endif // CEF_LIBCEF_BROWSER_BROWSER_SETTINGS_H_

View File

@ -416,7 +416,7 @@ void LoadTraceFile(CefRefPtr<CefFrameHostImpl> frame,
}
frame->SendJavaScript(
"tracingController.onLoadTraceFileComplete(JSON.parse(window.traceData));"
"tracingController.onLoadTraceFileComplete(window.traceData);"
"delete window.traceData;",
std::string(), 0);
}
@ -485,15 +485,19 @@ void OnChromeTracingProcessMessage(CefRefPtr<CefBrowser> browser,
virtual void OnTraceDataCollected(const char* fragment,
size_t fragment_size) OVERRIDE {
const std::string& prefix = "tracingController.onTraceDataCollected([";
const std::string& suffix = "]);";
std::string javascript("window.traceData += '");
std::string str;
str.reserve(prefix.size() + fragment_size + suffix.size() + 1);
str.append(prefix);
str.append(fragment, fragment_size);
str.append(suffix);
Execute(str);
std::string escaped_data;
ReplaceChars(std::string(fragment, fragment_size),
"\\", "\\\\", &escaped_data);
javascript += escaped_data;
// Intentionally append a , to the traceData. This technically causes all
// traceData that we pass back to JS to end with a comma, but that is
// actually something the JS side strips away anyway.
javascript += ",';";
Execute(javascript);
}
virtual void OnTraceBufferPercentFullReply(float percent_full) OVERRIDE {
@ -504,7 +508,8 @@ void OnChromeTracingProcessMessage(CefRefPtr<CefBrowser> browser,
virtual void OnEndTracingComplete() OVERRIDE {
ended_ = true;
Execute("tracingController.onEndTracingComplete();");
Execute("tracingController.onEndTracingComplete(window.traceData);"
"delete window.traceData;");
}
private:
@ -531,10 +536,18 @@ void OnChromeTracingProcessMessage(CefRefPtr<CefBrowser> browser,
// continue handling it.
CefBeginTracing(client, categories);
} else if (action == "endTracingAsync") {
// This is really us beginning to end tracing, rather than tracing being
// truly over. When this function yields, we expect to get some number of
// OnTraceDataCollected callbacks, which will append data to
// window.traceData. To set up for this, set window.traceData to the empty
// string.
frame->SendJavaScript("window.traceData = '';", std::string(), 0);
if (!CefEndTracingAsync()) {
// We weren't really tracing to begin with.
frame->SendJavaScript(
"tracingController.onEndTracingComplete();",
"tracingController.onEndTracingComplete(window.traceData);"
"delete window.traceData;",
std::string(), 0);
}
} else if (action == "beginRequestBufferPercentFull") {

View File

@ -643,7 +643,7 @@ void CefContentBrowserClient::ResourceDispatcherHostCreated() {
void CefContentBrowserClient::OverrideWebkitPrefs(
content::RenderViewHost* rvh,
const GURL& url,
webkit_glue::WebPreferences* prefs) {
WebPreferences* prefs) {
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForHost(rvh);
DCHECK(browser.get());

View File

@ -102,7 +102,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,
const GURL& url,
webkit_glue::WebPreferences* prefs) OVERRIDE;
WebPreferences* prefs) OVERRIDE;
virtual void BrowserURLHandlerCreated(
content::BrowserURLHandler* handler) OVERRIDE;
virtual std::string GetDefaultDownloadName() OVERRIDE;

View File

@ -222,6 +222,7 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url,
cookie_monster_->SetCookieWithDetailsAsync(gurl, name, value, domain, path,
expiration_time, cookie.secure, cookie.httponly,
net::COOKIE_PRIORITY_DEFAULT,
net::CookieStore::SetCookiesCallback());
return true;
}

View File

@ -167,6 +167,13 @@ std::string CefDevToolsDelegate::GetViewDescription(content::RenderViewHost*) {
return std::string();
}
scoped_refptr<net::StreamListenSocket>
CefDevToolsDelegate::CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate,
std::string* name) {
return NULL;
}
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,
bool http_scheme) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();

View File

@ -63,6 +63,9 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
virtual content::RenderViewHost* CreateNewTarget() OVERRIDE;
virtual TargetType GetTargetType(content::RenderViewHost*) OVERRIDE;
virtual std::string GetViewDescription(content::RenderViewHost*) OVERRIDE;
virtual scoped_refptr<net::StreamListenSocket> CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate,
std::string* name) OVERRIDE;
// Returns the DevTools URL for the specified RenderViewHost.
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);

View File

@ -132,21 +132,6 @@ void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
}
}
void CefMediaCaptureDevicesDispatcher::OnCaptureDevicesOpened(
int render_process_id,
int render_view_id,
const content::MediaStreamDevices& devices,
const base::Closure& close_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void CefMediaCaptureDevicesDispatcher::OnCaptureDevicesClosed(
int render_process_id,
int render_view_id,
const content::MediaStreamDevices& devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));

View File

@ -73,15 +73,6 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
content::MediaStreamDevices* devices);
// Overridden from content::MediaObserver:
virtual void OnCaptureDevicesOpened(
int render_process_id,
int render_view_id,
const content::MediaStreamDevices& devices,
const base::Closure& close_callback) OVERRIDE;
virtual void OnCaptureDevicesClosed(
int render_process_id,
int render_view_id,
const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnVideoCaptureDevicesChanged(

View File

@ -153,7 +153,7 @@ CefResourceRequestJob::CefResourceRequestJob(
handler_(handler),
remaining_bytes_(0),
response_cookies_save_index_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
CefResourceRequestJob::~CefResourceRequestJob() {

View File

@ -49,7 +49,7 @@ void CefTraceSubscriber::GetKnownCategoriesAsync(
DCHECK(known_categories_callback_.is_null());
known_categories_callback_ = callback;
content::TraceController::GetInstance()->GetKnownCategoriesAsync(this);
content::TraceController::GetInstance()->GetKnownCategoryGroupsAsync(this);
}
bool CefTraceSubscriber::GetTraceBufferPercentFullAsync() {

View File

@ -550,7 +550,7 @@ void CefBrowserImpl::DidCreateDataSource(WebKit::WebFrame* frame,
content::DocumentState* document_state =
content::DocumentState::FromDataSource(ds);
document_state->set_navigation_state(
content::NavigationState::CreateBrowserInitiated(-1, -1,
content::NavigationState::CreateBrowserInitiated(-1, -1, false,
content::PAGE_TRANSITION_LINK));
}

View File

@ -5,10 +5,10 @@
#include "base/compiler_specific.h"
#include "third_party/WebKit/Source/WebCore/config.h"
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "V8RecursionScope.h" // NOLINT(build/include)
#include "V8Utilities.h" // NOLINT(build/include)
#include "bindings/v8/V8RecursionScope.h"
#include "bindings/v8/V8Utilities.h"
MSVC_POP_WARNING();
#undef LOG

View File

@ -8,14 +8,14 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "third_party/WebKit/Source/WebCore/config.h"
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "Frame.h" // NOLINT(build/include)
#include "ScriptController.h" // NOLINT(build/include)
#include "V8Binding.h" // NOLINT(build/include)
#include "V8RecursionScope.h" // NOLINT(build/include)
#include "WorkerContext.h" // NOLINT(build/include)
#include "WorkerScriptController.h" // NOLINT(build/include)
#include "core/page/Frame.h"
#include "core/workers//WorkerContext.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8RecursionScope.h"
#include "bindings/v8/WorkerScriptController.h"
MSVC_POP_WARNING();
#undef LOG

View File

@ -7,10 +7,10 @@
#include "base/compiler_specific.h"
#include "third_party/WebKit/Source/WebCore/config.h"
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "Page.h"
#include "ScriptController.h"
#include "bindings/v8/ScriptController.h"
#include "core/page/Page.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebViewImpl.h"
MSVC_POP_WARNING();

View File

@ -29,7 +29,7 @@ patches = [
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=899
'name': 'webkit_features',
'path': '../third_party/WebKit/Source/WebKit/chromium/',
'path': '../third_party/WebKit/Source/core/',
},
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=933
@ -49,7 +49,7 @@ patches = [
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364',
'path': '../third_party/WebKit/Source/WebCore/',
'path': '../third_party/WebKit/Source/core/',
'condition': 'CEF_SPI_BUILD',
},
]

View File

@ -1,8 +1,8 @@
Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp (revision 148366)
--- page/FrameView.cpp (revision 149653)
+++ page/FrameView.cpp (working copy)
@@ -198,10 +198,12 @@
@@ -199,10 +199,12 @@
if (!page)
return;
@ -17,7 +17,7 @@ Index: page/FrameView.cpp
PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm
===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 148366)
--- platform/mac/NSScrollerImpDetails.mm (revision 149653)
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
@@ -33,6 +33,7 @@

View File

@ -1,8 +1,8 @@
Index: features.gypi
===================================================================
--- features.gypi (revision 148366)
--- features.gypi (revision 149653)
+++ features.gypi (working copy)
@@ -131,7 +131,7 @@
@@ -90,7 +90,7 @@
'ENABLE_CALENDAR_PICKER=1',
'ENABLE_DATALIST_ELEMENT=1',
'ENABLE_INPUT_SPEECH=1',

View File

@ -1,76 +1,76 @@
Index: src/WebViewImpl.cpp
===================================================================
--- src/WebViewImpl.cpp (revision 148366)
+++ src/WebViewImpl.cpp (working copy)
@@ -403,6 +403,7 @@
, m_fakeDoubleTapPageScaleFactor(0)
, m_fakeDoubleTapUseAnchor(false)
, m_contextMenuAllowed(false)
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_suppressNextKeypressEvent(false)
@@ -3688,9 +3689,14 @@
updateLayerTreeViewport();
}
+void WebViewImpl::setUseExternalPopupMenusThisInstance(bool useExternalPopupMenus)
+{
+ m_shouldUseExternalPopupMenus = useExternalPopupMenus;
+}
+
bool WebViewImpl::useExternalPopupMenus()
{
- return shouldUseExternalPopupMenus;
+ return m_shouldUseExternalPopupMenus;
}
void WebViewImpl::setEmulatedTextZoomFactor(float textZoomFactor)
Index: src/WebViewImpl.h
===================================================================
--- src/WebViewImpl.h (revision 148366)
+++ src/WebViewImpl.h (working copy)
@@ -423,7 +423,8 @@
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
- static bool useExternalPopupMenus();
+ void setUseExternalPopupMenusThisInstance(bool);
+ bool useExternalPopupMenus();
bool contextMenuAllowed() const
{
@@ -752,6 +753,8 @@
bool m_contextMenuAllowed;
+ bool m_shouldUseExternalPopupMenus;
+
bool m_doingDragAndDrop;
bool m_ignoreInputEvents;
Index: src/ChromeClientImpl.cpp
===================================================================
--- src/ChromeClientImpl.cpp (revision 148366)
+++ src/ChromeClientImpl.cpp (working copy)
@@ -1024,7 +1024,7 @@
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const
{
- if (WebViewImpl::useExternalPopupMenus())
+ if (m_webView->useExternalPopupMenus())
return adoptRef(new ExternalPopupMenu(client, m_webView->client()));
return adoptRef(new PopupMenuChromium(client));
Index: public/WebView.h
===================================================================
--- public/WebView.h (revision 148366)
--- public/WebView.h (revision 149653)
+++ public/WebView.h (working copy)
@@ -413,6 +413,7 @@
// Sets whether select popup menus should be rendered by the browser.
WEBKIT_EXPORT static void setUseExternalPopupMenus(bool);
+ virtual void setUseExternalPopupMenusThisInstance(bool) = 0;
// Visited link state --------------------------------------------------
@@ -418,6 +418,7 @@
// Sets whether select popup menus should be rendered by the browser.
WEBKIT_EXPORT static void setUseExternalPopupMenus(bool);
+ virtual void setUseExternalPopupMenusThisInstance(bool) = 0;
// Visited link state --------------------------------------------------
Index: src/ChromeClientImpl.cpp
===================================================================
--- src/ChromeClientImpl.cpp (revision 149653)
+++ src/ChromeClientImpl.cpp (working copy)
@@ -976,7 +976,7 @@
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const
{
- if (WebViewImpl::useExternalPopupMenus())
+ if (m_webView->useExternalPopupMenus())
return adoptRef(new ExternalPopupMenu(client, m_webView->client()));
return adoptRef(new PopupMenuChromium(client));
Index: src/WebViewImpl.cpp
===================================================================
--- src/WebViewImpl.cpp (revision 149653)
+++ src/WebViewImpl.cpp (working copy)
@@ -406,6 +406,7 @@
, m_fakeDoubleTapPageScaleFactor(0)
, m_fakeDoubleTapUseAnchor(false)
, m_contextMenuAllowed(false)
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_suppressNextKeypressEvent(false)
@@ -3704,9 +3705,14 @@
updateLayerTreeViewport();
}
+void WebViewImpl::setUseExternalPopupMenusThisInstance(bool useExternalPopupMenus)
+{
+ m_shouldUseExternalPopupMenus = useExternalPopupMenus;
+}
+
bool WebViewImpl::useExternalPopupMenus()
{
- return shouldUseExternalPopupMenus;
+ return m_shouldUseExternalPopupMenus;
}
void WebViewImpl::setEmulatedTextZoomFactor(float textZoomFactor)
Index: src/WebViewImpl.h
===================================================================
--- src/WebViewImpl.h (revision 149653)
+++ src/WebViewImpl.h (working copy)
@@ -421,7 +421,8 @@
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
- static bool useExternalPopupMenus();
+ void setUseExternalPopupMenusThisInstance(bool);
+ bool useExternalPopupMenus();
bool contextMenuAllowed() const
{
@@ -753,6 +754,8 @@
bool m_contextMenuAllowed;
+ bool m_shouldUseExternalPopupMenus;
+
bool m_doingDragAndDrop;
bool m_ignoreInputEvents;

View File

@ -27,7 +27,7 @@ import gyp
sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit'))
sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build'))
sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit',
'Source', 'WebCore', 'WebCore.gyp', 'scripts'))
'Source', 'core', 'core.gyp', 'scripts'))
# On Windows, Psyco shortens warm runs of build/gyp_chromium by about
# 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70