WebKit Bugzilla
Attachment 339677 Details for
Bug 185232
: [Win] Use C++17 in MSVC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185232-20180506182040.patch (text/plain), 26.44 KB, created by
Yusuke Suzuki
on 2018-05-06 02:20:41 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-05-06 02:20:41 PDT
Size:
26.44 KB
patch
obsolete
>Subversion Revision: 231399 >diff --git a/Source/ThirdParty/ChangeLog b/Source/ThirdParty/ChangeLog >index 153819de1414589b4f8a48aaf66313b4bdbc281a..b390751bb13f098001ac280eb3aee660369b691d 100644 >--- a/Source/ThirdParty/ChangeLog >+++ b/Source/ThirdParty/ChangeLog >@@ -1,3 +1,30 @@ >+2018-05-06 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use std::tuple instead of std::tr1::tuple since std::tr1::tuple is removed in C++17 MSVC. >+ In a subsequent patch, we will upgrade gtest too. >+ >+ * gtest/include/gtest/internal/gtest-param-util-generated.h: >+ (testing::internal::CartesianProductHolder2::operator ParamGenerator< ::std::tuple<T1, T2> > const): >+ (testing::internal::CartesianProductHolder3::operator ParamGenerator< ::std::tuple<T1, T2, T3> > const): >+ (testing::internal::CartesianProductHolder4::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> > const): >+ (testing::internal::CartesianProductHolder5::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> > const): >+ (testing::internal::CartesianProductHolder6::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> > const): >+ (testing::internal::CartesianProductHolder7:: const): >+ (testing::internal::CartesianProductHolder8:: const): >+ (testing::internal::CartesianProductHolder9:: const): >+ (testing::internal::CartesianProductHolder10:: const): >+ (testing::internal::CartesianProductHolder2::operator ParamGenerator< ::std::tr1::tuple<T1, T2> > const): Deleted. >+ (testing::internal::CartesianProductHolder3::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> > const): Deleted. >+ (testing::internal::CartesianProductHolder4::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> > const): Deleted. >+ (testing::internal::CartesianProductHolder5::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> > const): Deleted. >+ (testing::internal::CartesianProductHolder6::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> > const): Deleted. >+ * gtest/include/gtest/internal/gtest-tuple.h: >+ > 2018-03-05 Don Olmstead <don.olmstead@sony.com> > > [CMake] Split JSC header copying into public and private targets >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index b2bea75c04d9732b15e5a64daf9d3a7cd65c2d11..f021417fa51ca8a5e191371fdeda993b4af97095 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-06 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Enable std::optional for MSVC. And disable some WebKit defined C++17 features for MSVC. >+ >+ * wtf/Optional.h: >+ * wtf/StdLibExtras.h: >+ > 2018-05-04 Tim Horton <timothy_horton@apple.com> > > Shift to a lower-level framework for simplifying URLs >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 7a6d26c79c8e0fb80e2b1ce1cdedae9cdf240bb1..479301a5e30f078810ea0dd88e61e5d5340bfc87 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-06 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Workaround for MSVC + /std:c++17. >+ >+ * Modules/geolocation/Coordinates.h: >+ (WebCore::Coordinates::isolatedCopy const): >+ > 2018-05-05 Sam Weinig <sam@webkit.org> > > Cleanup XMLHttpRequestUpload a little >diff --git a/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h b/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h >index ab4ab56625642d2558fd38b18ced06d0351ec1f4..62b5ae13e28e566b1e885127dbb07cd172a26f19 100644 >--- a/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h >+++ b/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h >@@ -38,7 +38,7 @@ > // and at most 10 arguments in Combine. Please contact > // googletestframework@googlegroups.com if you need more. > // Please note that the number of arguments to Combine is limited >-// by the maximum arity of the implementation of tr1::tuple which is >+// by the maximum arity of the implementation of tuple which is > // currently set at 10. > > #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ >@@ -2834,9 +2834,9 @@ class ValueArray50 { > // > template <typename T1, typename T2> > class CartesianProductGenerator2 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2> > { > public: >- typedef ::std::tr1::tuple<T1, T2> ParamType; >+ typedef ::std::tuple<T1, T2> ParamType; > > CartesianProductGenerator2(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2) >@@ -2949,9 +2949,9 @@ class CartesianProductGenerator2 > > template <typename T1, typename T2, typename T3> > class CartesianProductGenerator3 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3> ParamType; >+ typedef ::std::tuple<T1, T2, T3> ParamType; > > CartesianProductGenerator3(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3) >@@ -3081,9 +3081,9 @@ class CartesianProductGenerator3 > > template <typename T1, typename T2, typename T3, typename T4> > class CartesianProductGenerator4 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4> ParamType; > > CartesianProductGenerator4(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3232,9 +3232,9 @@ class CartesianProductGenerator4 > > template <typename T1, typename T2, typename T3, typename T4, typename T5> > class CartesianProductGenerator5 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5> ParamType; > > CartesianProductGenerator5(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3400,10 +3400,10 @@ class CartesianProductGenerator5 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6> > class CartesianProductGenerator6 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, > T6> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6> ParamType; > > CartesianProductGenerator6(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3586,10 +3586,10 @@ class CartesianProductGenerator6 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7> > class CartesianProductGenerator7 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; > > CartesianProductGenerator7(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3789,10 +3789,10 @@ class CartesianProductGenerator7 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8> > class CartesianProductGenerator8 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7, T8> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; > > CartesianProductGenerator8(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -4011,10 +4011,10 @@ class CartesianProductGenerator8 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9> > class CartesianProductGenerator9 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7, T8, T9> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; > > CartesianProductGenerator9(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -4250,10 +4250,10 @@ class CartesianProductGenerator9 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9, typename T10> > class CartesianProductGenerator10 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7, T8, T9, T10> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; > > CartesianProductGenerator10(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -4515,8 +4515,8 @@ class CartesianProductHolder2 { > CartesianProductHolder2(const Generator1& g1, const Generator2& g2) > : g1_(g1), g2_(g2) {} > template <typename T1, typename T2> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2> >( >+ operator ParamGenerator< ::std::tuple<T1, T2> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2> >( > new CartesianProductGenerator2<T1, T2>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_))); >@@ -4537,8 +4537,8 @@ CartesianProductHolder3(const Generator1& g1, const Generator2& g2, > const Generator3& g3) > : g1_(g1), g2_(g2), g3_(g3) {} > template <typename T1, typename T2, typename T3> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3> >( > new CartesianProductGenerator3<T1, T2, T3>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4562,8 +4562,8 @@ CartesianProductHolder4(const Generator1& g1, const Generator2& g2, > const Generator3& g3, const Generator4& g4) > : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} > template <typename T1, typename T2, typename T3, typename T4> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4> >( > new CartesianProductGenerator4<T1, T2, T3, T4>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4589,8 +4589,8 @@ CartesianProductHolder5(const Generator1& g1, const Generator2& g2, > const Generator3& g3, const Generator4& g4, const Generator5& g5) > : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >( > new CartesianProductGenerator5<T1, T2, T3, T4, T5>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4620,8 +4620,8 @@ CartesianProductHolder6(const Generator1& g1, const Generator2& g2, > : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >( > new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4653,9 +4653,9 @@ CartesianProductHolder7(const Generator1& g1, const Generator2& g2, > : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >( >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7> >( > new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4691,9 +4691,9 @@ CartesianProductHolder8(const Generator1& g1, const Generator2& g2, > g8_(g8) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, > T8> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( > new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4732,9 +4732,9 @@ CartesianProductHolder9(const Generator1& g1, const Generator2& g2, > g9_(g9) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9> >( > new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>( > static_cast<ParamGenerator<T1> >(g1_), >@@ -4776,9 +4776,9 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, > g9_(g9), g10_(g10) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9, typename T10> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9, T10> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9, T10> >( > new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9, > T10>( >diff --git a/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h b/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h >index 16178fc07af129af154871cc2d9b3a98d1d94ab4..c27f3a421d9c4971ede49cc332912d4a8360c5a5 100644 >--- a/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h >+++ b/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h >@@ -912,7 +912,7 @@ struct SameSizeTuplePrefixComparator<k, k> { > template <class Tuple1, class Tuple2> > static bool Eq(const Tuple1& t1, const Tuple2& t2) { > return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) && >- ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2); >+ ::std::get<k - 1>(t1) == ::std::get<k - 1>(t2); > } > }; > >diff --git a/Source/WTF/wtf/Optional.h b/Source/WTF/wtf/Optional.h >index 67ee27752ff908202b37ba85a71d1580f71b6101..22702ed168763fcbccd27e8b55eca5b79b03f87a 100644 >--- a/Source/WTF/wtf/Optional.h >+++ b/Source/WTF/wtf/Optional.h >@@ -47,7 +47,7 @@ > # include <wtf/Compiler.h> > # include <wtf/StdLibExtras.h> > >-#if !COMPILER(MSVC) && !PLATFORM(COCOA) && __has_include(<optional>) >+#if !PLATFORM(COCOA) && __has_include(<optional>) > # include <optional> > #else > >diff --git a/Source/WTF/wtf/StdLibExtras.h b/Source/WTF/wtf/StdLibExtras.h >index 49f2e2988d926bc56595ebc9a0ce927184087abe..676f9c6c0ee358e46291fc9ddfe83eb7e66933b8 100644 >--- a/Source/WTF/wtf/StdLibExtras.h >+++ b/Source/WTF/wtf/StdLibExtras.h >@@ -543,7 +543,7 @@ template<class B0, class B1, class B2, class... Bn> struct wtf_conjunction_impl< > template<class... _Args> struct conjunction : wtf_conjunction_impl<_Args...> { }; > #endif > >-#if __cplusplus < 201703L >+#if __cplusplus < 201703L && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER < 190023918) > > // These are inline variable for C++17 and later. > #define __IN_PLACE_INLINE_VARIABLE static const >diff --git a/Source/WebCore/Modules/geolocation/Coordinates.h b/Source/WebCore/Modules/geolocation/Coordinates.h >index 0b73cf681b4c713328e786b89569e27283d63956..e1975bea062abb2e18ac3ba9ab15e89572fd74ce 100644 >--- a/Source/WebCore/Modules/geolocation/Coordinates.h >+++ b/Source/WebCore/Modules/geolocation/Coordinates.h >@@ -41,7 +41,7 @@ class Coordinates : public RefCounted<Coordinates> { > > Ref<Coordinates> isolatedCopy() const > { >- return Coordinates::create( GeolocationPosition { m_position }); >+ return Coordinates::create(GeolocationPosition(m_position)); > } > > double latitude() const { return m_position.latitude; } >diff --git a/Source/cmake/OptionsMSVC.cmake b/Source/cmake/OptionsMSVC.cmake >index 7f378ff8aa9f76cfbc6b6111f9f983d62f636605..9f9e34eac287529741ec6673917f6bd50807c916 100644 >--- a/Source/cmake/OptionsMSVC.cmake >+++ b/Source/cmake/OptionsMSVC.cmake >@@ -29,6 +29,10 @@ endif () > # Turn off certain link features > add_compile_options(/Gy- /openmp- /GF-) > >+# Enable C++17 >+# https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version >+add_compile_options(/std:c++17) >+ > # Specify the source code encoding > add_compile_options(/utf-8 /validate-charset) > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 5a2e27668cb51f1d50f98892aee48fc9c862c56f..c5441296de44193d591a8e8133c69c28f7c34aed 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,25 @@ >+2018-05-06 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Do not use `using namespace std;`. In C++17, we have std::byte. This "byte" >+ conflicts with ::byte defined in Windows' header. >+ >+ * DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp: >+ (WindowedPluginTest::WindowedPluginTest): >+ * DumpRenderTree/win/AccessibilityControllerWin.cpp: >+ (logEventProc): >+ (stringEvent): >+ (AccessibilityController::winNotificationReceived): >+ * DumpRenderTree/win/TextInputController.h: >+ * DumpRenderTree/win/TextInputControllerWin.cpp: >+ (TextInputController::markedRange): >+ (TextInputController::firstRectForCharacterRange): >+ (TextInputController::selectedRange): >+ > 2018-05-04 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart >diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp >index 2e75ca162bcb3d874e5f2f30223264134490bc0b..887819260d26c5d56de023e8d3d59399db9260d9 100644 >--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp >+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp >@@ -25,11 +25,9 @@ > > #include "WindowedPluginTest.h" > >-using namespace std; >- > static const wchar_t instancePointerProperty[] = L"org.webkit.TestNetscapePlugin.WindowedPluginTest.InstancePointer"; > >-WindowedPluginTest::WindowedPluginTest(NPP npp, const string& identifier) >+WindowedPluginTest::WindowedPluginTest(NPP npp, const std::string& identifier) > : PluginTest(npp, identifier) > , m_window(0) > , m_originalWndProc(0) >diff --git a/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp b/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp >index cf5d246ff1f91507c86a02f74a0b98b6a26e3e9b..b98a028847dcc07854e689cd9b0228de9284b8ea 100644 >--- a/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp >+++ b/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp >@@ -42,8 +42,6 @@ > #include <wtf/Assertions.h> > #include <wtf/text/AtomicString.h> > >-using namespace std; >- > AccessibilityController::AccessibilityController() > : m_focusEventHook(0) > , m_scrollingStartEventHook(0) >@@ -189,7 +187,7 @@ static void CALLBACK logEventProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG id > _bstr_t nameBSTR; > hr = parentObject->get_accName(vChild, &nameBSTR.GetBSTR()); > ASSERT(SUCCEEDED(hr)); >- wstring name(nameBSTR, nameBSTR.length()); >+ std::wstring name(nameBSTR, nameBSTR.length()); > > switch (event) { > case EVENT_OBJECT_FOCUS: >@@ -204,7 +202,7 @@ static void CALLBACK logEventProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG id > _bstr_t valueBSTR; > hr = parentObject->get_accValue(vChild, &valueBSTR.GetBSTR()); > ASSERT(SUCCEEDED(hr)); >- wstring value(valueBSTR, valueBSTR.length()); >+ std::wstring value(valueBSTR, valueBSTR.length()); > > fprintf(testResult, "Received value change event for object '%S', value '%S'.\n", name.c_str(), value.c_str()); > break; >@@ -304,7 +302,7 @@ void AccessibilityController::setLogAccessibilityEvents(bool logAccessibilityEve > ASSERT(m_allEventsHook); > } > >-static string stringEvent(DWORD event) >+static std::string stringEvent(DWORD event) > { > switch(event) { > case EVENT_OBJECT_VALUECHANGE: >@@ -341,7 +339,7 @@ void AccessibilityController::removeNotificationListener() > { > } > >-void AccessibilityController::winNotificationReceived(PlatformUIElement element, const string& eventName) >+void AccessibilityController::winNotificationReceived(PlatformUIElement element, const std::string& eventName) > { > for (auto& slot : m_notificationListeners) { > COMPtr<IServiceProvider> thisServiceProvider(Query, slot.key); >diff --git a/Tools/DumpRenderTree/win/TextInputController.h b/Tools/DumpRenderTree/win/TextInputController.h >index 761b57d9a8b751414a12c9b43b0e231f71c8063d..25c348e8110afe117de4d8c95c72bbb536f614b5 100644 >--- a/Tools/DumpRenderTree/win/TextInputController.h >+++ b/Tools/DumpRenderTree/win/TextInputController.h >@@ -35,8 +35,6 @@ > #include <JavaScriptCore/JSValueRef.h> > #include <vector> > >-using namespace std; >- > class TextInputController { > public: > void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception); >@@ -44,10 +42,10 @@ class TextInputController { > void setMarkedText(JSStringRef text, unsigned int from, unsigned int length); > bool hasMarkedText(); > void unmarkText(); >- vector<int> markedRange(); >+ std::vector<int> markedRange(); > void insertText(JSStringRef text); >- vector<int> firstRectForCharacterRange(unsigned int start, unsigned int length); >- vector<int> selectedRange(); >+ std::vector<int> firstRectForCharacterRange(unsigned int start, unsigned int length); >+ std::vector<int> selectedRange(); > > private: > static JSClassRef getJSClass(); >diff --git a/Tools/DumpRenderTree/win/TextInputControllerWin.cpp b/Tools/DumpRenderTree/win/TextInputControllerWin.cpp >index 199f684d366649b303ec985b4e90459910538450..67e5c69d1f7af66803b5ede64ac129120f18bb8e 100644 >--- a/Tools/DumpRenderTree/win/TextInputControllerWin.cpp >+++ b/Tools/DumpRenderTree/win/TextInputControllerWin.cpp >@@ -36,8 +36,6 @@ > #include <comutil.h> > #include <string> > >-using namespace std; >- > void TextInputController::setMarkedText(JSStringRef text, unsigned int from, unsigned int length) > { > COMPtr<IWebView> webView; >@@ -82,10 +80,10 @@ void TextInputController::unmarkText() > viewPrivate->confirmCompositionForTesting(empty); > } > >-vector<int> TextInputController::markedRange() >+std::vector<int> TextInputController::markedRange() > { > // empty vector >- vector<int> result; >+ std::vector<int> result; > > COMPtr<IWebView> webView; > if (FAILED(frame->webView(&webView))) >@@ -121,10 +119,10 @@ void TextInputController::insertText(JSStringRef text) > viewPrivate->confirmCompositionForTesting(bstr); > } > >-vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, unsigned int length) >+std::vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, unsigned int length) > { > // empty vector >- vector<int> result; >+ std::vector<int> result; > > COMPtr<IWebView> webView; > if (FAILED(frame->webView(&webView))) >@@ -146,10 +144,10 @@ vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, > return result; > } > >-vector<int> TextInputController::selectedRange() >+std::vector<int> TextInputController::selectedRange() > { > // empty vector >- vector<int> result; >+ std::vector<int> result; > > COMPtr<IWebView> webView; > if (FAILED(frame->webView(&webView))) >diff --git a/ChangeLog b/ChangeLog >index 85d1fcaa499532312d706865e020a60cf2c79ce4..39a8e29dd7c99ddaa5fd7811c044177becc411d4 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,14 @@ >+2018-05-06 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use /std:c++17 option. >+ >+ * Source/cmake/OptionsMSVC.cmake: >+ > 2018-05-02 Valerie R Young <valerie@bocoup.com> > > test262/Runner.pm: save summary to file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185232
:
339374
|
339375
|
339378
|
339386
|
339395
|
339400
|
339499
|
339675
|
339677
|
339678
|
339679
|
339680
|
339682
|
339685
|
340336