<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[190689] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/190689">190689</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-07 14:34:12 -0700 (Wed, 07 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/190572">r190572</a>, <a href="http://trac.webkit.org/projects/webkit/changeset/190593">r190593</a>, <a href="http://trac.webkit.org/projects/webkit/changeset/190594">r190594</a>, and
<a href="http://trac.webkit.org/projects/webkit/changeset/190639">r190639</a>.
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 <a href="http://trac.webkit.org/projects/webkit/changeset/190572">r190572</a>."
http://trac.webkit.org/changeset/190639</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIcppWKRetainPtrh">trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPIPlatformGTKcmake">trunk/Tools/TestWebKitAPI/PlatformGTK.cmake</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsWebKitTestRunnerWebNotificationProvidercpp">trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerWebNotificationProviderh">trunk/Tools/WebKitTestRunner/WebNotificationProvider.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2WKRetainPtrcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKRetainPtr.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/LayoutTests/ChangeLog        2015-10-07 21:34:12 UTC (rev 190689)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-10-07 Commit Queue <commit-queue@webkit.org>
+
+ 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
+
</ins><span class="cx"> 2015-10-07 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> Implement :host pseudo class
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/LayoutTests/TestExpectations        2015-10-07 21:34:12 UTC (rev 190689)
</span><span class="lines">@@ -676,3 +676,5 @@
</span><span class="cx"> # Marks as flaky (see also https://bugs.webkit.org/show_bug.cgi?id=132388)
</span><span class="cx">
</span><span class="cx"> http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html [ Failure Pass ]
</span><ins>+
+webkit.org/b/149218 http/tests/notifications/events.html [ Pass Crash Timeout ]
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-10-07 Commit Queue <commit-queue@webkit.org>
+
+ 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
+
</ins><span class="cx"> 2015-10-07 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Provide a way to get a WKFrameInfoRef from a WKFrameRef
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIcppWKRetainPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -28,10 +28,6 @@
</span><span class="cx">
</span><span class="cx"> #include <WebKit/WKType.h>
</span><span class="cx"> #include <algorithm>
</span><del>-#include <wtf/GetPtr.h>
-#include <wtf/HashFunctions.h>
-#include <wtf/HashTraits.h>
-#include <wtf/RefPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -88,15 +84,6 @@
</span><span class="cx"> WKRelease(ptr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // 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); }
-
</del><span class="cx"> PtrType get() const { return m_ptr; }
</span><span class="cx">
</span><span class="cx"> void clear()
</span><span class="lines">@@ -263,24 +250,4 @@
</span><span class="cx"> using WebKit::AdoptWK;
</span><span class="cx"> using WebKit::adoptWK;
</span><span class="cx">
</span><del>-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
-
</del><span class="cx"> #endif // WKRetainPtr_h
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-10-07 21:25:58 UTC (rev 190688)
+++ trunk/Tools/ChangeLog        2015-10-07 21:34:12 UTC (rev 190689)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-10-07 Commit Queue <commit-queue@webkit.org>
+
+ 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
+
</ins><span class="cx"> 2015-10-06 Michael Catanzaro <mcatanzaro@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Add autocleanups
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIPlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/PlatformGTK.cmake (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -110,7 +110,6 @@
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillSendSubmitEvent.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKPageGetScaleFactorNotZero.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKPreferences.cpp
</span><del>- ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKRetainPtr.cpp
</del><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKString.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKStringJSString.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKURL.cpp
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx">                 1ADBEFE3130C6AA100D61D19 /* simple-accelerated-compositing.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */; };
</span><span class="cx">                 1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */; };
</span><span class="cx">                 1CB9BC381A67482300FE5678 /* WeakPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9BC371A67482300FE5678 /* WeakPtr.cpp */; };
</span><del>-                1CF0D3791BBF2F3D00B4EF54 /* WKRetainPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */; };
</del><span class="cx">                 260BA5791B1D2E7B004FA07C /* DFACombiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260BA5781B1D2E7B004FA07C /* DFACombiner.cpp */; };
</span><span class="cx">                 26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */; };
</span><span class="cx">                 26F52EAD1828827B0023D412 /* geolocationGetCurrentPosition.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26F52EAC1828820E0023D412 /* geolocationGetCurrentPosition.html */; };
</span><span class="lines">@@ -471,7 +470,6 @@
</span><span class="cx">                 1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetPIDAfterAbortedProcessLaunch.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1AFDE6541953B2C000C48FFA /* Optional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Optional.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1CB9BC371A67482300FE5678 /* WeakPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakPtr.cpp; sourceTree = "<group>"; };
</span><del>-                1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRetainPtr.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 260BA5781B1D2E7B004FA07C /* DFACombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFACombiner.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 260BA57A1B1D2EE2004FA07C /* DFAHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DFAHelpers.h; sourceTree = "<group>"; };
</span><span class="cx">                 261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SetAndUpdateCacheModel.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -1143,7 +1141,6 @@
</span><span class="cx">                                 BC7B619A1299FE9E00D174A4 /* WKPreferences.cpp */,
</span><span class="cx">                                 BC90995D12567BC100083756 /* WKString.cpp */,
</span><span class="cx">                                 BC9099931256ACF100083756 /* WKStringJSString.cpp */,
</span><del>-                                1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */,
</del><span class="cx">                         );
</span><span class="cx">                         path = WebKit2;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -1748,7 +1745,6 @@
</span><span class="cx">                                 A1C4FB6E1BACCE50003742D0 /* QuickLook.mm in Sources */,
</span><span class="cx">                                 7A5623111AD5AF3E0096B920 /* MenuTypesForMouseEvents.cpp in Sources */,
</span><span class="cx">                                 51CB4AD81B3A079C00C1B1C6 /* ModalAlertsSPI.cpp in Sources */,
</span><del>-                                1CF0D3791BBF2F3D00B4EF54 /* WKRetainPtr.cpp in Sources */,
</del><span class="cx">                                 26F6E1F01ADC749B00DE696B /* DFAMinimizer.cpp in Sources */,
</span><span class="cx">                                 260BA5791B1D2E7B004FA07C /* DFACombiner.cpp in Sources */,
</span><span class="cx">                                 7A99D9941AD4A29D00373141 /* MenuTypesForMouseEvents.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2WKRetainPtrcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKRetainPtr.cpp (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * 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
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerWebNotificationProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -65,8 +65,8 @@
</span><span class="cx">
</span><span class="cx"> WebNotificationProvider::~WebNotificationProvider()
</span><span class="cx"> {
</span><del>- for (auto& manager : m_ownedNotifications)
- WKNotificationManagerSetProvider(manager.key.get(), nullptr);
</del><ins>+ if (m_currentNotificationManager)
+ WKNotificationManagerSetProvider(m_currentNotificationManager.get(), nullptr);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKNotificationProviderV0 WebNotificationProvider::provider()
</span><span class="lines">@@ -84,57 +84,38 @@
</span><span class="cx"> return notificationProvider;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebNotificationProvider::showWebNotification(WKPageRef page, WKNotificationRef notification)
</del><ins>+void WebNotificationProvider::showWebNotification(WKPageRef, WKNotificationRef notification)
</ins><span class="cx"> {
</span><del>- auto context = WKPageGetContext(page);
- auto notificationManager = WKContextGetNotificationManager(context);
</del><ins>+ if (!m_currentNotificationManager)
+ return;
+
</ins><span class="cx"> uint64_t id = WKNotificationGetID(notification);
</span><ins>+ ASSERT(!m_shownNotifications.contains(id));
+ m_shownNotifications.add(id);
</ins><span class="cx">
</span><del>- 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);
</del><ins>+ WKNotificationManagerProviderDidShowNotification(m_currentNotificationManager.get(), WKNotificationGetID(notification));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebNotificationProvider::closeWebNotification(WKNotificationRef notification)
</span><span class="cx"> {
</span><del>- uint64_t id = WKNotificationGetID(notification);
- ASSERT(m_owningManager.contains(id));
- auto notificationManager = m_owningManager.get(id);
</del><ins>+ if (!m_currentNotificationManager)
+ return;
</ins><span class="cx">
</span><del>- ASSERT(m_ownedNotifications.contains(notificationManager));
- bool success = m_ownedNotifications.find(notificationManager)->value.remove(id);
- ASSERT_UNUSED(success, success);
- m_owningManager.remove(id);
-
</del><ins>+ uint64_t id = WKNotificationGetID(notification);
</ins><span class="cx"> WKRetainPtr<WKUInt64Ref> wkID = WKUInt64Create(id);
</span><span class="cx"> WKRetainPtr<WKMutableArrayRef> array(AdoptWK, WKMutableArrayCreate());
</span><span class="cx"> WKArrayAppendItem(array.get(), wkID.get());
</span><del>- WKNotificationManagerProviderDidCloseNotifications(notificationManager, array.get());
</del><ins>+ m_shownNotifications.remove(id);
+ WKNotificationManagerProviderDidCloseNotifications(m_currentNotificationManager.get(), array.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebNotificationProvider::addNotificationManager(WKNotificationManagerRef manager)
</span><span class="cx"> {
</span><del>- m_ownedNotifications.add(manager, HashSet<uint64_t>());
</del><ins>+ m_currentNotificationManager = manager;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebNotificationProvider::removeNotificationManager(WKNotificationManagerRef manager)
</span><span class="cx"> {
</span><del>- 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());
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKDictionaryRef WebNotificationProvider::notificationPermissions()
</span><span class="lines">@@ -145,23 +126,29 @@
</span><span class="cx">
</span><span class="cx"> void WebNotificationProvider::simulateWebNotificationClick(uint64_t notificationID)
</span><span class="cx"> {
</span><del>- ASSERT(m_owningManager.contains(notificationID));
- WKNotificationManagerProviderDidClickNotification(m_owningManager.get(notificationID), notificationID);
</del><ins>+ if (!m_currentNotificationManager)
+ return;
+
+ ASSERT(m_shownNotifications.contains(notificationID));
+ WKNotificationManagerProviderDidClickNotification(m_currentNotificationManager.get(), notificationID);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebNotificationProvider::reset()
</span><span class="cx"> {
</span><del>- 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());
</del><ins>+ if (!m_currentNotificationManager) {
+ m_shownNotifications.clear();
+ return;
+ }
</ins><span class="cx">
</span><del>- notificationPair.value.clear();
- WKNotificationManagerProviderDidCloseNotifications(notificationPair.key.get(), array.get());
</del><ins>+ 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());
</ins><span class="cx"> }
</span><del>- m_owningManager.clear();
</del><ins>+
+ m_shownNotifications.clear();
+ WKNotificationManagerProviderDidCloseNotifications(m_currentNotificationManager.get(), array.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WTR
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerWebNotificationProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/WebNotificationProvider.h (190688 => 190689)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include <WebKit/WKNotificationManager.h>
</span><span class="cx"> #include <WebKit/WKNotificationProvider.h>
</span><span class="cx"> #include <WebKit/WKRetainPtr.h>
</span><del>-#include <wtf/HashMap.h>
</del><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx">
</span><span class="cx"> namespace WTR {
</span><span class="lines">@@ -50,9 +49,8 @@
</span><span class="cx"> void reset();
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- // Inverses of each other.
- HashMap<WKRetainPtr<WKNotificationManagerRef>, HashSet<uint64_t>> m_ownedNotifications;
- HashMap<uint64_t, WKNotificationManagerRef> m_owningManager;
</del><ins>+ WKRetainPtr<WKNotificationManagerRef> m_currentNotificationManager;
+ HashSet<uint64_t> m_shownNotifications;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>