Diff
Modified: trunk/LayoutTests/ChangeLog (190688 => 190689)
--- trunk/LayoutTests/ChangeLog 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/LayoutTests/ChangeLog 2015-10-07 21:34:12 UTC (rev 190689)
@@ -1,3 +1,29 @@
+2015-10-07 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r190572, r190593, r190594, and
+ r190639.
+ https://bugs.webkit.org/show_bug.cgi?id=149897
+
+ Breaks Mavericks build (Requested by litherum on #webkit).
+
+ Reverted changesets:
+
+ "Allow WKRetainPtrs to be used as keys in hashing data
+ structures"
+ https://bugs.webkit.org/show_bug.cgi?id=149762
+ http://trac.webkit.org/changeset/190572
+
+ "REGRESSION(189668?): http/tests/notifications/events.html
+ flakily asserts or times out"
+ https://bugs.webkit.org/show_bug.cgi?id=149218
+ http://trac.webkit.org/changeset/190593
+
+ "Prospective Mavericks build fix."
+ http://trac.webkit.org/changeset/190594
+
+ "Post-review cleanup after r190572."
+ http://trac.webkit.org/changeset/190639
+
2015-10-07 Antti Koivisto <[email protected]>
Implement :host pseudo class
Modified: trunk/LayoutTests/TestExpectations (190688 => 190689)
--- trunk/LayoutTests/TestExpectations 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/LayoutTests/TestExpectations 2015-10-07 21:34:12 UTC (rev 190689)
@@ -676,3 +676,5 @@
# Marks as flaky (see also https://bugs.webkit.org/show_bug.cgi?id=132388)
http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html [ Failure Pass ]
+
+webkit.org/b/149218 http/tests/notifications/events.html [ Pass Crash Timeout ]
Modified: trunk/Source/WebKit2/ChangeLog (190688 => 190689)
--- trunk/Source/WebKit2/ChangeLog 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Source/WebKit2/ChangeLog 2015-10-07 21:34:12 UTC (rev 190689)
@@ -1,3 +1,29 @@
+2015-10-07 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r190572, r190593, r190594, and
+ r190639.
+ https://bugs.webkit.org/show_bug.cgi?id=149897
+
+ Breaks Mavericks build (Requested by litherum on #webkit).
+
+ Reverted changesets:
+
+ "Allow WKRetainPtrs to be used as keys in hashing data
+ structures"
+ https://bugs.webkit.org/show_bug.cgi?id=149762
+ http://trac.webkit.org/changeset/190572
+
+ "REGRESSION(189668?): http/tests/notifications/events.html
+ flakily asserts or times out"
+ https://bugs.webkit.org/show_bug.cgi?id=149218
+ http://trac.webkit.org/changeset/190593
+
+ "Prospective Mavericks build fix."
+ http://trac.webkit.org/changeset/190594
+
+ "Post-review cleanup after r190572."
+ http://trac.webkit.org/changeset/190639
+
2015-10-07 Anders Carlsson <[email protected]>
Provide a way to get a WKFrameInfoRef from a WKFrameRef
Modified: trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h (190688 => 190689)
--- trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h 2015-10-07 21:34:12 UTC (rev 190689)
@@ -28,10 +28,6 @@
#include <WebKit/WKType.h>
#include <algorithm>
-#include <wtf/GetPtr.h>
-#include <wtf/HashFunctions.h>
-#include <wtf/HashTraits.h>
-#include <wtf/RefPtr.h>
namespace WebKit {
@@ -88,15 +84,6 @@
WKRelease(ptr);
}
- // Hash table deleted values, which are only constructed and never copied or destroyed.
- WKRetainPtr(WTF::HashTableDeletedValueType)
- : m_ptr(hashTableDeletedValue())
- {
- }
-
- bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
- constexpr static T hashTableDeletedValue() { return reinterpret_cast<T>(-1); }
-
PtrType get() const { return m_ptr; }
void clear()
@@ -263,24 +250,4 @@
using WebKit::AdoptWK;
using WebKit::adoptWK;
-namespace WTF {
-
-template <typename T> struct IsSmartPtr<WKRetainPtr<T>> {
- static const bool value = true;
-};
-
-template<typename P> struct DefaultHash<WKRetainPtr<P>> {
- typedef PtrHash<WKRetainPtr<P>> Hash;
-};
-
-template<typename P> struct HashTraits<WKRetainPtr<P>> : SimpleClassHashTraits<WKRetainPtr<P>> {
- static P emptyValue() { return nullptr; }
-
- typedef P PeekType;
- static PeekType peek(const WKRetainPtr<P>& value) { return value.get(); }
- static PeekType peek(P value) { return value; }
-};
-
-} // namespace WTF
-
#endif // WKRetainPtr_h
Modified: trunk/Tools/ChangeLog (190688 => 190689)
--- trunk/Tools/ChangeLog 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/ChangeLog 2015-10-07 21:34:12 UTC (rev 190689)
@@ -1,3 +1,29 @@
+2015-10-07 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r190572, r190593, r190594, and
+ r190639.
+ https://bugs.webkit.org/show_bug.cgi?id=149897
+
+ Breaks Mavericks build (Requested by litherum on #webkit).
+
+ Reverted changesets:
+
+ "Allow WKRetainPtrs to be used as keys in hashing data
+ structures"
+ https://bugs.webkit.org/show_bug.cgi?id=149762
+ http://trac.webkit.org/changeset/190572
+
+ "REGRESSION(189668?): http/tests/notifications/events.html
+ flakily asserts or times out"
+ https://bugs.webkit.org/show_bug.cgi?id=149218
+ http://trac.webkit.org/changeset/190593
+
+ "Prospective Mavericks build fix."
+ http://trac.webkit.org/changeset/190594
+
+ "Post-review cleanup after r190572."
+ http://trac.webkit.org/changeset/190639
+
2015-10-06 Michael Catanzaro <[email protected]>
[GTK] Add autocleanups
Modified: trunk/Tools/TestWebKitAPI/PlatformGTK.cmake (190688 => 190689)
--- trunk/Tools/TestWebKitAPI/PlatformGTK.cmake 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/TestWebKitAPI/PlatformGTK.cmake 2015-10-07 21:34:12 UTC (rev 190689)
@@ -110,7 +110,6 @@
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillSendSubmitEvent.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKPageGetScaleFactorNotZero.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKPreferences.cpp
- ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKRetainPtr.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKString.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKStringJSString.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKURL.cpp
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (190688 => 190689)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2015-10-07 21:34:12 UTC (rev 190689)
@@ -22,7 +22,6 @@
1ADBEFE3130C6AA100D61D19 /* simple-accelerated-compositing.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */; };
1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */; };
1CB9BC381A67482300FE5678 /* WeakPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9BC371A67482300FE5678 /* WeakPtr.cpp */; };
- 1CF0D3791BBF2F3D00B4EF54 /* WKRetainPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */; };
260BA5791B1D2E7B004FA07C /* DFACombiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260BA5781B1D2E7B004FA07C /* DFACombiner.cpp */; };
26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */; };
26F52EAD1828827B0023D412 /* geolocationGetCurrentPosition.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26F52EAC1828820E0023D412 /* geolocationGetCurrentPosition.html */; };
@@ -471,7 +470,6 @@
1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetPIDAfterAbortedProcessLaunch.cpp; sourceTree = "<group>"; };
1AFDE6541953B2C000C48FFA /* Optional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Optional.cpp; sourceTree = "<group>"; };
1CB9BC371A67482300FE5678 /* WeakPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakPtr.cpp; sourceTree = "<group>"; };
- 1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRetainPtr.cpp; sourceTree = "<group>"; };
260BA5781B1D2E7B004FA07C /* DFACombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFACombiner.cpp; sourceTree = "<group>"; };
260BA57A1B1D2EE2004FA07C /* DFAHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DFAHelpers.h; sourceTree = "<group>"; };
261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SetAndUpdateCacheModel.mm; sourceTree = "<group>"; };
@@ -1143,7 +1141,6 @@
BC7B619A1299FE9E00D174A4 /* WKPreferences.cpp */,
BC90995D12567BC100083756 /* WKString.cpp */,
BC9099931256ACF100083756 /* WKStringJSString.cpp */,
- 1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */,
);
path = WebKit2;
sourceTree = "<group>";
@@ -1748,7 +1745,6 @@
A1C4FB6E1BACCE50003742D0 /* QuickLook.mm in Sources */,
7A5623111AD5AF3E0096B920 /* MenuTypesForMouseEvents.cpp in Sources */,
51CB4AD81B3A079C00C1B1C6 /* ModalAlertsSPI.cpp in Sources */,
- 1CF0D3791BBF2F3D00B4EF54 /* WKRetainPtr.cpp in Sources */,
26F6E1F01ADC749B00DE696B /* DFAMinimizer.cpp in Sources */,
260BA5791B1D2E7B004FA07C /* DFACombiner.cpp in Sources */,
7A99D9941AD4A29D00373141 /* MenuTypesForMouseEvents.mm in Sources */,
Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKRetainPtr.cpp (190688 => 190689)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKRetainPtr.cpp 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKRetainPtr.cpp 2015-10-07 21:34:12 UTC (rev 190689)
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2015 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"
-
-#if WK_HAVE_C_SPI
-
-#include "PlatformUtilities.h"
-#include <wtf/HashMap.h>
-
-namespace TestWebKitAPI {
-
-TEST(WebKit2, WKRetainPtr)
-{
- WKRetainPtr<WKStringRef> string1 = adoptWK(WKStringCreateWithUTF8CString("a"));
- WKRetainPtr<WKStringRef> string2 = adoptWK(WKStringCreateWithUTF8CString("a"));
- WKRetainPtr<WKStringRef> string3 = adoptWK(WKStringCreateWithUTF8CString("a"));
- WKRetainPtr<WKStringRef> string4 = adoptWK(WKStringCreateWithUTF8CString("a"));
-
- HashMap<WKRetainPtr<WKStringRef>, int> map;
-
- map.set(string2, 2);
- map.set(string1, 1);
-
- EXPECT_TRUE(map.contains(string1));
- EXPECT_TRUE(map.contains(string2));
- EXPECT_FALSE(map.contains(string3));
- EXPECT_FALSE(map.contains(string4));
-
- EXPECT_EQ(1, map.get(string1));
- EXPECT_EQ(2, map.get(string2));
-}
-
-} // namespace TestWebKitAPI
-
-#endif
Modified: trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp (190688 => 190689)
--- trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp 2015-10-07 21:34:12 UTC (rev 190689)
@@ -65,8 +65,8 @@
WebNotificationProvider::~WebNotificationProvider()
{
- for (auto& manager : m_ownedNotifications)
- WKNotificationManagerSetProvider(manager.key.get(), nullptr);
+ if (m_currentNotificationManager)
+ WKNotificationManagerSetProvider(m_currentNotificationManager.get(), nullptr);
}
WKNotificationProviderV0 WebNotificationProvider::provider()
@@ -84,57 +84,38 @@
return notificationProvider;
}
-void WebNotificationProvider::showWebNotification(WKPageRef page, WKNotificationRef notification)
+void WebNotificationProvider::showWebNotification(WKPageRef, WKNotificationRef notification)
{
- auto context = WKPageGetContext(page);
- auto notificationManager = WKContextGetNotificationManager(context);
+ if (!m_currentNotificationManager)
+ return;
+
uint64_t id = WKNotificationGetID(notification);
+ ASSERT(!m_shownNotifications.contains(id));
+ m_shownNotifications.add(id);
- ASSERT(m_ownedNotifications.contains(notificationManager));
- auto addResult = m_ownedNotifications.find(notificationManager)->value.add(id);
- ASSERT_UNUSED(addResult, addResult.isNewEntry);
- auto addResult2 = m_owningManager.set(id, notificationManager);
- ASSERT_UNUSED(addResult2, addResult2.isNewEntry);
-
- WKNotificationManagerProviderDidShowNotification(notificationManager, id);
+ WKNotificationManagerProviderDidShowNotification(m_currentNotificationManager.get(), WKNotificationGetID(notification));
}
void WebNotificationProvider::closeWebNotification(WKNotificationRef notification)
{
- uint64_t id = WKNotificationGetID(notification);
- ASSERT(m_owningManager.contains(id));
- auto notificationManager = m_owningManager.get(id);
+ if (!m_currentNotificationManager)
+ return;
- ASSERT(m_ownedNotifications.contains(notificationManager));
- bool success = m_ownedNotifications.find(notificationManager)->value.remove(id);
- ASSERT_UNUSED(success, success);
- m_owningManager.remove(id);
-
+ uint64_t id = WKNotificationGetID(notification);
WKRetainPtr<WKUInt64Ref> wkID = WKUInt64Create(id);
WKRetainPtr<WKMutableArrayRef> array(AdoptWK, WKMutableArrayCreate());
WKArrayAppendItem(array.get(), wkID.get());
- WKNotificationManagerProviderDidCloseNotifications(notificationManager, array.get());
+ m_shownNotifications.remove(id);
+ WKNotificationManagerProviderDidCloseNotifications(m_currentNotificationManager.get(), array.get());
}
void WebNotificationProvider::addNotificationManager(WKNotificationManagerRef manager)
{
- m_ownedNotifications.add(manager, HashSet<uint64_t>());
+ m_currentNotificationManager = manager;
}
void WebNotificationProvider::removeNotificationManager(WKNotificationManagerRef manager)
{
- auto iterator = m_ownedNotifications.find(manager);
- ASSERT(iterator != m_ownedNotifications.end());
- auto toRemove = iterator->value;
- WKRetainPtr<WKNotificationManagerRef> guard(manager);
- m_ownedNotifications.remove(iterator);
- WKRetainPtr<WKMutableArrayRef> array = adoptWK(WKMutableArrayCreate());
- for (uint64_t notificationID : toRemove) {
- bool success = m_owningManager.remove(notificationID);
- ASSERT_UNUSED(success, success);
- WKArrayAppendItem(array.get(), adoptWK(WKUInt64Create(notificationID)).get());
- }
- WKNotificationManagerProviderDidCloseNotifications(manager, array.get());
}
WKDictionaryRef WebNotificationProvider::notificationPermissions()
@@ -145,23 +126,29 @@
void WebNotificationProvider::simulateWebNotificationClick(uint64_t notificationID)
{
- ASSERT(m_owningManager.contains(notificationID));
- WKNotificationManagerProviderDidClickNotification(m_owningManager.get(notificationID), notificationID);
+ if (!m_currentNotificationManager)
+ return;
+
+ ASSERT(m_shownNotifications.contains(notificationID));
+ WKNotificationManagerProviderDidClickNotification(m_currentNotificationManager.get(), notificationID);
}
void WebNotificationProvider::reset()
{
- for (auto& notificationPair : m_ownedNotifications) {
- if (notificationPair.value.isEmpty())
- continue;
- WKRetainPtr<WKMutableArrayRef> array = adoptWK(WKMutableArrayCreate());
- for (uint64_t notificationID : notificationPair.value)
- WKArrayAppendItem(array.get(), adoptWK(WKUInt64Create(notificationID)).get());
+ if (!m_currentNotificationManager) {
+ m_shownNotifications.clear();
+ return;
+ }
- notificationPair.value.clear();
- WKNotificationManagerProviderDidCloseNotifications(notificationPair.key.get(), array.get());
+ WKRetainPtr<WKMutableArrayRef> array(AdoptWK, WKMutableArrayCreate());
+ HashSet<uint64_t>::const_iterator itEnd = m_shownNotifications.end();
+ for (HashSet<uint64_t>::const_iterator it = m_shownNotifications.begin(); it != itEnd; ++it) {
+ WKRetainPtr<WKUInt64Ref> wkID = WKUInt64Create(*it);
+ WKArrayAppendItem(array.get(), wkID.get());
}
- m_owningManager.clear();
+
+ m_shownNotifications.clear();
+ WKNotificationManagerProviderDidCloseNotifications(m_currentNotificationManager.get(), array.get());
}
} // namespace WTR
Modified: trunk/Tools/WebKitTestRunner/WebNotificationProvider.h (190688 => 190689)
--- trunk/Tools/WebKitTestRunner/WebNotificationProvider.h 2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/WebKitTestRunner/WebNotificationProvider.h 2015-10-07 21:34:12 UTC (rev 190689)
@@ -29,7 +29,6 @@
#include <WebKit/WKNotificationManager.h>
#include <WebKit/WKNotificationProvider.h>
#include <WebKit/WKRetainPtr.h>
-#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
namespace WTR {
@@ -50,9 +49,8 @@
void reset();
private:
- // Inverses of each other.
- HashMap<WKRetainPtr<WKNotificationManagerRef>, HashSet<uint64_t>> m_ownedNotifications;
- HashMap<uint64_t, WKNotificationManagerRef> m_owningManager;
+ WKRetainPtr<WKNotificationManagerRef> m_currentNotificationManager;
+ HashSet<uint64_t> m_shownNotifications;
};
}