Unreviewed, rolling out r242702.
authortsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2019 16:25:41 +0000 (16:25 +0000)
committertsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2019 16:25:41 +0000 (16:25 +0000)
Broke High Sierra builders.

Reverted changeset:

"Add utility function to allow easy reverse range-based
iteration of a container"
https://bugs.webkit.org/show_bug.cgi?id=195542
https://trac.webkit.org/changeset/242702

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/IteratorRange.h
Tools/ChangeLog
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WTF/IteratorRange.cpp [deleted file]

index 4fc1fd7..2247b2d 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-11  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, rolling out r242702.
+
+        Broke High Sierra builders.
+
+        Reverted changeset:
+
+        "Add utility function to allow easy reverse range-based
+        iteration of a container"
+        https://bugs.webkit.org/show_bug.cgi?id=195542
+        https://trac.webkit.org/changeset/242702
+
 2019-03-11  Sam Weinig  <sam@webkit.org>
 
         Add utility function to allow easy reverse range-based iteration of a container
index 5d8fe4d..393fceb 100644 (file)
@@ -25,8 +25,6 @@
 
 #pragma once
 
-#include <iterator>
-
 namespace WTF {
 
 template<typename Iterator>
@@ -52,18 +50,6 @@ IteratorRange<Iterator> makeIteratorRange(Iterator&& begin, Iterator&& end)
     return IteratorRange<Iterator>(std::forward<Iterator>(begin), std::forward<Iterator>(end));
 }
 
-template<typename Container>
-IteratorRange<typename Container::reverse_iterator> makeReversedRange(Container& container)
-{
-    return makeIteratorRange(std::rbegin(container), std::rend(container));
-}
-
-template<typename Container>
-IteratorRange<typename Container::const_reverse_iterator> makeReversedRange(const Container& container)
-{
-    return makeIteratorRange(std::crbegin(container), std::crend(container));
-}
-
 template<typename Container, typename Iterator>
 class SizedIteratorRange {
 public:
index 3886740..c03f9d2 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-11  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, rolling out r242702.
+
+        Broke High Sierra builders.
+
+        Reverted changeset:
+
+        "Add utility function to allow easy reverse range-based
+        iteration of a container"
+        https://bugs.webkit.org/show_bug.cgi?id=195542
+        https://trac.webkit.org/changeset/242702
+
 2019-03-11  Sam Weinig  <sam@webkit.org>
 
         Add utility function to allow easy reverse range-based iteration of a container
index 4509208..6843d03 100644 (file)
@@ -129,7 +129,6 @@ set(TestWTF_SOURCES
     ${TESTWEBKITAPI_DIR}/Tests/WTF/HashSet.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/Hasher.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/IntegerToStringConversion.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WTF/IteratorRange.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/JSONValue.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/LEBDecoder.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/LifecycleLogger.cpp
index 5ac097c..f3a990d 100644 (file)
                7CCE7F2E1A411B1000447C4C /* WKBrowsingContextGroupTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC3C4C7D14587AA60025FB62 /* WKBrowsingContextGroupTest.mm */; };
                7CCE7F2F1A411B1000447C4C /* WKBrowsingContextLoadDelegateTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC3C4C7014575B6A0025FB62 /* WKBrowsingContextLoadDelegateTest.mm */; };
                7CD4C26E1E2C0E6E00929470 /* StringConcatenate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD4C26C1E2C0E6E00929470 /* StringConcatenate.cpp */; };
-               7CEB62AB223609DE0069CBB0 /* IteratorRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEB62A92236086C0069CBB0 /* IteratorRange.cpp */; };
                7CEFA9661AC0B9E200B910FD /* _WKUserContentExtensionStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CEFA9641AC0B9E200B910FD /* _WKUserContentExtensionStore.mm */; };
                7CFBCAE51743238F00B2BFCF /* WillLoad_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */; };
                830F2E0C209A6A8E00D36FF1 /* WebContentProcessDidTerminate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 830F2E0B209A6A7400D36FF1 /* WebContentProcessDidTerminate.mm */; };
                7CCE7EA31A4115CB00447C4C /* TestWebKitAPILibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TestWebKitAPILibrary.xcconfig; sourceTree = "<group>"; };
                7CD0D5AA1D5534DE000CC9E1 /* Variant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Variant.cpp; sourceTree = "<group>"; };
                7CD4C26C1E2C0E6E00929470 /* StringConcatenate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringConcatenate.cpp; sourceTree = "<group>"; };
-               7CEB62A92236086C0069CBB0 /* IteratorRange.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IteratorRange.cpp; sourceTree = "<group>"; };
                7CEFA9641AC0B9E200B910FD /* _WKUserContentExtensionStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKUserContentExtensionStore.mm; sourceTree = "<group>"; };
                7CFBCADD1743234F00B2BFCF /* WillLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad.cpp; sourceTree = "<group>"; };
                7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad_Bundle.cpp; sourceTree = "<group>"; };
                                0BCD833414857CE400EA2003 /* HashMap.cpp */,
                                26B2DFF815BDE599004F691D /* HashSet.cpp */,
                                266FAFD215E5775200F61D5B /* IntegerToStringConversion.cpp */,
-                               7CEB62A92236086C0069CBB0 /* IteratorRange.cpp */,
                                7A0509401FB9F04400B33FB8 /* JSONValue.cpp */,
                                531C1D8D1DF8EF72006E979F /* LEBDecoder.cpp */,
                                A57D54F71F3397B400A97AA7 /* LifecycleLogger.cpp */,
                                7C83DED21D0A590C00FEBCF3 /* HashMap.cpp in Sources */,
                                7C83DED41D0A590C00FEBCF3 /* HashSet.cpp in Sources */,
                                7C83DEE01D0A590C00FEBCF3 /* IntegerToStringConversion.cpp in Sources */,
-                               7CEB62AB223609DE0069CBB0 /* IteratorRange.cpp in Sources */,
                                7A0509411FB9F06400B33FB8 /* JSONValue.cpp in Sources */,
                                531C1D8E1DF8EF72006E979F /* LEBDecoder.cpp in Sources */,
                                A57D54F91F3397B400A97AA7 /* LifecycleLogger.cpp in Sources */,
diff --git a/Tools/TestWebKitAPI/Tests/WTF/IteratorRange.cpp b/Tools/TestWebKitAPI/Tests/WTF/IteratorRange.cpp
deleted file mode 100644 (file)
index 191e77c..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include <array>
-#include <wtf/IteratorRange.h>
-#include <wtf/Vector.h>
-
-namespace TestWebKitAPI {
-
-TEST(WTF_IteratorRange, MakeReversedRange)
-{
-    Vector<int> intVector { 10, 11, 12, 13 };
-
-    auto reversedRange = WTF::makeReversedRange(intVector);
-
-    static_assert(std::is_same<decltype(reversedRange.begin()), typename Vector<int>::reverse_iterator>::value, "IteratorRange has correct begin() iterator type");
-    static_assert(std::is_same<decltype(reversedRange.end()), typename Vector<int>::reverse_iterator>::value, "IteratorRange has correct end() iterator type");
-
-    EXPECT_EQ(reversedRange.begin(), intVector.rbegin());
-    EXPECT_EQ(reversedRange.end(), intVector.rend());
-
-    std::array<int, 4> expectedResults { 13, 12, 11, 10 };
-    size_t index = 0;
-
-    for (auto& value : reversedRange)
-        EXPECT_EQ(value, expectedResults[index++]);
-}
-
-TEST(WTF_IteratorRange, MakeConstReversedRange)
-{
-    const Vector<int> intVector { 10, 11, 12, 13 };
-
-    auto reversedRange = WTF::makeReversedRange(intVector);
-
-    static_assert(std::is_same<decltype(reversedRange.begin()), typename Vector<int>::const_reverse_iterator>::value, "IteratorRange has correct begin() iterator type");
-    static_assert(std::is_same<decltype(reversedRange.end()), typename Vector<int>::const_reverse_iterator>::value, "IteratorRange has correct end() iterator type");
-
-    EXPECT_EQ(reversedRange.begin(), intVector.rbegin());
-    EXPECT_EQ(reversedRange.end(), intVector.rend());
-
-    std::array<int, 4> expectedResults { 13, 12, 11, 10 };
-    size_t index = 0;
-
-    for (auto& value : reversedRange)
-        EXPECT_EQ(value, expectedResults[index++]);
-}
-
-} // namespace TestWebKitAPI