diff --git a/atom.gyp b/atom.gyp index 3a08bd070572..7aa21a9d5845 100644 --- a/atom.gyp +++ b/atom.gyp @@ -550,6 +550,8 @@ 'vendor/brightray/vendor/download/libchromiumcontent/src/v8/include', # The `node.h` is using `#include"ares.h"`. 'vendor/node/deps/cares/include', + # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`. + 'vendor/brightray/vendor/download/libchromiumcontent/src/third_party/WebKit/Source', ], 'direct_dependent_settings': { 'include_dirs': [ diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 827dbe4e159c..4a5d2d968bed 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -87,8 +87,8 @@ void AtomBrowserClient::OverrideWebkitPrefs( prefs->allow_universal_access_from_file_urls = true; prefs->allow_file_access_from_file_urls = true; prefs->experimental_webgl_enabled = true; - prefs->allow_displaying_insecure_content = true; - prefs->allow_running_insecure_content = true; + prefs->allow_displaying_insecure_content = false; + prefs->allow_running_insecure_content = false; // Turn off web security for devtools. if (url.SchemeIs("chrome-devtools")) { diff --git a/atom/common/node_includes.h b/atom/common/node_includes.h index c2594122be7d..80567cbd49b4 100644 --- a/atom/common/node_includes.h +++ b/atom/common/node_includes.h @@ -7,6 +7,7 @@ // Include common headers for using node APIs. +#undef ASSERT #undef CHECK #undef CHECK_EQ #undef CHECK_NE @@ -15,6 +16,7 @@ #undef CHECK_LE #undef CHECK_LT #undef DISALLOW_COPY_AND_ASSIGN +#undef NO_RETURN #undef debug_string // This is defined in OS X 10.9 SDK in AssertMacros.h. #include "vendor/node/src/env.h" #include "vendor/node/src/env-inl.h" diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index 7d43428f4d05..bf2cd54acbe3 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -4,6 +4,11 @@ #include "atom/renderer/api/atom_api_web_frame.h" +// This defines are required by SchemeRegistry.h. +#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE) // NOLINT +#define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE) // NOLINT +#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE) // NOLINT + #include "atom/common/native_mate_converters/string16_converter.h" #include "atom/renderer/api/atom_api_spell_check_client.h" #include "content/public/renderer/render_frame.h" @@ -12,9 +17,28 @@ #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebView.h" +#include "third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h" #include "atom/common/node_includes.h" +namespace mate { + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, + v8::Handle val, + WTF::String* out) { + if (!val->IsString()) + return false; + + v8::String::Value s(val); + *out = WTF::String(reinterpret_cast(*s), s.length()); + return true; + } +}; + +} // namespace mate + namespace atom { namespace api { @@ -82,7 +106,9 @@ mate::ObjectTemplateBuilder WebFrame::GetObjectTemplateBuilder( .SetMethod("registerEmbedderCustomElement", &WebFrame::RegisterEmbedderCustomElement) .SetMethod("attachGuest", &WebFrame::AttachGuest) - .SetMethod("setSpellCheckProvider", &WebFrame::SetSpellCheckProvider); + .SetMethod("setSpellCheckProvider", &WebFrame::SetSpellCheckProvider) + .SetMethod("registerUrlSchemeAsSecure", + &blink::SchemeRegistry::registerURLSchemeAsSecure); } // static diff --git a/docs/api/chrome-command-line-switches.md b/docs/api/chrome-command-line-switches.md index d9f55056d525..d17e7a9cd9b6 100644 --- a/docs/api/chrome-command-line-switches.md +++ b/docs/api/chrome-command-line-switches.md @@ -57,3 +57,7 @@ Like `--host-rules` but these `rules` only apply to the host resolver. [app]: app.md [append-switch]: app.md#appcommandlineappendswitchswitch-value [ready]: app.md#event-ready + +## --ignore-certificate-errors + +Ignore certificate related errors. diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index f5bdd695a3cf..73b9ee50577f 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -53,4 +53,14 @@ require('web-frame').setSpellCheckProvider("en-US", true, { }); ``` +## webFrame.registerUrlSchemeAsSecure(scheme) + +* `scheme` String + +Sets the `scheme` as secure scheme. + +Secure schemes do not trigger mixed content warnings. For example, `https` and +`data` are secure schemes because they cannot be corrupted by active network +attackers. + [spellchecker]: https://github.com/atom/node-spellchecker diff --git a/script/lib/config.py b/script/lib/config.py index 0558c248b99a..6619123a83a8 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -4,7 +4,7 @@ import platform import sys BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' -LIBCHROMIUMCONTENT_COMMIT = '55efd338101e08691560192b2be0f9c3b1b0eb72' +LIBCHROMIUMCONTENT_COMMIT = 'fba5addae75d944d62a8bd5f4fd23c2929405c83' ARCH = { 'cygwin': '32bit', diff --git a/vendor/brightray b/vendor/brightray index bae4765d993c..1eb88b037d99 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit bae4765d993cda6507829961bef5edc59028edca +Subproject commit 1eb88b037d99ca1ca7708f30b47f158d9c9639e6