diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure index 9c617a80aa49..b5ac417b25fe 100644 --- a/build/moz.configure/bindgen.configure +++ b/build/moz.configure/bindgen.configure @@ -320,8 +320,6 @@ def basic_bindgen_cflags(host, target, is_unix, compiler_info, android_cflags): 'compiler': { 'msvc': { 'default': [ - # For compatibility with MSVC 2015 - '-fms-compatibility-version=19', # To enable the builtin __builtin_offsetof so that CRT wouldn't # use reinterpret_cast in offsetof() which is not allowed inside # static_assert(). diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 198bc3cb0eec..bd10811a84ab 100755 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -619,13 +619,6 @@ def check_compiler(compiler, language, target): elif info.type == 'clang-cl' and info.language_version != cxx14_version: append_flag('-std=c++14') - # We force clang-cl to emulate Visual C++ 2017 version 15.8.4 - msvc_version = '19.15.26726' - if info.type == 'clang-cl' and info.version != msvc_version: - # This flag is a direct clang-cl flag that doesn't need -Xclang, - # add it directly. - flags.append('-fms-compatibility-version=%s' % msvc_version) - # Check compiler target # -------------------------------------------------------------------- if not info.cpu or info.cpu != target.cpu: diff --git a/dom/base/ChromeUtils.cpp b/dom/base/ChromeUtils.cpp index 46f124a748e1..3d9c7abf264a 100644 --- a/dom/base/ChromeUtils.cpp +++ b/dom/base/ChromeUtils.cpp @@ -830,6 +830,11 @@ constexpr auto kSkipSelfHosted = JS::SavedFrameSelfHosted::Exclude; return duration.ToMilliseconds(); } +/* static */ void ChromeUtils::ResetLastExternalProtocolIframeAllowed( + GlobalObject& aGlobal) { + PopupBlocker::ResetLastExternalProtocolIframeAllowed(); +} + /* static */ void ChromeUtils::RegisterWindowActor( const GlobalObject& aGlobal, const nsAString& aName, const WindowActorOptions& aOptions, ErrorResult& aRv) { diff --git a/dom/base/ChromeUtils.h b/dom/base/ChromeUtils.h index f112c425a7c5..7e16a9d1b899 100644 --- a/dom/base/ChromeUtils.h +++ b/dom/base/ChromeUtils.h @@ -180,6 +180,8 @@ class ChromeUtils { static double LastExternalProtocolIframeAllowed(GlobalObject& aGlobal); + static void ResetLastExternalProtocolIframeAllowed(GlobalObject& aGlobal); + static void RegisterWindowActor(const GlobalObject& aGlobal, const nsAString& aName, const WindowActorOptions& aOptions, diff --git a/dom/base/PopupBlocker.cpp b/dom/base/PopupBlocker.cpp index 7a0bcfd3ed0e..ec8b9f695bb9 100644 --- a/dom/base/PopupBlocker.cpp +++ b/dom/base/PopupBlocker.cpp @@ -404,6 +404,10 @@ PopupBlocker::PopupControlState PopupBlocker::GetEventPopupControlState( return sLastAllowedExternalProtocolIFrameTimeStamp; } +/* static */ void PopupBlocker::ResetLastExternalProtocolIframeAllowed() { + sLastAllowedExternalProtocolIFrameTimeStamp = TimeStamp(); +} + } // namespace dom } // namespace mozilla diff --git a/dom/base/PopupBlocker.h b/dom/base/PopupBlocker.h index 1e7e486b35d5..4b410a3c770e 100644 --- a/dom/base/PopupBlocker.h +++ b/dom/base/PopupBlocker.h @@ -59,6 +59,9 @@ class PopupBlocker final { // Returns when the last external protocol iframe has been allowed. static TimeStamp WhenLastExternalProtocolIframeAllowed(); + // Reset the last external protocol iframe timestamp. + static void ResetLastExternalProtocolIframeAllowed(); + static void Initialize(); static void Shutdown(); }; diff --git a/dom/chrome-webidl/ChromeUtils.webidl b/dom/chrome-webidl/ChromeUtils.webidl index d31ae1ce1dc7..800fff2a6105 100644 --- a/dom/chrome-webidl/ChromeUtils.webidl +++ b/dom/chrome-webidl/ChromeUtils.webidl @@ -395,6 +395,12 @@ partial namespace ChromeUtils { [ChromeOnly] double lastExternalProtocolIframeAllowed(); + /** + * For testing purpose we need to reset this value. + */ + [ChromeOnly] + void resetLastExternalProtocolIframeAllowed(); + [ChromeOnly, Throws] void registerWindowActor(DOMString aName, WindowActorOptions aOptions); }; diff --git a/dom/html/test/test_external_protocol_iframe.html b/dom/html/test/test_external_protocol_iframe.html index b2daf5283c92..858cc6bab118 100644 --- a/dom/html/test/test_external_protocol_iframe.html +++ b/dom/html/test/test_external_protocol_iframe.html @@ -10,6 +10,11 @@
Click here to test this issue