diff --git a/atom/browser/api/atom_api_content_tracing.cc b/atom/browser/api/atom_api_content_tracing.cc index 28a95aa71e6f..b5d9cb6c738e 100644 --- a/atom/browser/api/atom_api_content_tracing.cc +++ b/atom/browser/api/atom_api_content_tracing.cc @@ -32,23 +32,23 @@ struct Converter > { }; template<> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Handle val, - base::debug::CategoryFilter* out) { + base::trace_event::CategoryFilter* out) { std::string filter; if (!ConvertFromV8(isolate, val, &filter)) return false; - *out = base::debug::CategoryFilter(filter); + *out = base::trace_event::CategoryFilter(filter); return true; } }; template<> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Handle val, - base::debug::TraceOptions* out) { + base::trace_event::TraceOptions* out) { std::string options; if (!ConvertFromV8(isolate, val, &options)) return false; diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index e0c433695e74..95e99cf5648b 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -315,12 +315,11 @@ content::WebContents* WebContents::GetOwnerWebContents() const { return embedder_web_contents_; } -void WebContents::GuestSizeChanged(const gfx::Size& old_size, - const gfx::Size& new_size) { +void WebContents::GuestSizeChanged(const gfx::Size& new_size) { if (!auto_size_enabled_) return; + GuestSizeChangedDueToAutoSize(guest_size_, new_size); guest_size_ = new_size; - GuestSizeChangedDueToAutoSize(old_size, new_size); } void WebContents::RegisterDestructionCallback( diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 9b2a9cd4e3e4..2578c5c2a418 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -180,8 +180,7 @@ class WebContents : public mate::EventEmitter, void DidAttach(int guest_proxy_routing_id) final; void ElementSizeChanged(const gfx::Size& size) final; content::WebContents* GetOwnerWebContents() const final; - void GuestSizeChanged(const gfx::Size& old_size, - const gfx::Size& new_size) final; + void GuestSizeChanged(const gfx::Size& new_size) final; void RegisterDestructionCallback(const DestructionCallback& callback) final; void SetGuestSizer(content::GuestSizer* guest_sizer) final; void WillAttach(content::WebContents* embedder_web_contents, diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index ef76693b2c27..2a246f227647 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -79,7 +79,6 @@ void AtomBrowserClient::ResourceDispatcherHostCreated() { void AtomBrowserClient::OverrideWebkitPrefs( content::RenderViewHost* render_view_host, - const GURL& url, content::WebPreferences* prefs) { prefs->javascript_enabled = true; prefs->web_security_enabled = true; @@ -99,7 +98,9 @@ void AtomBrowserClient::OverrideWebkitPrefs( prefs->allow_running_insecure_content = false; // Turn off web security for devtools. - if (url.SchemeIs("chrome-devtools")) { + auto web_contents = content::WebContents::FromRenderViewHost( + render_view_host); + if (web_contents && web_contents->GetURL().SchemeIs("chrome-devtools")) { prefs->web_security_enabled = false; return; } @@ -115,7 +116,7 @@ void AtomBrowserClient::OverrideWebkitPrefs( NativeWindow* window = NativeWindow::FromRenderView( process->GetID(), render_view_host->GetRoutingID()); if (window) - window->OverrideWebkitPrefs(url, prefs); + window->OverrideWebkitPrefs(prefs); } bool AtomBrowserClient::ShouldSwapBrowsingInstancesForNavigation( diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index f35dddac1238..828b3f78f78a 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -26,7 +26,6 @@ class AtomBrowserClient : public brightray::BrowserClient { content::AccessTokenStore* CreateAccessTokenStore() override; void ResourceDispatcherHostCreated() override; void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, - const GURL& url, content::WebPreferences* prefs) override; bool ShouldSwapBrowsingInstancesForNavigation( content::SiteInstance* site_instance, diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 739f1b3a2358..0576fec05761 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -435,8 +435,7 @@ void NativeWindow::AppendExtraCommandLineSwitches( } } -void NativeWindow::OverrideWebkitPrefs(const GURL& url, - content::WebPreferences* prefs) { +void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) { if (web_preferences_.IsEmpty()) return; diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index d7661bf7487d..b300fce3d7b3 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -192,7 +192,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate, // Called when renderer process is going to be started. void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id); - void OverrideWebkitPrefs(const GURL& url, content::WebPreferences* prefs); + void OverrideWebkitPrefs(content::WebPreferences* prefs); // Public API used by platform-dependent delegates and observers to send UI // related notifications. diff --git a/atom/browser/web_view_manager.cc b/atom/browser/web_view_manager.cc index 1fda008d0dc5..91124f911904 100644 --- a/atom/browser/web_view_manager.cc +++ b/atom/browser/web_view_manager.cc @@ -42,7 +42,8 @@ void WebViewManager::AddGuest(int guest_instance_id, webview_info_map_[guest_process_id] = info; // Map the element in embedder to guest. - ElementInstanceKey key(embedder, element_instance_id); + int owner_process_id = embedder->GetRenderProcessHost()->GetID(); + ElementInstanceKey key(owner_process_id, element_instance_id); element_instance_id_to_guest_map_[key] = guest_instance_id; } @@ -76,9 +77,9 @@ bool WebViewManager::GetInfo(int guest_process_id, WebViewInfo* webview_info) { } content::WebContents* WebViewManager::GetGuestByInstanceID( - content::WebContents* embedder, + int owner_process_id, int element_instance_id) { - ElementInstanceKey key(embedder, element_instance_id); + ElementInstanceKey key(owner_process_id, element_instance_id); if (!ContainsKey(element_instance_id_to_guest_map_, key)) return nullptr; diff --git a/atom/browser/web_view_manager.h b/atom/browser/web_view_manager.h index f87284c39e82..87f3c5699433 100644 --- a/atom/browser/web_view_manager.h +++ b/atom/browser/web_view_manager.h @@ -50,9 +50,8 @@ class WebViewManager : public content::BrowserPluginGuestManager { protected: // content::BrowserPluginGuestManager: - content::WebContents* GetGuestByInstanceID( - content::WebContents* embedder_web_contents, - int element_instance_id) override; + content::WebContents* GetGuestByInstanceID(int owner_process_id, + int element_instance_id) override; bool ForEachGuest(content::WebContents* embedder, const GuestCallback& callback) override; @@ -65,26 +64,25 @@ class WebViewManager : public content::BrowserPluginGuestManager { std::map web_contents_embdder_map_; struct ElementInstanceKey { - content::WebContents* owner_web_contents; + int embedder_process_id; int element_instance_id; - ElementInstanceKey(content::WebContents* owner_web_contents, - int element_instance_id) - : owner_web_contents(owner_web_contents), + ElementInstanceKey(int embedder_process_id, int element_instance_id) + : embedder_process_id(embedder_process_id), element_instance_id(element_instance_id) {} bool operator<(const ElementInstanceKey& other) const { - if (owner_web_contents != other.owner_web_contents) - return owner_web_contents < other.owner_web_contents; + if (embedder_process_id != other.embedder_process_id) + return embedder_process_id < other.embedder_process_id; return element_instance_id < other.element_instance_id; } bool operator==(const ElementInstanceKey& other) const { - return (owner_web_contents == other.owner_web_contents) && + return (embedder_process_id == other.embedder_process_id) && (element_instance_id == other.element_instance_id); } }; - // (web_contents, element_instance_id) => guest_instance_id + // (embedder_process_id, element_instance_id) => guest_instance_id std::map element_instance_id_to_guest_map_; typedef std::map WebViewInfoMap; diff --git a/atom/common/chrome_version.h b/atom/common/chrome_version.h index 1971756871b9..6b2ea8d91a45 100644 --- a/atom/common/chrome_version.h +++ b/atom/common/chrome_version.h @@ -8,7 +8,7 @@ #ifndef ATOM_COMMON_CHROME_VERSION_H_ #define ATOM_COMMON_CHROME_VERSION_H_ -#define CHROME_VERSION_STRING "41.0.2272.76" +#define CHROME_VERSION_STRING "42.0.2311.107" #define CHROME_VERSION "v" CHROME_VERSION_STRING #endif // ATOM_COMMON_CHROME_VERSION_H_ diff --git a/atom/common/platform_util_win.cc b/atom/common/platform_util_win.cc index 78fb0ca00540..1998b8873189 100644 --- a/atom/common/platform_util_win.cc +++ b/atom/common/platform_util_win.cc @@ -13,6 +13,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -128,7 +129,10 @@ void ShowItemInFolder(const base::FilePath& full_path) { } void OpenItem(const base::FilePath& full_path) { - ui::win::OpenItemViaShell(full_path); + if (base::DirectoryExists(full_path)) + ui::win::OpenFolderViaShell(full_path); + else + ui::win::OpenFileViaShell(full_path); } void OpenExternal(const GURL& url) { diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper.cc b/chromium_src/chrome/renderer/printing/print_web_view_helper.cc index 46718a0c546a..60158f6c1d4c 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper.cc +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper.cc @@ -425,8 +425,10 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient, virtual void didStopLoading(); // blink::WebFrameClient override: - virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent, - const blink::WebString& name); + virtual blink::WebFrame* createChildFrame( + blink::WebLocalFrame* parent, + const blink::WebString& name, + blink::WebSandboxFlags sandboxFlags); virtual void frameDetached(blink::WebFrame* frame); private: @@ -571,7 +573,8 @@ void PrepareFrameAndViewForPrint::didStopLoading() { blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame( blink::WebLocalFrame* parent, - const blink::WebString& name) { + const blink::WebString& name, + blink::WebSandboxFlags sandboxFlags) { blink::WebFrame* frame = blink::WebLocalFrame::create(this); parent->appendChild(frame); return frame; diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc b/chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc index 1fb3b260e0be..38bd9114d244 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc @@ -12,7 +12,6 @@ #include "printing/page_size_margins.h" #include "printing/pdf_metafile_skia.h" #include "skia/ext/platform_device.h" -#include "skia/ext/vector_canvas.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm b/chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm index e2ad3da5bc85..93fd06464b37 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm @@ -13,7 +13,6 @@ #include "printing/metafile_skia_wrapper.h" #include "printing/page_size_margins.h" #include "skia/ext/platform_device.h" -#include "skia/ext/vector_canvas.h" #include "third_party/WebKit/public/platform/WebCanvas.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc b/chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc index c4bd9648905b..f98ee5097cca 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc @@ -14,7 +14,6 @@ #include "printing/pdf_metafile_skia.h" #include "printing/units.h" #include "skia/ext/platform_device.h" -#include "skia/ext/vector_canvas.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" diff --git a/common.gypi b/common.gypi index 4ae5e9e77c00..c6f3320c0a5b 100644 --- a/common.gypi +++ b/common.gypi @@ -115,28 +115,29 @@ 'conditions': [ ['target_arch=="ia32"', { 'reference_symbols': [ - '_u_errorName_52', - '_ubidi_setPara_52', - '_ucsdet_getName_52', - '_ulocdata_close_52', - '_uregex_matches_52', - '_uscript_getCode_52', - '_usearch_setPattern_52', - '?createInstance@Transliterator@icu_52@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z', - '?nameToUnicodeUTF8@IDNA@icu_52@@UBEXABVStringPiece@2@AAVByteSink@2@AAVIDNAInfo@2@AAW4UErrorCode@@@Z', - '?kLineOffsetNotFound@Function@v8@@2HB', + '_u_errorName_54', + '_ubidi_setPara_54', + '_ucsdet_getName_54', + '_uidna_openUTS46_54', + '_ulocdata_close_54', + '_unorm_normalize_54', + '_uregex_matches_54', + '_uscript_getCode_54', + '_usearch_setPattern_54', + '?createInstance@Transliterator@icu_54@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z', ], }, { 'reference_symbols': [ - 'u_errorName_52', - 'ubidi_setPara_52', - 'ucsdet_getName_52', - 'uidna_openUTS46_52', - 'ulocdata_close_52', - 'uregex_matches_52', - 'uscript_getCode_52', - 'usearch_setPattern_52', - '?createInstance@Transliterator@icu_52@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z' + 'u_errorName_54', + 'ubidi_setPara_54', + 'ucsdet_getName_54', + 'uidna_openUTS46_54', + 'ulocdata_close_54', + 'unorm_normalize_54', + 'uregex_matches_54', + 'uscript_getCode_54', + 'usearch_setPattern_54', + '?createInstance@Transliterator@icu_54@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z', ], }], ], diff --git a/script/lib/config.py b/script/lib/config.py index 7fb314ac9a27..ed050590ff9d 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -7,7 +7,7 @@ import sys BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' -LIBCHROMIUMCONTENT_COMMIT = 'f1ad1412461ba3345a27cfe935ffc872dba0ac5b' +LIBCHROMIUMCONTENT_COMMIT = '0529dc17ca2f950b671cf12f82260cc397b4cebb' PLATFORM = { 'cygwin': 'win32', diff --git a/spec/api-app-spec.coffee b/spec/api-app-spec.coffee index 1c88c0277b30..4e6bda2ac1fe 100644 --- a/spec/api-app-spec.coffee +++ b/spec/api-app-spec.coffee @@ -22,4 +22,4 @@ describe 'app module', -> assert.equal app.getName(), 'Electron Test' app.setName 'test-name' assert.equal app.getName(), 'test-name' - app.setName 'Electron Test App' + app.setName 'Electron Test' diff --git a/vendor/brightray b/vendor/brightray index e2539f3550dd..685435ae679a 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit e2539f3550ddc58f1f4e826b5ff9691485003d39 +Subproject commit 685435ae679affcfcb095c546b3e884cbbc9f898