<!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>[193960] branches/safari-601-branch/Source</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/193960">193960</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-11 10:26:12 -0800 (Fri, 11 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/191084">r191084</a>. rdar://problem/23715623</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari601branchSourceWebCoreloaderEmptyClientscpp">branches/safari-601-branch/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformSearchPopupMenuh">branches/safari-601-branch/Source/WebCore/platform/SearchPopupMenu.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformwinSearchPopupMenuWincpp">branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformwinSearchPopupMenuWinh">branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.h</a></li>
<li><a href="#branchessafari601branchSourceWebCorerenderingRenderSearchFieldcpp">branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorerenderingRenderSearchFieldh">branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.h</a></li>
<li><a href="#branchessafari601branchSourceWebKitiosChangeLog">branches/safari-601-branch/Source/WebKit/ios/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebKitiosWebCoreSupportSearchPopupMenuIOScpp">branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKitiosWebCoreSupportSearchPopupMenuIOSh">branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.h</a></li>
<li><a href="#branchessafari601branchSourceWebKitmacChangeLog">branches/safari-601-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebKitmacWebCoreSupportSearchPopupMenuMach">branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.h</a></li>
<li><a href="#branchessafari601branchSourceWebKitmacWebCoreSupportSearchPopupMenuMacmm">branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2ChangeLog">branches/safari-601-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebKit2Scriptswebkitmessagespy">branches/safari-601-branch/Source/WebKit2/Scripts/webkit/messages.py</a></li>
<li><a href="#branchessafari601branchSourceWebKit2SharedWebCoreArgumentCoderscpp">branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKit2SharedWebCoreArgumentCodersh">branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessCocoaWebPageProxyCocoamm">branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcesseflWebPageProxyEflcpp">branches/safari-601-branch/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessgtkWebPageProxyGtkcpp">branches/safari-601-branch/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKit2WebProcessWebCoreSupportWebSearchPopupMenucpp">branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKit2WebProcessWebCoreSupportWebSearchPopupMenuh">branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebCoreplatformcocoaSearchPopupMenuCocoah">branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformcocoaSearchPopupMenuCocoamm">branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2015-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r191084. rdar://problem/23715623
+
+ 2015-10-14 Zhuo Li <zachli@apple.com>
+
+ Augment <input type=search>’s recent search history with the time each entry was added,
+ in order to allow time-based clearing of search history.
+ https://bugs.webkit.org/show_bug.cgi?id=148388.
+
+ Reviewed by Darin Adler.
+
+ Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
+ that consists search string and time, for recent searches in order to store additional time
+ information.
+
+ * WebCore.xcodeproj/project.pbxproj: Added SearchPopupMenuCocoa.h and SearchPopupMenuCocoa.mm
+ and sort the project file.
+ * loader/EmptyClients.cpp:
+ (WebCore::EmptySearchPopupMenu::saveRecentSearches):
+ (WebCore::EmptySearchPopupMenu::loadRecentSearches):
+ * platform/SearchPopupMenu.h:
+ * platform/cocoa/SearchPopupMenuCocoa.h: Added methods for SeachPopupMenuMac in WebKit
+ and WebPageProxyCocoa in WebKit2 to call.
+ * platform/cocoa/SearchPopupMenuCocoa.mm: Added.
+ (WebCore::searchFieldRecentSearchesStorageDirectory): Recent searches with the new structure
+ are stored in a new location.
+ (WebCore::searchFieldRecentSearchesPlistPath): Get the path for the plist of the recent
+ searches entries.
+ (WebCore::RetainPtr<NSMutableDictionary> readSearchFieldRecentSearchesPlist): Return the
+ recent searches plist as NSMutableDictionary.
+ (WebCore::fromNSDatetoSystemClockTime): Convert from NSDate to system_clock::time_point.
+ (WebCore::fromSystemClockTimetoNSDate): Convert from system_clock::time_point to NSDate.
+ (WebCore::SearchPopupMenuCocoa::saveRecentSearches): Add a dictionary where it has two pairs
+ that the first one is the search string and the second one is the time.
+ (WebCore::SearchPopupMenuCocoa::loadRecentSearches): We expect the recent search item in the
+ plist to be a two-pair dictionary, and convert the dictionary to the struct RecentSearch.
+ * platform/win/SearchPopupMenuWin.cpp:
+ (WebCore::SearchPopupMenuWin::saveRecentSearches): Only save the RecentSearch's search
+ string on Windows platform, which is what we used to do.
+ (WebCore::SearchPopupMenuWin::loadRecentSearches): Since we need to construct a
+ RecentSearch, we get the string from the app's preferences, and set the time to be
+ std::chrono::system_clock::time_point::min().
+ * platform/win/SearchPopupMenuWin.h:
+ * rendering/RenderSearchField.cpp: Now that m_recentSearches are Vector<RecentSearch>,
+ we cannot use -removeAll with a search string. Use -removeAllMatching instead to remove the
+ item that has its member search string equal to the search string user inputs.
+ (WebCore::RenderSearchField::addSearchResult):
+ (WebCore::RenderSearchField::itemText):
+
</ins><span class="cx"> 2015-12-09 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r190505.
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -462,6 +462,8 @@
</span><span class="cx">                 0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C3F1F5810C8871200D72CE1 /* WebGLUniformLocation.h */; };
</span><span class="cx">                 0C45342710CDBBFA00869157 /* JSWebGLUniformLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C45342510CDBBFA00869157 /* JSWebGLUniformLocation.cpp */; };
</span><span class="cx">                 0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C45342610CDBBFA00869157 /* JSWebGLUniformLocation.h */; };
</span><ins>+                0E7058EE1BC5BC190045A507 /* SearchPopupMenuCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0E7058ED1BC5BC190045A507 /* SearchPopupMenuCocoa.mm */; };
+                0E7058F41BC5CEDA0045A507 /* SearchPopupMenuCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F03C0741884695E00A5F8CA /* SystemMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F03C0731884695E00A5F8CA /* SystemMemory.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F03C0751884805500A5F8CA /* InspectorOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C522D4A15B478B2009B7C95 /* InspectorOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F09087F1444FDB200028917 /* ScrollbarTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE71415142189FC00DB33BA /* ScrollbarTheme.cpp */; };
</span><span class="lines">@@ -7591,6 +7593,8 @@
</span><span class="cx">                 0C3F1F5910C8871200D72CE1 /* WebGLUniformLocation.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLUniformLocation.idl; sourceTree = "<group>"; };
</span><span class="cx">                 0C45342510CDBBFA00869157 /* JSWebGLUniformLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLUniformLocation.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0C45342610CDBBFA00869157 /* JSWebGLUniformLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLUniformLocation.h; sourceTree = "<group>"; };
</span><ins>+                0E7058ED1BC5BC190045A507 /* SearchPopupMenuCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SearchPopupMenuCocoa.mm; sourceTree = "<group>"; };
+                0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenuCocoa.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F03C0731884695E00A5F8CA /* SystemMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemMemory.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F099D0617B968A100FF84B9 /* WebCoreTypedArrayController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreTypedArrayController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F099D0717B968A100FF84B9 /* WebCoreTypedArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreTypedArrayController.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -19100,6 +19104,8 @@
</span><span class="cx">                                 1AA84F02143BA7BD0051D153 /* ScrollController.mm */,
</span><span class="cx">                                 F478755219983AFF0024A287 /* ScrollSnapAnimatorState.h */,
</span><span class="cx">                                 F478755319983AFF0024A287 /* ScrollSnapAnimatorState.mm */,
</span><ins>+                                0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */,
+                                0E7058ED1BC5BC190045A507 /* SearchPopupMenuCocoa.mm */,
</ins><span class="cx">                                 5D5975B119635F1100D00878 /* SystemVersion.h */,
</span><span class="cx">                                 5D5975B219635F1100D00878 /* SystemVersion.mm */,
</span><span class="cx">                                 7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */,
</span><span class="lines">@@ -26640,6 +26646,7 @@
</span><span class="cx">                                 BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */,
</span><span class="cx">                                 F55B3DD21251F12D003EF269 /* SearchInputType.h in Headers */,
</span><span class="cx">                                 AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */,
</span><ins>+                                0E7058F41BC5CEDA0045A507 /* SearchPopupMenuCocoa.h in Headers */,
</ins><span class="cx">                                 976F36EB14686225005E93B4 /* SecurityContext.h in Headers */,
</span><span class="cx">                                 BCD0E0FB0E972C3500265DEA /* SecurityOrigin.h in Headers */,
</span><span class="cx">                                 BCD0E0FC0E972C3500265DEA /* SecurityOriginHash.h in Headers */,
</span><span class="lines">@@ -30123,6 +30130,7 @@
</span><span class="cx">                                 E45390450EAFD637003695C8 /* ScrollViewIOS.mm in Sources */,
</span><span class="cx">                                 9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */,
</span><span class="cx">                                 F55B3DD11251F12D003EF269 /* SearchInputType.cpp in Sources */,
</span><ins>+                                0E7058EE1BC5BC190045A507 /* SearchPopupMenuCocoa.mm in Sources */,
</ins><span class="cx">                                 976F36EA14686225005E93B4 /* SecurityContext.cpp in Sources */,
</span><span class="cx">                                 BCD0E0FA0E972C3500265DEA /* SecurityOrigin.cpp in Sources */,
</span><span class="cx">                                 1AF7AFC71A48A8BC00C8E4E7 /* SecurityOriginPolicy.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/loader/EmptyClients.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/loader/EmptyClients.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/loader/EmptyClients.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -138,8 +138,8 @@
</span><span class="cx"> class EmptySearchPopupMenu : public SearchPopupMenu {
</span><span class="cx"> public:
</span><span class="cx"> virtual PopupMenu* popupMenu() { return m_popup.get(); }
</span><del>- virtual void saveRecentSearches(const AtomicString&, const Vector<String>&) { }
- virtual void loadRecentSearches(const AtomicString&, Vector<String>&) { }
</del><ins>+ virtual void saveRecentSearches(const AtomicString&, const Vector<RecentSearch>&) { }
+ virtual void loadRecentSearches(const AtomicString&, Vector<RecentSearch>&) { }
</ins><span class="cx"> virtual bool enabled() { return false; }
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformSearchPopupMenuh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/SearchPopupMenu.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/SearchPopupMenu.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/platform/SearchPopupMenu.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -21,19 +21,26 @@
</span><span class="cx"> #ifndef SearchPopupMenu_h
</span><span class="cx"> #define SearchPopupMenu_h
</span><span class="cx">
</span><del>-#include "PopupMenu.h"
</del><ins>+#include <chrono>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class PopupMenu;
+
+struct RecentSearch {
+ String string;
+ std::chrono::system_clock::time_point time;
+};
+
</ins><span class="cx"> class SearchPopupMenu : public RefCounted<SearchPopupMenu> {
</span><span class="cx"> public:
</span><del>- virtual ~SearchPopupMenu() {}
</del><ins>+ virtual ~SearchPopupMenu() { }
</ins><span class="cx"> virtual PopupMenu* popupMenu() = 0;
</span><del>- virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) = 0;
- virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) = 0;
</del><ins>+ virtual void saveRecentSearches(const AtomicString& name, const Vector<RecentSearch>&) = 0;
+ virtual void loadRecentSearches(const AtomicString& name, Vector<RecentSearch>&) = 0;
</ins><span class="cx"> virtual bool enabled() = 0;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformcocoaSearchPopupMenuCocoah"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.h (0 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.h         (rev 0)
+++ branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * 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.
+ */
+
+#ifndef SearchPopupMenuCocoa_h
+#define SearchPopupMenuCocoa_h
+
+#import "SearchPopupMenu.h"
+
+namespace WebCore {
+
+WEBCORE_EXPORT void saveRecentSearches(const String& name, const Vector<RecentSearch>&);
+WEBCORE_EXPORT Vector<RecentSearch> loadRecentSearches(const String& name);
+
+}
+
+#endif // SearchPopupMenuCocoa_h
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformcocoaSearchPopupMenuCocoamm"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.mm (0 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.mm         (rev 0)
+++ branches/safari-601-branch/Source/WebCore/platform/cocoa/SearchPopupMenuCocoa.mm        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+/*
+ * 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.
+ */
+
+#import "config.h"
+#import "SearchPopupMenuCocoa.h"
+
+using namespace std::chrono;
+
+namespace WebCore {
+
+static NSString * const dateKey = @"date";
+static NSString * const itemsKey = @"items";
+static NSString * const searchesKey = @"searches";
+static NSString * const searchStringKey = @"searchString";
+
+static NSString *searchFieldRecentSearchesStorageDirectory()
+{
+ NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
+ if (!appName)
+ appName = [[NSProcessInfo processInfo] processName];
+
+ return [[NSHomeDirectory() stringByAppendingPathComponent:@"Library/WebKit"] stringByAppendingPathComponent:appName];
+}
+
+static NSString *searchFieldRecentSearchesPlistPath()
+{
+ return [searchFieldRecentSearchesStorageDirectory() stringByAppendingPathComponent:@"RecentSearches.plist"];
+}
+
+static RetainPtr<NSMutableDictionary> readSearchFieldRecentSearchesPlist()
+{
+ return adoptNS([[NSMutableDictionary alloc] initWithContentsOfFile:searchFieldRecentSearchesPlistPath()]);
+}
+
+static system_clock::time_point toSystemClockTime(NSDate *date)
+{
+ ASSERT(date);
+
+ return system_clock::time_point(duration_cast<system_clock::duration>(duration<double>(date.timeIntervalSince1970)));
+}
+
+static NSDate *toNSDateFromSystemClock(system_clock::time_point time)
+{
+ return [NSDate dateWithTimeIntervalSince1970:duration_cast<duration<double>>(time.time_since_epoch()).count()];
+}
+
+void saveRecentSearches(const String& name, const Vector<RecentSearch>& searchItems)
+{
+ if (name.isEmpty())
+ return;
+
+ RetainPtr<NSDictionary> recentSearchesPlist = readSearchFieldRecentSearchesPlist();
+ RetainPtr<NSMutableDictionary> itemsDictionary = [recentSearchesPlist objectForKey:itemsKey];
+ // The NSMutableDictionary method we use to read the property list guarantees we get only
+ // mutable containers, but it does not guarantee the file has a dictionary as expected.
+ if (![itemsDictionary isKindOfClass:[NSDictionary class]]) {
+ itemsDictionary = adoptNS([[NSMutableDictionary alloc] init]);
+ recentSearchesPlist = adoptNS([[NSDictionary alloc] initWithObjectsAndKeys:itemsDictionary.get(), itemsKey, nil]);
+ }
+
+ if (searchItems.isEmpty())
+ [itemsDictionary removeObjectForKey:name];
+ else {
+ RetainPtr<NSMutableArray> items = adoptNS([[NSMutableArray alloc] initWithCapacity:searchItems.size()]);
+ for (auto& searchItem : searchItems)
+ [items addObject:adoptNS([[NSDictionary alloc] initWithObjectsAndKeys:searchItem.string, searchStringKey, toNSDateFromSystemClock(searchItem.time), dateKey, nil]).get()];
+
+ [itemsDictionary setObject:adoptNS([[NSDictionary alloc] initWithObjectsAndKeys:items.get(), searchesKey, nil]).get() forKey:name];
+ }
+
+ [recentSearchesPlist writeToFile:searchFieldRecentSearchesPlistPath() atomically:NO];
+}
+
+Vector<RecentSearch> loadRecentSearches(const String& name)
+{
+ Vector<RecentSearch> searchItems;
+
+ if (name.isEmpty())
+ return searchItems;
+
+ RetainPtr<NSMutableDictionary> recentSearchesPlist = readSearchFieldRecentSearchesPlist();
+ if (!recentSearchesPlist)
+ return searchItems;
+
+ NSDictionary *items = [recentSearchesPlist objectForKey:itemsKey];
+ if (![items isKindOfClass:[NSDictionary class]])
+ return searchItems;
+
+ NSDictionary *nameItems = [items objectForKey:name];
+ if (![nameItems isKindOfClass:[NSDictionary class]])
+ return searchItems;
+
+ NSArray *recentSearches = [nameItems objectForKey:searchesKey];
+ if (![recentSearches isKindOfClass:[NSArray class]])
+ return searchItems;
+
+ for (NSDictionary *item in recentSearches) {
+ if (![item isKindOfClass:[NSDictionary class]])
+ continue;
+
+ NSString *searchString = [item objectForKey:searchStringKey];
+ if (![searchString isKindOfClass:[NSString class]])
+ continue;
+
+ NSDate *date = [item objectForKey:dateKey];
+ if (![date isKindOfClass:[NSDate class]])
+ continue;
+
+ searchItems.append({ String{ searchString }, toSystemClockTime(date) });
+ }
+
+ return searchItems;
+}
+
+}
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformwinSearchPopupMenuWincpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void SearchPopupMenuWin::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
</del><ins>+void SearchPopupMenuWin::saveRecentSearches(const AtomicString& name, const Vector<RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><span class="cx"> if (name.isEmpty())
</span><span class="cx"> return;
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> if (size) {
</span><span class="cx"> items = adoptCF(CFArrayCreateMutable(0, size, &kCFTypeArrayCallBacks));
</span><span class="cx"> for (size_t i = 0; i < size; ++i)
</span><del>- CFArrayAppendValue(items.get(), searchItems[i].createCFString().get());
</del><ins>+ CFArrayAppendValue(items.get(), searchItems[i].string.createCFString().get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CFPreferencesSetAppValue(autosaveKey(name).get(), items.get(), kCFPreferencesCurrentApplication);
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SearchPopupMenuWin::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)
</del><ins>+void SearchPopupMenuWin::loadRecentSearches(const AtomicString& name, Vector<RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><span class="cx"> if (name.isEmpty())
</span><span class="cx"> return;
</span><span class="lines">@@ -90,8 +90,10 @@
</span><span class="cx"> size_t size = CFArrayGetCount(items.get());
</span><span class="cx"> for (size_t i = 0; i < size; ++i) {
</span><span class="cx"> CFStringRef item = (CFStringRef)CFArrayGetValueAtIndex(items.get(), i);
</span><del>- if (CFGetTypeID(item) == CFStringGetTypeID())
- searchItems.append(item);
</del><ins>+ if (CFGetTypeID(item) == CFStringGetTypeID()) {
+ // We are choosing not to use or store search times on Windows at this time, so for now it's OK to use a "distant past" time as a placeholder.
+ searchItems.append({ String{ item }, std::chrono::system_clock::time_point::min() });
+ }
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformwinSearchPopupMenuWinh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/platform/win/SearchPopupMenuWin.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> SearchPopupMenuWin(PopupMenuClient*);
</span><span class="cx">
</span><span class="cx"> virtual PopupMenu* popupMenu();
</span><del>- virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems);
- virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems);
</del><ins>+ virtual void saveRecentSearches(const AtomicString& name, const Vector<RecentSearch>&);
+ virtual void loadRecentSearches(const AtomicString& name, Vector<RecentSearch>&);
</ins><span class="cx"> virtual bool enabled();
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorerenderingRenderSearchFieldcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -37,11 +37,11 @@
</span><span class="cx"> #include "LocalizedStrings.h"
</span><span class="cx"> #include "Page.h"
</span><span class="cx"> #include "PlatformKeyboardEvent.h"
</span><ins>+#include "PopupMenu.h"
</ins><span class="cx"> #include "RenderLayer.h"
</span><span class="cx"> #include "RenderScrollbar.h"
</span><span class="cx"> #include "RenderTheme.h"
</span><span class="cx"> #include "RenderView.h"
</span><del>-#include "SearchPopupMenu.h"
</del><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="cx"> #include "TextControlInnerElements.h"
</span><span class="lines">@@ -88,8 +88,12 @@
</span><span class="cx"> if (frame().page()->usesEphemeralSession())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_recentSearches.removeAll(value);
- m_recentSearches.insert(0, value);
</del><ins>+ m_recentSearches.removeAllMatching([value] (const RecentSearch& recentSearch) {
+ return recentSearch.string == value;
+ });
+
+ RecentSearch recentSearch = { value, std::chrono::system_clock::now() };
+ m_recentSearches.insert(0, recentSearch);
</ins><span class="cx"> while (static_cast<int>(m_recentSearches.size()) > inputElement().maxResults())
</span><span class="cx"> m_recentSearches.removeLast();
</span><span class="cx">
</span><span class="lines">@@ -228,7 +232,7 @@
</span><span class="cx"> if (static_cast<int>(listIndex) == (size - 1))
</span><span class="cx"> return searchMenuClearRecentSearchesText();
</span><span class="cx"> #endif
</span><del>- return m_recentSearches[listIndex - 1];
</del><ins>+ return m_recentSearches[listIndex - 1].string;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String RenderSearchField::itemLabel(unsigned) const
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorerenderingRenderSearchFieldh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebCore/rendering/RenderSearchField.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -25,11 +25,11 @@
</span><span class="cx">
</span><span class="cx"> #include "PopupMenuClient.h"
</span><span class="cx"> #include "RenderTextControlSingleLine.h"
</span><ins>+#include "SearchPopupMenu.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class HTMLInputElement;
</span><del>-class SearchPopupMenu;
</del><span class="cx">
</span><span class="cx"> class RenderSearchField final : public RenderTextControlSingleLine, private PopupMenuClient {
</span><span class="cx"> public:
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">
</span><span class="cx"> bool m_searchPopupIsVisible;
</span><span class="cx"> RefPtr<SearchPopupMenu> m_searchPopup;
</span><del>- Vector<String> m_recentSearches;
</del><ins>+ Vector<RecentSearch> m_recentSearches;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/ios/ChangeLog (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/ios/ChangeLog        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit/ios/ChangeLog        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2015-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r191084. rdar://problem/23715623
+
+ 2015-10-14 Zhuo Li <zachli@apple.com>
+
+ Augment <input type=search>’s recent search history with the time each entry was added,
+ in order to allow time-based clearing of search history.
+ https://bugs.webkit.org/show_bug.cgi?id=148388.
+
+ Reviewed by Darin Adler.
+
+ Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
+ that consists search string and time, for recent searches in order to store additional time information.
+
+ * WebCoreSupport/SearchPopupMenuIOS.cpp:
+ (SearchPopupMenuIOS::saveRecentSearches):
+ (SearchPopupMenuIOS::loadRecentSearches):
+ * WebCoreSupport/SearchPopupMenuIOS.h:
+
</ins><span class="cx"> 2015-07-23 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r187113
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitiosWebCoreSupportSearchPopupMenuIOScpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -35,11 +35,11 @@
</span><span class="cx"> return m_popup.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SearchPopupMenuIOS::saveRecentSearches(const AtomicString&, const Vector<String>& /*searchItems*/)
</del><ins>+void SearchPopupMenuIOS::saveRecentSearches(const AtomicString&, const Vector<RecentSearch>& /*searchItems*/)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SearchPopupMenuIOS::loadRecentSearches(const AtomicString&, Vector<String>& /*searchItems*/)
</del><ins>+void SearchPopupMenuIOS::loadRecentSearches(const AtomicString&, Vector<RecentSearch>& /*searchItems*/)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitiosWebCoreSupportSearchPopupMenuIOSh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit/ios/WebCoreSupport/SearchPopupMenuIOS.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> SearchPopupMenuIOS(WebCore::PopupMenuClient*);
</span><span class="cx">
</span><span class="cx"> virtual WebCore::PopupMenu* popupMenu() override;
</span><del>- virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) override;
- virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) override;
</del><ins>+ virtual void saveRecentSearches(const AtomicString& name, const Vector<WebCore::RecentSearch>&) override;
+ virtual void loadRecentSearches(const AtomicString& name, Vector<WebCore::RecentSearch>&) override;
</ins><span class="cx"> virtual bool enabled() override;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/mac/ChangeLog (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/mac/ChangeLog        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit/mac/ChangeLog        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r191084. rdar://problem/23715623
+
+ 2015-10-14 Zhuo Li <zachli@apple.com>
+
+ Augment <input type=search>’s recent search history with the time each entry was added,
+ in order to allow time-based clearing of search history.
+ https://bugs.webkit.org/show_bug.cgi?id=148388.
+
+ Reviewed by Darin Adler.
+
+ Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
+ that consists search string and time, for recent searches in order to store additional time information.
+
+ All these new RecentSearches are stored in a plist in which the structure looks like:
+ Root {
+ "items": {
+ autosave name: {
+ "searches": [
+ { "searchString": searchString, "date": date },
+ ...
+ ]
+ }
+ }
+ }
+
+ * WebCoreSupport/SearchPopupMenuMac.h:
+ * WebCoreSupport/SearchPopupMenuMac.mm:
+ (SearchPopupMenuMac::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
+ (SearchPopupMenuMac::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
+ (autosaveKey): Deleted.
+
</ins><span class="cx"> 2015-10-17 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Build fix after r191260
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitmacWebCoreSupportSearchPopupMenuMach"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> #ifndef SearchPopupMenuMac_h
</span><span class="cx"> #define SearchPopupMenuMac_h
</span><span class="cx">
</span><del>-#include <WebCore/SearchPopupMenu.h>
</del><ins>+#include <WebCore/SearchPopupMenuCocoa.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class PopupMenuClient;
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> ~SearchPopupMenuMac();
</span><span class="cx">
</span><span class="cx"> virtual WebCore::PopupMenu* popupMenu() override;
</span><del>- virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) override;
- virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) override;
</del><ins>+ virtual void saveRecentSearches(const AtomicString& name, const Vector<WebCore::RecentSearch>&) override;
+ virtual void loadRecentSearches(const AtomicString& name, Vector<WebCore::RecentSearch>&) override;
</ins><span class="cx"> virtual bool enabled() override;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitmacWebCoreSupportSearchPopupMenuMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.mm (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.mm        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.mm        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -23,9 +23,7 @@
</span><span class="cx"> #include "PopupMenuMac.h"
</span><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx">
</span><del>-using namespace WebCore;
-
-SearchPopupMenuMac::SearchPopupMenuMac(PopupMenuClient* client)
</del><ins>+SearchPopupMenuMac::SearchPopupMenuMac(WebCore::PopupMenuClient* client)
</ins><span class="cx"> : m_popup(adoptRef(new PopupMenuMac(client)))
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -34,13 +32,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static NSString *autosaveKey(const String& name)
</del><ins>+WebCore::PopupMenu* SearchPopupMenuMac::popupMenu()
</ins><span class="cx"> {
</span><del>- return [@"com.apple.WebKit.searchField:" stringByAppendingString:name];
-}
-
-PopupMenu* SearchPopupMenuMac::popupMenu()
-{
</del><span class="cx"> return m_popup.get();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -49,31 +42,12 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SearchPopupMenuMac::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
</del><ins>+void SearchPopupMenuMac::saveRecentSearches(const AtomicString& name, const Vector<WebCore::RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><del>- if (name.isEmpty())
- return;
-
- if (searchItems.isEmpty()) {
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:autosaveKey(name)];
- return;
- }
-
- RetainPtr<NSMutableArray> items = adoptNS([[NSMutableArray alloc] initWithCapacity:searchItems.size()]);
- for (const auto& searchItem: searchItems)
- [items addObject:searchItem];
-
- [[NSUserDefaults standardUserDefaults] setObject:items.get() forKey:autosaveKey(name)];
</del><ins>+ WebCore::saveRecentSearches(name, searchItems);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void SearchPopupMenuMac::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)
</del><ins>+void SearchPopupMenuMac::loadRecentSearches(const AtomicString& name, Vector<WebCore::RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><del>- if (name.isEmpty())
- return;
-
- searchItems.clear();
- for (NSString *item in [[NSUserDefaults standardUserDefaults] arrayForKey:autosaveKey(name)]) {
- if ([item isKindOfClass:[NSString class]])
- searchItems.append(item);
- }
</del><ins>+ searchItems = WebCore::loadRecentSearches(name);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/ChangeLog        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2015-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r191084. rdar://problem/23715623
+
+ 2015-10-14 Zhuo Li <zachli@apple.com>
+
+ Augment <input type=search>’s recent search history with the time each entry was added,
+ in order to allow time-based clearing of search history.
+ https://bugs.webkit.org/show_bug.cgi?id=148388.
+
+ Reviewed by Darin Adler.
+
+ Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
+ that consists search string and time, for recent searches in order to store additional time
+ information.
+
+ All these new RecentSearches are stored in a plist in which the structure looks like:
+ Root {
+ "items": {
+ autosave name: {
+ "searches": [
+ { "searchString": searchString, "date": date },
+ ...
+ ]
+ }
+ }
+ }
+
+ * Scripts/webkit/messages.py:
+ (headers_for_type):
+ * Shared/WebCoreArgumentCoders.cpp:
+ (IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
+ (IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
+ * Shared/WebCoreArgumentCoders.h:
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
+ (WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/efl/WebPageProxyEfl.cpp:
+ (WebKit::WebPageProxy::saveRecentSearches):
+ (WebKit::WebPageProxy::loadRecentSearches):
+ * UIProcess/gtk/WebPageProxyGtk.cpp:
+ (WebKit::WebPageProxy::saveRecentSearches):
+ (WebKit::WebPageProxy::loadRecentSearches):
+ * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
+ (WebKit::WebSearchPopupMenu::saveRecentSearches):
+ (WebKit::WebSearchPopupMenu::loadRecentSearches):
+ * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
+
</ins><span class="cx"> 2015-12-09 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r190505.
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2Scriptswebkitmessagespy"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/Scripts/webkit/messages.py (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/Scripts/webkit/messages.py        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/Scripts/webkit/messages.py        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -361,6 +361,7 @@
</span><span class="cx"> 'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
</span><span class="cx"> 'WebCore::PasteboardImage': ['<WebCore/Pasteboard.h>'],
</span><span class="cx"> 'WebCore::PasteboardWebContent': ['<WebCore/Pasteboard.h>'],
</span><ins>+ 'WebCore::RecentSearch': ['<WebCore/SearchPopupMenu.h>'],
</ins><span class="cx"> 'WebCore::TextCheckingRequestData': ['<WebCore/TextChecking.h>'],
</span><span class="cx"> 'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
</span><span class="cx"> 'WebCore::TextIndicatorData': ['<WebCore/TextIndicator.h>'],
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx"> #include <WebCore/ResourceResponse.h>
</span><span class="cx"> #include <WebCore/ScrollingConstraints.h>
</span><span class="cx"> #include <WebCore/ScrollingCoordinator.h>
</span><ins>+#include <WebCore/SearchPopupMenu.h>
</ins><span class="cx"> #include <WebCore/SessionID.h>
</span><span class="cx"> #include <WebCore/TextCheckerClient.h>
</span><span class="cx"> #include <WebCore/TextIndicator.h>
</span><span class="lines">@@ -482,6 +483,22 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void ArgumentCoder<RecentSearch>::encode(ArgumentEncoder& encoder, const RecentSearch& recentSearch)
+{
+ encoder << recentSearch.string << recentSearch.time;
+}
+
+bool ArgumentCoder<RecentSearch>::decode(ArgumentDecoder& decoder, RecentSearch& recentSearch)
+{
+ if (!decoder.decode(recentSearch.string))
+ return false;
+
+ if (!decoder.decode(recentSearch.time))
+ return false;
+
+ return true;
+}
+
</ins><span class="cx"> template<> struct ArgumentCoder<Region::Span> {
</span><span class="cx"> static void encode(ArgumentEncoder&, const Region::Span&);
</span><span class="cx"> static bool decode(ArgumentDecoder&, Region::Span&);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> struct PasteboardImage;
</span><span class="cx"> struct PasteboardWebContent;
</span><span class="cx"> struct PluginInfo;
</span><ins>+struct RecentSearch;
</ins><span class="cx"> struct ScrollableAreaParameters;
</span><span class="cx"> struct TextCheckingResult;
</span><span class="cx"> struct TextIndicatorData;
</span><span class="lines">@@ -482,6 +483,11 @@
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+template<> struct ArgumentCoder<WebCore::RecentSearch> {
+ static void encode(ArgumentEncoder&, const WebCore::RecentSearch&);
+ static bool decode(ArgumentDecoder&, WebCore::RecentSearch&);
+};
+
</ins><span class="cx"> } // namespace IPC
</span><span class="cx">
</span><span class="cx"> #endif // WebCoreArgumentCoders_h
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessCocoaWebPageProxyCocoamm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -26,50 +26,29 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx">
</span><ins>+#import <WebCore/SearchPopupMenuCocoa.h>
</ins><span class="cx"> #import <wtf/cf/TypeCastsCF.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-static RetainPtr<CFStringRef> autosaveKey(const String& name)
</del><ins>+void WebPageProxy::saveRecentSearches(const String& name, const Vector<WebCore::RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><del>- return String("com.apple.WebKit.searchField:" + name).createCFString();
-}
-
-void WebPageProxy::saveRecentSearches(const String& name, const Vector<String>& searchItems)
-{
</del><span class="cx"> if (!name) {
</span><span class="cx"> // FIXME: This should be a message check.
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RetainPtr<CFMutableArrayRef> items;
-
- if (!searchItems.isEmpty()) {
- items = adoptCF(CFArrayCreateMutable(0, searchItems.size(), &kCFTypeArrayCallBacks));
-
- for (const auto& searchItem : searchItems)
- CFArrayAppendValue(items.get(), searchItem.createCFString().get());
- }
-
- CFPreferencesSetAppValue(autosaveKey(name).get(), items.get(), kCFPreferencesCurrentApplication);
- CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
</del><ins>+ WebCore::saveRecentSearches(name, searchItems);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::loadRecentSearches(const String& name, Vector<String>& searchItems)
</del><ins>+void WebPageProxy::loadRecentSearches(const String& name, Vector<WebCore::RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><span class="cx"> if (!name) {
</span><span class="cx"> // FIXME: This should be a message check.
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto items = adoptCF(dynamic_cf_cast<CFArrayRef>(CFPreferencesCopyAppValue(autosaveKey(name).get(), kCFPreferencesCurrentApplication)));
- if (!items)
- return;
-
- for (size_t i = 0, size = CFArrayGetCount(items.get()); i < size; ++i) {
- if (auto item = dynamic_cf_cast<CFStringRef>(CFArrayGetValueAtIndex(items.get(), i)))
- searchItems.append(item);
- }
</del><ins>+ searchItems = WebCore::loadRecentSearches(name);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx"> #include <WebCore/Page.h>
</span><span class="cx"> #include <WebCore/PlatformScreen.h>
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><ins>+#include <WebCore/SearchPopupMenu.h>
</ins><span class="cx"> #include <WebCore/TextChecking.h>
</span><span class="cx"> #include <WebCore/TextGranularity.h>
</span><span class="cx"> #include <WebCore/ViewState.h>
</span><span class="lines">@@ -1301,8 +1302,8 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // Search popup results
</span><del>- void saveRecentSearches(const String&, const Vector<String>&);
- void loadRecentSearches(const String&, Vector<String>&);
</del><ins>+ void saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&);
+ void loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> // Speech.
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -379,8 +379,8 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> # Search popup menus
</span><del>- SaveRecentSearches(String name, Vector<String> searchItems)
- LoadRecentSearches(String name) -> (Vector<String> result)
</del><ins>+ SaveRecentSearches(String name, Vector<WebCore::RecentSearch> searchItems)
+ LoadRecentSearches(String name) -> (Vector<WebCore::RecentSearch> result)
</ins><span class="cx">
</span><span class="cx"> SavePDFToFileInDownloadsFolder(String suggestedFilename, String originatingURLString, IPC::DataReference data)
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcesseflWebPageProxyEflcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -73,12 +73,12 @@
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::saveRecentSearches(const String&, const Vector<String>&)
</del><ins>+void WebPageProxy::saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::loadRecentSearches(const String&, Vector<String>&)
</del><ins>+void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessgtkWebPageProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -57,12 +57,12 @@
</span><span class="cx"> m_accessibilityPlugID = plugID;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::saveRecentSearches(const String&, const Vector<String>&)
</del><ins>+void WebPageProxy::saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::loadRecentSearches(const String&, Vector<String>&)
</del><ins>+void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2WebProcessWebCoreSupportWebSearchPopupMenucpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> return m_popup.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebSearchPopupMenu::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
</del><ins>+void WebSearchPopupMenu::saveRecentSearches(const AtomicString& name, const Vector<RecentSearch>& searchItems)
</ins><span class="cx"> {
</span><span class="cx"> if (name.isEmpty())
</span><span class="cx"> return;
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::SaveRecentSearches(name, searchItems), page->pageID());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebSearchPopupMenu::loadRecentSearches(const AtomicString& name, Vector<String>& resultItems)
</del><ins>+void WebSearchPopupMenu::loadRecentSearches(const AtomicString& name, Vector<RecentSearch>& resultItems)
</ins><span class="cx"> {
</span><span class="cx"> if (name.isEmpty())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2WebProcessWebCoreSupportWebSearchPopupMenuh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.h (193959 => 193960)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.h        2015-12-11 17:45:16 UTC (rev 193959)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.h        2015-12-11 18:26:12 UTC (rev 193960)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> static Ref<WebSearchPopupMenu> create(WebPage*, WebCore::PopupMenuClient*);
</span><span class="cx">
</span><span class="cx"> virtual WebCore::PopupMenu* popupMenu() override;
</span><del>- virtual void saveRecentSearches(const WTF::AtomicString& name, const Vector<String>& searchItems) override;
- virtual void loadRecentSearches(const WTF::AtomicString& name, Vector<String>& searchItems) override;
</del><ins>+ virtual void saveRecentSearches(const WTF::AtomicString& name, const Vector<WebCore::RecentSearch>&) override;
+ virtual void loadRecentSearches(const WTF::AtomicString& name, Vector<WebCore::RecentSearch>&) override;
</ins><span class="cx"> virtual bool enabled() override;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre>
</div>
</div>
</body>
</html>