Changeset 231852 in webkit


Ignore:
Timestamp:
May 16, 2018 10:50:38 AM (6 years ago)
Author:
Yusuke Suzuki
Message:

[Win] Use C++17 in MSVC
https://bugs.webkit.org/show_bug.cgi?id=185232

Reviewed by Alex Christensen.

.:

Use /std:c++17 option.

  • Source/cmake/OptionsMSVC.cmake:

Source/ThirdParty:

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:

Source/WebCore:

Workaround for MSVC + /std:c++17.

  • Modules/geolocation/Coordinates.h:

(WebCore::Coordinates::isolatedCopy const):

Source/WTF:

Disable some WebKit defined C++17 features for MSVC.

  • wtf/StdLibExtras.h:

Tools:

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.cpp:

(markedRangeCallback):
(firstRectForCharacterRangeCallback):
(selectedRangeCallback):

  • DumpRenderTree/win/TextInputController.h:
  • DumpRenderTree/win/TextInputControllerWin.cpp:

(TextInputController::markedRange):
(TextInputController::firstRectForCharacterRange):
(TextInputController::selectedRange):

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r231843 r231852  
     12018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [Win] Use C++17 in MSVC
     4        https://bugs.webkit.org/show_bug.cgi?id=185232
     5
     6        Reviewed by Alex Christensen.
     7
     8        Use /std:c++17 option.
     9
     10        * Source/cmake/OptionsMSVC.cmake:
     11
    1122018-05-16  Alberto Garcia  <berto@igalia.com>
    213
  • trunk/Source/ThirdParty/ChangeLog

    r231661 r231852  
     12018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [Win] Use C++17 in MSVC
     4        https://bugs.webkit.org/show_bug.cgi?id=185232
     5
     6        Reviewed by Alex Christensen.
     7
     8        Use std::tuple instead of std::tr1::tuple since std::tr1::tuple is removed in C++17 MSVC.
     9        In a subsequent patch, we will upgrade gtest too.
     10
     11        * gtest/include/gtest/internal/gtest-param-util-generated.h:
     12        (testing::internal::CartesianProductHolder2::operator ParamGenerator< ::std::tuple<T1, T2> > const):
     13        (testing::internal::CartesianProductHolder3::operator ParamGenerator< ::std::tuple<T1, T2, T3> > const):
     14        (testing::internal::CartesianProductHolder4::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> > const):
     15        (testing::internal::CartesianProductHolder5::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> > const):
     16        (testing::internal::CartesianProductHolder6::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> > const):
     17        (testing::internal::CartesianProductHolder7:: const):
     18        (testing::internal::CartesianProductHolder8:: const):
     19        (testing::internal::CartesianProductHolder9:: const):
     20        (testing::internal::CartesianProductHolder10:: const):
     21        (testing::internal::CartesianProductHolder2::operator ParamGenerator< ::std::tr1::tuple<T1, T2> > const): Deleted.
     22        (testing::internal::CartesianProductHolder3::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> > const): Deleted.
     23        (testing::internal::CartesianProductHolder4::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> > const): Deleted.
     24        (testing::internal::CartesianProductHolder5::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> > const): Deleted.
     25        (testing::internal::CartesianProductHolder6::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> > const): Deleted.
     26        * gtest/include/gtest/internal/gtest-tuple.h:
     27
    1282018-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
    229
  • trunk/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h

    r95901 r231852  
    3939// googletestframework@googlegroups.com if you need more.
    4040// Please note that the number of arguments to Combine is limited
    41 // by the maximum arity of the implementation of tr1::tuple which is
     41// by the maximum arity of the implementation of tuple which is
    4242// currently set at 10.
    4343
     
    28352835template <typename T1, typename T2>
    28362836class CartesianProductGenerator2
    2837     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > {
    2838  public:
    2839   typedef ::std::tr1::tuple<T1, T2> ParamType;
     2837    : public ParamGeneratorInterface< ::std::tuple<T1, T2> > {
     2838 public:
     2839  typedef ::std::tuple<T1, T2> ParamType;
    28402840
    28412841  CartesianProductGenerator2(const ParamGenerator<T1>& g1,
     
    29502950template <typename T1, typename T2, typename T3>
    29512951class CartesianProductGenerator3
    2952     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > {
    2953  public:
    2954   typedef ::std::tr1::tuple<T1, T2, T3> ParamType;
     2952    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3> > {
     2953 public:
     2954  typedef ::std::tuple<T1, T2, T3> ParamType;
    29552955
    29562956  CartesianProductGenerator3(const ParamGenerator<T1>& g1,
     
    30823082template <typename T1, typename T2, typename T3, typename T4>
    30833083class CartesianProductGenerator4
    3084     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > {
    3085  public:
    3086   typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;
     3084    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4> > {
     3085 public:
     3086  typedef ::std::tuple<T1, T2, T3, T4> ParamType;
    30873087
    30883088  CartesianProductGenerator4(const ParamGenerator<T1>& g1,
     
    32333233template <typename T1, typename T2, typename T3, typename T4, typename T5>
    32343234class CartesianProductGenerator5
    3235     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > {
    3236  public:
    3237   typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;
     3235    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5> > {
     3236 public:
     3237  typedef ::std::tuple<T1, T2, T3, T4, T5> ParamType;
    32383238
    32393239  CartesianProductGenerator5(const ParamGenerator<T1>& g1,
     
    34013401    typename T6>
    34023402class CartesianProductGenerator6
    3403     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,
     3403    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5,
    34043404        T6> > {
    34053405 public:
    3406   typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;
     3406  typedef ::std::tuple<T1, T2, T3, T4, T5, T6> ParamType;
    34073407
    34083408  CartesianProductGenerator6(const ParamGenerator<T1>& g1,
     
    35873587    typename T6, typename T7>
    35883588class CartesianProductGenerator7
    3589     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
     3589    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6,
    35903590        T7> > {
    35913591 public:
    3592   typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
     3592  typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
    35933593
    35943594  CartesianProductGenerator7(const ParamGenerator<T1>& g1,
     
    37903790    typename T6, typename T7, typename T8>
    37913791class CartesianProductGenerator8
    3792     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
     3792    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6,
    37933793        T7, T8> > {
    37943794 public:
    3795   typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
     3795  typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
    37963796
    37973797  CartesianProductGenerator8(const ParamGenerator<T1>& g1,
     
    40124012    typename T6, typename T7, typename T8, typename T9>
    40134013class CartesianProductGenerator9
    4014     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
     4014    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6,
    40154015        T7, T8, T9> > {
    40164016 public:
    4017   typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
     4017  typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
    40184018
    40194019  CartesianProductGenerator9(const ParamGenerator<T1>& g1,
     
    42514251    typename T6, typename T7, typename T8, typename T9, typename T10>
    42524252class CartesianProductGenerator10
    4253     : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
     4253    : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6,
    42544254        T7, T8, T9, T10> > {
    42554255 public:
    4256   typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
     4256  typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
    42574257
    42584258  CartesianProductGenerator10(const ParamGenerator<T1>& g1,
     
    45164516      : g1_(g1), g2_(g2) {}
    45174517  template <typename T1, typename T2>
    4518   operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {
    4519     return ParamGenerator< ::std::tr1::tuple<T1, T2> >(
     4518  operator ParamGenerator< ::std::tuple<T1, T2> >() const {
     4519    return ParamGenerator< ::std::tuple<T1, T2> >(
    45204520        new CartesianProductGenerator2<T1, T2>(
    45214521        static_cast<ParamGenerator<T1> >(g1_),
     
    45384538      : g1_(g1), g2_(g2), g3_(g3) {}
    45394539  template <typename T1, typename T2, typename T3>
    4540   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const {
    4541     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >(
     4540  operator ParamGenerator< ::std::tuple<T1, T2, T3> >() const {
     4541    return ParamGenerator< ::std::tuple<T1, T2, T3> >(
    45424542        new CartesianProductGenerator3<T1, T2, T3>(
    45434543        static_cast<ParamGenerator<T1> >(g1_),
     
    45634563      : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
    45644564  template <typename T1, typename T2, typename T3, typename T4>
    4565   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const {
    4566     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >(
     4565  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> >() const {
     4566    return ParamGenerator< ::std::tuple<T1, T2, T3, T4> >(
    45674567        new CartesianProductGenerator4<T1, T2, T3, T4>(
    45684568        static_cast<ParamGenerator<T1> >(g1_),
     
    45904590      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
    45914591  template <typename T1, typename T2, typename T3, typename T4, typename T5>
    4592   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const {
    4593     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >(
     4592  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >() const {
     4593    return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >(
    45944594        new CartesianProductGenerator5<T1, T2, T3, T4, T5>(
    45954595        static_cast<ParamGenerator<T1> >(g1_),
     
    46214621  template <typename T1, typename T2, typename T3, typename T4, typename T5,
    46224622      typename T6>
    4623   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const {
    4624     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >(
     4623  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >() const {
     4624    return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >(
    46254625        new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>(
    46264626        static_cast<ParamGenerator<T1> >(g1_),
     
    46544654  template <typename T1, typename T2, typename T3, typename T4, typename T5,
    46554655      typename T6, typename T7>
    4656   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
     4656  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6,
    46574657      T7> >() const {
    4658     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >(
     4658    return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7> >(
    46594659        new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>(
    46604660        static_cast<ParamGenerator<T1> >(g1_),
     
    46924692  template <typename T1, typename T2, typename T3, typename T4, typename T5,
    46934693      typename T6, typename T7, typename T8>
    4694   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,
     4694  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7,
    46954695      T8> >() const {
    4696     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(
     4696    return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(
    46974697        new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>(
    46984698        static_cast<ParamGenerator<T1> >(g1_),
     
    47334733  template <typename T1, typename T2, typename T3, typename T4, typename T5,
    47344734      typename T6, typename T7, typename T8, typename T9>
    4735   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
     4735  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
    47364736      T9> >() const {
    4737     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
     4737    return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
    47384738        T9> >(
    47394739        new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
     
    47774777  template <typename T1, typename T2, typename T3, typename T4, typename T5,
    47784778      typename T6, typename T7, typename T8, typename T9, typename T10>
    4779   operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
     4779  operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
    47804780      T9, T10> >() const {
    4781     return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
     4781    return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
    47824782        T9, T10> >(
    47834783        new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
  • trunk/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h

    r95901 r231852  
    913913  static bool Eq(const Tuple1& t1, const Tuple2& t2) {
    914914    return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&
    915         ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);
     915        ::std::get<k - 1>(t1) == ::std::get<k - 1>(t2);
    916916  }
    917917};
  • trunk/Source/WTF/ChangeLog

    r231762 r231852  
     12018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [Win] Use C++17 in MSVC
     4        https://bugs.webkit.org/show_bug.cgi?id=185232
     5
     6        Reviewed by Alex Christensen.
     7
     8        Disable some WebKit defined C++17 features for MSVC.
     9
     10        * wtf/StdLibExtras.h:
     11
    1122018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
    213
  • trunk/Source/WTF/wtf/StdLibExtras.h

    r231753 r231852  
    546546// Provide in_place_t when not building with -std=c++17, or when building with libstdc++ 6
    547547// (which doesn't define the _GLIBCXX_RELEASE macro that's been introduced in libstdc++ 7).
    548 #if __cplusplus < 201703L || (defined(__GLIBCXX__) && !defined(_GLIBCXX_RELEASE))
     548#if (__cplusplus < 201703L || (defined(__GLIBCXX__) && !defined(_GLIBCXX_RELEASE))) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER < 190023918)
    549549
    550550// These are inline variable for C++17 and later.
  • trunk/Source/WebCore/ChangeLog

    r231849 r231852  
     12018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [Win] Use C++17 in MSVC
     4        https://bugs.webkit.org/show_bug.cgi?id=185232
     5
     6        Reviewed by Alex Christensen.
     7
     8        Workaround for MSVC + /std:c++17.
     9
     10        * Modules/geolocation/Coordinates.h:
     11        (WebCore::Coordinates::isolatedCopy const):
     12
    1132018-05-16  Chris Nardi  <cnardi@chromium.org>
    214
  • trunk/Source/WebCore/Modules/geolocation/Coordinates.h

    r223211 r231852  
    4242    Ref<Coordinates> isolatedCopy() const
    4343    {
    44         return Coordinates::create( GeolocationPosition { m_position });
     44        return Coordinates::create(GeolocationPosition(m_position));
    4545    }
    4646
  • trunk/Source/cmake/OptionsMSVC.cmake

    r225563 r231852  
    2929# Turn off certain link features
    3030add_compile_options(/Gy- /openmp- /GF-)
     31
     32# Enable C++17
     33# https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version
     34add_compile_options(/std:c++17)
    3135
    3236# Specify the source code encoding
  • trunk/Tools/ChangeLog

    r231850 r231852  
     12018-05-14  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [Win] Use C++17 in MSVC
     4        https://bugs.webkit.org/show_bug.cgi?id=185232
     5
     6        Reviewed by Alex Christensen.
     7
     8        Do not use `using namespace std;`. In C++17, we have std::byte. This "byte"
     9        conflicts with ::byte defined in Windows' header.
     10
     11        * DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp:
     12        (WindowedPluginTest::WindowedPluginTest):
     13        * DumpRenderTree/win/AccessibilityControllerWin.cpp:
     14        (logEventProc):
     15        (stringEvent):
     16        (AccessibilityController::winNotificationReceived):
     17        * DumpRenderTree/win/TextInputController.cpp:
     18        (markedRangeCallback):
     19        (firstRectForCharacterRangeCallback):
     20        (selectedRangeCallback):
     21        * DumpRenderTree/win/TextInputController.h:
     22        * DumpRenderTree/win/TextInputControllerWin.cpp:
     23        (TextInputController::markedRange):
     24        (TextInputController::firstRectForCharacterRange):
     25        (TextInputController::selectedRange):
     26
    1272018-05-16  Sihui Liu  <sihui_liu@apple.com>
    228
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp

    r86157 r231852  
    2626#include "WindowedPluginTest.h"
    2727
    28 using namespace std;
    29 
    3028static const wchar_t instancePointerProperty[] = L"org.webkit.TestNetscapePlugin.WindowedPluginTest.InstancePointer";
    3129
    32 WindowedPluginTest::WindowedPluginTest(NPP npp, const string& identifier)
     30WindowedPluginTest::WindowedPluginTest(NPP npp, const std::string& identifier)
    3331    : PluginTest(npp, identifier)
    3432    , m_window(0)
  • trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp

    r222194 r231852  
    4343#include <wtf/text/AtomicString.h>
    4444
    45 using namespace std;
    46 
    4745AccessibilityController::AccessibilityController()
    4846    : m_focusEventHook(0)
     
    190188    hr = parentObject->get_accName(vChild, &nameBSTR.GetBSTR());
    191189    ASSERT(SUCCEEDED(hr));
    192     wstring name(nameBSTR, nameBSTR.length());
     190    std::wstring name(nameBSTR, nameBSTR.length());
    193191
    194192    switch (event) {
     
    205203            hr = parentObject->get_accValue(vChild, &valueBSTR.GetBSTR());
    206204            ASSERT(SUCCEEDED(hr));
    207             wstring value(valueBSTR, valueBSTR.length());
     205            std::wstring value(valueBSTR, valueBSTR.length());
    208206
    209207            fprintf(testResult, "Received value change event for object '%S', value '%S'.\n", name.c_str(), value.c_str());
     
    305303}
    306304
    307 static string stringEvent(DWORD event)
     305static std::string stringEvent(DWORD event)
    308306{
    309307    switch(event) {
     
    342340}
    343341
    344 void AccessibilityController::winNotificationReceived(PlatformUIElement element, const string& eventName)
     342void AccessibilityController::winNotificationReceived(PlatformUIElement element, const std::string& eventName)
    345343{
    346344    for (auto& slot : m_notificationListeners) {
  • trunk/Tools/DumpRenderTree/win/TextInputController.cpp

    r185745 r231852  
    8181    TextInputController* controller = static_cast<TextInputController*>(JSObjectGetPrivate(thisObject));
    8282    if (controller) {
    83         vector<int> range = controller->markedRange();
     83        std::vector<int> range = controller->markedRange();
    8484        if (range.size() == 2) {
    8585            JSValueRef argumentsArrayValues[] = { JSValueMakeNumber(context, range[0]), JSValueMakeNumber(context, range[1]) };
     
    123123
    124124    if (controller) {
    125         vector<int> rect = controller->firstRectForCharacterRange(start, length);
     125        std::vector<int> rect = controller->firstRectForCharacterRange(start, length);
    126126        if (rect.size() == 4) {
    127127            JSValueRef argumentsArrayValues[] =
     
    146146
    147147    if (controller) {
    148         vector<int> rect = controller->selectedRange();
     148        std::vector<int> rect = controller->selectedRange();
    149149        if (rect.size() == 2) {
    150150            JSValueRef argumentsArrayValues[] = {
  • trunk/Tools/DumpRenderTree/win/TextInputController.h

    r208289 r231852  
    3636#include <vector>
    3737
    38 using namespace std;
    39 
    4038class TextInputController {
    4139public:
     
    4543    bool hasMarkedText();
    4644    void unmarkText();
    47     vector<int> markedRange();
     45    std::vector<int> markedRange();
    4846    void insertText(JSStringRef text);
    49     vector<int> firstRectForCharacterRange(unsigned int start, unsigned int length);
    50     vector<int> selectedRange();
     47    std::vector<int> firstRectForCharacterRange(unsigned int start, unsigned int length);
     48    std::vector<int> selectedRange();
    5149
    5250private:   
  • trunk/Tools/DumpRenderTree/win/TextInputControllerWin.cpp

    r222194 r231852  
    3636#include <comutil.h>
    3737#include <string>
    38 
    39 using namespace std;
    4038
    4139void TextInputController::setMarkedText(JSStringRef text, unsigned int from, unsigned int length)
     
    8381}
    8482
    85 vector<int> TextInputController::markedRange()
     83std::vector<int> TextInputController::markedRange()
    8684{
    8785    // empty vector
    88     vector<int> result;
     86    std::vector<int> result;
    8987
    9088    COMPtr<IWebView> webView;
     
    122120}
    123121
    124 vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, unsigned int length)
     122std::vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, unsigned int length)
    125123{
    126124    // empty vector
    127     vector<int> result;
     125    std::vector<int> result;
    128126
    129127    COMPtr<IWebView> webView;
     
    147145}
    148146
    149 vector<int> TextInputController::selectedRange()
     147std::vector<int> TextInputController::selectedRange()
    150148{
    151149    // empty vector
    152     vector<int> result;
     150    std::vector<int> result;
    153151
    154152    COMPtr<IWebView> webView;
Note: See TracChangeset for help on using the changeset viewer.