<!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>[170368] trunk/Source/WebKit/mac</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/170368">170368</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-06-24 10:17:27 -0700 (Tue, 24 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove unused history visit code from WebHistoryItem
https://bugs.webkit.org/show_bug.cgi?id=134201

Reviewed by Sam Weinig.

* History/HistoryPropertyList.h:
* History/HistoryPropertyList.mm:
(HistoryPropertyListWriter::HistoryPropertyListWriter):
(HistoryPropertyListWriter::writeHistoryItem):
* History/WebHistory.mm:
(-[WebHistoryPrivate visitedURL:withTitle:]):
(-[WebHistoryPrivate addItem:discardDuplicate:]):
(-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
(-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]): Deleted.
(-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]): Deleted.
* History/WebHistoryInternal.h:
* History/WebHistoryItem.mm:
(-[WebHistoryItem copyWithZone:]):
(-[WebHistoryItem initFromDictionaryRepresentation:]):
(-[WebHistoryItem _visitedWithTitle:]):
(-[WebHistoryItem setVisitCount:]): Deleted.
(-[WebHistoryItem _mergeAutoCompleteHints:]): Deleted.
(-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]): Deleted.
(-[WebHistoryItem _recordInitialVisit]): Deleted.
(timeToDay): Deleted.
(-[WebHistoryItem _padDailyCountsForNewVisit:]): Deleted.
(-[WebHistoryItem _collapseDailyVisitsToWeekly]): Deleted.
(-[WebHistoryItem _recordVisitAtTime:increaseVisitCount:]): Deleted.
(-[WebHistoryItem _setLastVisitedTimeInterval:]): Deleted.
* History/WebHistoryItemInternal.h:
* History/WebHistoryItemPrivate.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacHistoryHistoryPropertyListh">trunk/Source/WebKit/mac/History/HistoryPropertyList.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryHistoryPropertyListmm">trunk/Source/WebKit/mac/History/HistoryPropertyList.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistorymm">trunk/Source/WebKit/mac/History/WebHistory.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryInternalh">trunk/Source/WebKit/mac/History/WebHistoryInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemmm">trunk/Source/WebKit/mac/History/WebHistoryItem.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemInternalh">trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemPrivateh">trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-06-23  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove unused history visit code from WebHistoryItem
+        https://bugs.webkit.org/show_bug.cgi?id=134201
+
+        Reviewed by Sam Weinig.
+
+        * History/HistoryPropertyList.h:
+        * History/HistoryPropertyList.mm:
+        (HistoryPropertyListWriter::HistoryPropertyListWriter):
+        (HistoryPropertyListWriter::writeHistoryItem):
+        * History/WebHistory.mm:
+        (-[WebHistoryPrivate visitedURL:withTitle:]):
+        (-[WebHistoryPrivate addItem:discardDuplicate:]):
+        (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
+        (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]): Deleted.
+        (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]): Deleted.
+        * History/WebHistoryInternal.h:
+        * History/WebHistoryItem.mm:
+        (-[WebHistoryItem copyWithZone:]):
+        (-[WebHistoryItem initFromDictionaryRepresentation:]):
+        (-[WebHistoryItem _visitedWithTitle:]):
+        (-[WebHistoryItem setVisitCount:]): Deleted.
+        (-[WebHistoryItem _mergeAutoCompleteHints:]): Deleted.
+        (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]): Deleted.
+        (-[WebHistoryItem _recordInitialVisit]): Deleted.
+        (timeToDay): Deleted.
+        (-[WebHistoryItem _padDailyCountsForNewVisit:]): Deleted.
+        (-[WebHistoryItem _collapseDailyVisitsToWeekly]): Deleted.
+        (-[WebHistoryItem _recordVisitAtTime:increaseVisitCount:]): Deleted.
+        (-[WebHistoryItem _setLastVisitedTimeInterval:]): Deleted.
+        * History/WebHistoryItemInternal.h:
+        * History/WebHistoryItemPrivate.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::updateGlobalHistory):
+
</ins><span class="cx"> 2014-06-24  Eva Balazsfalvi  &lt;evab.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r170235): Remove incorrect ifdef guard
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryHistoryPropertyListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/HistoryPropertyList.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/HistoryPropertyList.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/HistoryPropertyList.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -47,16 +47,12 @@
</span><span class="cx">     virtual void writeObjects(BinaryPropertyListObjectStream&amp;);
</span><span class="cx">     virtual UInt8* buffer(size_t);
</span><span class="cx"> 
</span><del>-    const String m_dailyVisitCountsKey;
</del><span class="cx">     const String m_displayTitleKey;
</span><span class="cx">     const String m_lastVisitWasFailureKey;
</span><del>-    const String m_lastVisitWasHTTPNonGetKey;
</del><span class="cx">     const String m_lastVisitedDateKey;
</span><span class="cx">     const String m_redirectURLsKey;
</span><span class="cx">     const String m_titleKey;
</span><span class="cx">     const String m_urlKey;
</span><del>-    const String m_visitCountKey;
-    const String m_weeklyVisitCountsKey;
</del><span class="cx"> 
</span><span class="cx">     UInt8* m_buffer;
</span><span class="cx">     size_t m_bufferSize;
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryHistoryPropertyListmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/HistoryPropertyList.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/HistoryPropertyList.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/HistoryPropertyList.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -34,16 +34,12 @@
</span><span class="cx"> static const int currentFileVersion = 1;
</span><span class="cx"> 
</span><span class="cx"> HistoryPropertyListWriter::HistoryPropertyListWriter()
</span><del>-    : m_dailyVisitCountsKey(&quot;D&quot;)
-    , m_displayTitleKey(&quot;displayTitle&quot;)
</del><ins>+    : m_displayTitleKey(&quot;displayTitle&quot;)
</ins><span class="cx">     , m_lastVisitWasFailureKey(&quot;lastVisitWasFailure&quot;)
</span><del>-    , m_lastVisitWasHTTPNonGetKey(&quot;lastVisitWasHTTPNonGet&quot;)
</del><span class="cx">     , m_lastVisitedDateKey(&quot;lastVisitedDate&quot;)
</span><span class="cx">     , m_redirectURLsKey(&quot;redirectURLs&quot;)
</span><span class="cx">     , m_titleKey(&quot;title&quot;)
</span><span class="cx">     , m_urlKey(&quot;&quot;)
</span><del>-    , m_visitCountKey(&quot;visitCount&quot;)
-    , m_weeklyVisitCountsKey(&quot;W&quot;)
</del><span class="cx">     , m_buffer(0)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -94,10 +90,7 @@
</span><span class="cx">     const String&amp; title = item-&gt;title();
</span><span class="cx">     const String&amp; displayTitle = item-&gt;alternateTitle();
</span><span class="cx">     double lastVisitedDate = webHistoryItem-&gt;_private-&gt;_lastVisitedTime;
</span><del>-    int visitCount = webHistoryItem-&gt;_private-&gt;_visitCount;
</del><span class="cx">     Vector&lt;String&gt;* redirectURLs = item-&gt;redirectURLs();
</span><del>-    const Vector&lt;int&gt;&amp; dailyVisitCounts = webHistoryItem-&gt;_private-&gt;_dailyVisitCounts;
-    const Vector&lt;int&gt;&amp; weeklyVisitCounts = webHistoryItem-&gt;_private-&gt;_weeklyVisitCounts;
</del><span class="cx"> 
</span><span class="cx">     // keys
</span><span class="cx">     stream.writeString(m_urlKey);
</span><span class="lines">@@ -107,18 +100,10 @@
</span><span class="cx">         stream.writeString(m_displayTitleKey);
</span><span class="cx">     if (lastVisitedDate)
</span><span class="cx">         stream.writeString(m_lastVisitedDateKey);
</span><del>-    if (visitCount)
-        stream.writeString(m_visitCountKey);
</del><span class="cx">     if (item-&gt;lastVisitWasFailure())
</span><span class="cx">         stream.writeString(m_lastVisitWasFailureKey);
</span><del>-    if (webHistoryItem-&gt;_private-&gt;_lastVisitWasHTTPNonGet)
-        stream.writeString(m_lastVisitWasHTTPNonGetKey);
</del><span class="cx">     if (redirectURLs)
</span><span class="cx">         stream.writeString(m_redirectURLsKey);
</span><del>-    if (!dailyVisitCounts.isEmpty())
-        stream.writeString(m_dailyVisitCountsKey);
-    if (!weeklyVisitCounts.isEmpty())
-        stream.writeString(m_weeklyVisitCountsKey);
</del><span class="cx"> 
</span><span class="cx">     // values
</span><span class="cx">     stream.writeUniqueString(item-&gt;urlString());
</span><span class="lines">@@ -131,14 +116,8 @@
</span><span class="cx">         snprintf(buffer, sizeof(buffer), &quot;%.1lf&quot;, lastVisitedDate);
</span><span class="cx">         stream.writeUniqueString(buffer);
</span><span class="cx">     }
</span><del>-    if (visitCount)
-        stream.writeInteger(visitCount);
</del><span class="cx">     if (item-&gt;lastVisitWasFailure())
</span><span class="cx">         stream.writeBooleanTrue();
</span><del>-    if (webHistoryItem-&gt;_private-&gt;_lastVisitWasHTTPNonGet) {
-        ASSERT(item-&gt;urlString().startsWith(&quot;http:&quot;, false) || item-&gt;urlString().startsWith(&quot;https:&quot;, false));
-        stream.writeBooleanTrue();
-    }
</del><span class="cx">     if (redirectURLs) {
</span><span class="cx">         size_t redirectArrayStart = stream.writeArrayStart();
</span><span class="cx">         size_t size = redirectURLs-&gt;size();
</span><span class="lines">@@ -147,10 +126,6 @@
</span><span class="cx">             stream.writeUniqueString(redirectURLs-&gt;at(i));
</span><span class="cx">         stream.writeArrayEnd(redirectArrayStart);
</span><span class="cx">     }
</span><del>-    if (size_t size = dailyVisitCounts.size())
-        stream.writeIntegerArray(dailyVisitCounts.data(), size);
-    if (size_t size = weeklyVisitCounts.size())
-        stream.writeIntegerArray(weeklyVisitCounts.data(), size);
</del><span class="cx"> 
</span><span class="cx">     stream.writeDictionaryEnd(itemDictionaryStart);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistorymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistory.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistory.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistory.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     int ageInDaysLimit;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount;
</del><ins>+- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title;
</ins><span class="cx"> 
</span><span class="cx"> - (BOOL)addItem:(WebHistoryItem *)entry discardDuplicate:(BOOL)discardDuplicate;
</span><span class="cx"> - (void)addItems:(NSArray *)newEntries;
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount
</del><ins>+- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(url);
</span><span class="cx">     ASSERT(title);
</span><span class="lines">@@ -318,11 +318,10 @@
</span><span class="cx">         BOOL itemWasInDateCaches = [self removeItemFromDateCaches:entry];
</span><span class="cx">         ASSERT_UNUSED(itemWasInDateCaches, itemWasInDateCaches);
</span><span class="cx"> 
</span><del>-        [entry _visitedWithTitle:title increaseVisitCount:increaseVisitCount];
</del><ins>+        [entry _visitedWithTitle:title];
</ins><span class="cx">     } else {
</span><span class="cx">         LOG(History, &quot;Adding new global history entry for %@&quot;, url);
</span><span class="cx">         entry = [[WebHistoryItem alloc] initWithURLString:URLString title:title lastVisitedTimeInterval:[NSDate timeIntervalSinceReferenceDate]];
</span><del>-        [entry _recordInitialVisit];
</del><span class="cx">         [_entriesByURL setObject:entry forKey:URLString];
</span><span class="cx">         [entry release];
</span><span class="cx">     }
</span><span class="lines">@@ -349,10 +348,6 @@
</span><span class="cx">         // until we're done with oldEntry.
</span><span class="cx">         [oldEntry retain];
</span><span class="cx">         [self removeItemForURLString:URLString];
</span><del>-
-        // If we already have an item with this URL, we need to merge info that drives the
-        // URL autocomplete heuristics from that item into the new one.
-        [entry _mergeAutoCompleteHints:oldEntry];
</del><span class="cx">         [oldEntry release];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -369,10 +364,6 @@
</span><span class="cx">             // until we're done with oldEntry.
</span><span class="cx">             [otherEntry retain];
</span><span class="cx">             [self removeItemForURLString:URLString];
</span><del>-
-            // If we already have an item with this URL, we need to merge info that drives the
-            // URL autocomplete heuristics from that item into the new one.
-            [entry _mergeAutoCompleteHints:otherEntry];
</del><span class="cx">             [otherEntry release];
</span><span class="cx"> 
</span><span class="cx">             [self addItemToDateCaches:entry];
</span><span class="lines">@@ -930,16 +921,13 @@
</span><span class="cx"> 
</span><span class="cx"> @implementation WebHistory (WebInternal)
</span><span class="cx"> 
</span><del>-- (void)_visitedURL:(NSURL *)url withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure increaseVisitCount:(BOOL)increaseVisitCount
</del><ins>+- (void)_visitedURL:(NSURL *)url withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure
</ins><span class="cx"> {
</span><del>-    WebHistoryItem *entry = [_historyPrivate visitedURL:url withTitle:title increaseVisitCount:increaseVisitCount];
</del><ins>+    WebHistoryItem *entry = [_historyPrivate visitedURL:url withTitle:title];
</ins><span class="cx"> 
</span><span class="cx">     HistoryItem* item = core(entry);
</span><span class="cx">     item-&gt;setLastVisitWasFailure(wasFailure);
</span><span class="cx"> 
</span><del>-    if ([method length])
-        entry-&gt;_private-&gt;_lastVisitWasHTTPNonGet = [method caseInsensitiveCompare:@&quot;GET&quot;] &amp;&amp; (![[url scheme] caseInsensitiveCompare:@&quot;http&quot;] || ![[url scheme] caseInsensitiveCompare:@&quot;https&quot;]);
-
</del><span class="cx">     item-&gt;setRedirectURLs(nullptr);
</span><span class="cx"> 
</span><span class="cx">     NSArray *entries = [[NSArray alloc] initWithObjects:entry, nil];
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryInternal.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryInternal.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryInternal.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -33,6 +33,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @interface WebHistory (WebInternal)
</span><del>-- (void)_visitedURL:(NSURL *)URL withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure increaseVisitCount:(BOOL)increaseVisitCount;
</del><ins>+- (void)_visitedURL:(NSURL *)URL withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure;
</ins><span class="cx"> - (void)_addVisitedLinksToPageGroup:(WebCore::PageGroup&amp;)group;
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItem.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItem.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryItem.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -79,15 +79,11 @@
</span><span class="cx"> // Private keys used in the WebHistoryItem's dictionary representation.
</span><span class="cx"> // see 3245793 for explanation of &quot;lastVisitedDate&quot;
</span><span class="cx"> static NSString *lastVisitedTimeIntervalKey = @&quot;lastVisitedDate&quot;;
</span><del>-static NSString *visitCountKey = @&quot;visitCount&quot;;
</del><span class="cx"> static NSString *titleKey = @&quot;title&quot;;
</span><span class="cx"> static NSString *childrenKey = @&quot;children&quot;;
</span><span class="cx"> static NSString *displayTitleKey = @&quot;displayTitle&quot;;
</span><span class="cx"> static NSString *lastVisitWasFailureKey = @&quot;lastVisitWasFailure&quot;;
</span><del>-static NSString *lastVisitWasHTTPNonGetKey = @&quot;lastVisitWasHTTPNonGet&quot;;
</del><span class="cx"> static NSString *redirectURLsKey = @&quot;redirectURLs&quot;;
</span><del>-static NSString *dailyVisitCountKey = @&quot;D&quot;; // short key to save space
-static NSString *weeklyVisitCountKey = @&quot;W&quot;; // short key to save space
</del><span class="cx"> 
</span><span class="cx"> // Notification strings.
</span><span class="cx"> NSString *WebHistoryItemChangedNotification = @&quot;WebHistoryItemChangedNotification&quot;;
</span><span class="lines">@@ -177,12 +173,7 @@
</span><span class="cx">     WebHistoryItem *copy = [[[self class] alloc] initWithWebCoreHistoryItem:core(_private)-&gt;copy()];
</span><span class="cx"> 
</span><span class="cx">     copy-&gt;_private-&gt;_lastVisitedTime = _private-&gt;_lastVisitedTime;
</span><del>-    copy-&gt;_private-&gt;_visitCount = _private-&gt;_visitCount;
-    copy-&gt;_private-&gt;_dailyVisitCounts = _private-&gt;_dailyVisitCounts;
-    copy-&gt;_private-&gt;_weeklyVisitCounts = _private-&gt;_weeklyVisitCounts;
</del><span class="cx"> 
</span><del>-    copy-&gt;_private-&gt;_lastVisitWasHTTPNonGet = _private-&gt;_lastVisitWasHTTPNonGet;
-
</del><span class="cx">     historyItemWrappers().set(core(copy-&gt;_private), copy);
</span><span class="cx"> 
</span><span class="cx">     return copy;
</span><span class="lines">@@ -347,27 +338,11 @@
</span><span class="cx">     core(_private)-&gt;setTitle(title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)setVisitCount:(int)count
-{
-    _private-&gt;_visitCount = count;
-}
-
</del><span class="cx"> - (void)setViewState:(id)statePList
</span><span class="cx"> {
</span><span class="cx">     core(_private)-&gt;setViewState(statePList);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_mergeAutoCompleteHints:(WebHistoryItem *)otherItem
-{
-    ASSERT_ARG(otherItem, otherItem);
-
-    // FIXME: this is broken - we should be merging the daily counts
-    // somehow.  but this is to support API that's not really used in
-    // practice so leave it broken for now.
-    if (otherItem != self)
-        _private-&gt;_visitCount += otherItem-&gt;_private-&gt;_visitCount;
-}
-
</del><span class="cx"> - (id)initFromDictionaryRepresentation:(NSDictionary *)dict
</span><span class="cx"> {
</span><span class="cx">     ASSERT_MAIN_THREAD();
</span><span class="lines">@@ -391,23 +366,9 @@
</span><span class="cx">         core(_private)-&gt;setOriginalURLString(newURLString);
</span><span class="cx">     } 
</span><span class="cx"> 
</span><del>-    int visitCount = [dict _webkit_intForKey:visitCountKey];
-    
-    // Can't trust data on disk, and we've had at least one report of this (&lt;rdar://6572300&gt;).
-    if (visitCount &lt; 0) {
-        LOG_ERROR(&quot;visit count for history item \&quot;%@\&quot; is negative (%d), will be reset to 1&quot;, URLString, visitCount);
-        visitCount = 1;
-    }
-    _private-&gt;_visitCount = visitCount;
-
</del><span class="cx">     if ([dict _webkit_boolForKey:lastVisitWasFailureKey])
</span><span class="cx">         core(_private)-&gt;setLastVisitWasFailure(true);
</span><span class="cx">     
</span><del>-    BOOL lastVisitWasHTTPNonGet = [dict _webkit_boolForKey:lastVisitWasHTTPNonGetKey];
-    NSString *tempURLString = [URLString lowercaseString];
-    if (lastVisitWasHTTPNonGet &amp;&amp; ([tempURLString hasPrefix:@&quot;http:&quot;] || [tempURLString hasPrefix:@&quot;https:&quot;]))
-        _private-&gt;_lastVisitWasHTTPNonGet = lastVisitWasHTTPNonGet;
-
</del><span class="cx">     if (NSArray *redirectURLs = [dict _webkit_arrayForKey:redirectURLsKey]) {
</span><span class="cx">         NSUInteger size = [redirectURLs count];
</span><span class="cx">         auto redirectURLsVector = std::make_unique&lt;Vector&lt;String&gt;&gt;(size);
</span><span class="lines">@@ -416,22 +377,6 @@
</span><span class="cx">         core(_private)-&gt;setRedirectURLs(std::move(redirectURLsVector));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    NSArray *dailyCounts = [dict _webkit_arrayForKey:dailyVisitCountKey];
-    NSArray *weeklyCounts = [dict _webkit_arrayForKey:weeklyVisitCountKey];
-    if (dailyCounts || weeklyCounts) {
-        Vector&lt;int&gt; coreDailyCounts([dailyCounts count]);
-        Vector&lt;int&gt; coreWeeklyCounts([weeklyCounts count]);
-
-        // Daily and weekly counts &lt; 0 are errors in the data read from disk, so reset to 0.
-        for (size_t i = 0; i &lt; coreDailyCounts.size(); ++i)
-            coreDailyCounts[i] = std::max([[dailyCounts _webkit_numberAtIndex:i] intValue], 0);
-        for (size_t i = 0; i &lt; coreWeeklyCounts.size(); ++i)
-            coreWeeklyCounts[i] = std::max([[weeklyCounts _webkit_numberAtIndex:i] intValue], 0);
-
-        _private-&gt;_dailyVisitCounts = std::move(coreDailyCounts);
-        _private-&gt;_weeklyVisitCounts = std::move(coreWeeklyCounts);
-    }
-
</del><span class="cx">     NSArray *childDicts = [dict objectForKey:childrenKey];
</span><span class="cx">     if (childDicts) {
</span><span class="cx">         for (int i = [childDicts count] - 1; i &gt;= 0; i--) {
</span><span class="lines">@@ -473,72 +418,12 @@
</span><span class="cx">     return core(_private)-&gt;scrollPoint();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_visitedWithTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount
</del><ins>+- (void)_visitedWithTitle:(NSString *)title
</ins><span class="cx"> {
</span><span class="cx">     core(_private)-&gt;setTitle(title);
</span><del>-
-    [self _recordVisitAtTime:[NSDate timeIntervalSinceReferenceDate] increaseVisitCount:increaseVisitCount];
</del><ins>+    _private-&gt;_lastVisitedTime = [NSDate timeIntervalSinceReferenceDate];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_recordInitialVisit
-{
-    ASSERT(!_private-&gt;_visitCount);
-    [self _recordVisitAtTime:_private-&gt;_lastVisitedTime increaseVisitCount:YES];
-}
-
-static inline int timeToDay(double time)
-{
-    return static_cast&lt;int&gt;(ceil(time / secondsPerDay));
-}
-
-- (void)_padDailyCountsForNewVisit:(NSTimeInterval)time
-{
-    if (_private-&gt;_dailyVisitCounts.isEmpty())
-        _private-&gt;_dailyVisitCounts.insert(0, _private-&gt;_visitCount);
-
-    int daysElapsed = timeToDay(time) - timeToDay(_private-&gt;_lastVisitedTime);
-
-    if (daysElapsed &lt; 0)
-        daysElapsed = 0;
-
-    Vector&lt;int, 32&gt; padding;
-    padding.fill(0, daysElapsed);
-
-    _private-&gt;_dailyVisitCounts.insertVector(0, padding);
-}
-
-static const size_t daysPerWeek = 7;
-static const size_t maxDailyCounts = 2 * daysPerWeek - 1;
-static const size_t maxWeeklyCounts = 5;
-
-- (void)_collapseDailyVisitsToWeekly
-{
-    while (_private-&gt;_dailyVisitCounts.size() &gt; maxDailyCounts) {
-        int oldestWeekTotal = 0;
-        for (size_t i = 0; i &lt; daysPerWeek; i++)
-            oldestWeekTotal += _private-&gt;_dailyVisitCounts[_private-&gt;_dailyVisitCounts.size() - daysPerWeek + i];
-        _private-&gt;_dailyVisitCounts.shrink(_private-&gt;_dailyVisitCounts.size() - daysPerWeek);
-        _private-&gt;_weeklyVisitCounts.insert(0, oldestWeekTotal);
-    }
-
-    if (_private-&gt;_weeklyVisitCounts.size() &gt; maxWeeklyCounts)
-        _private-&gt;_weeklyVisitCounts.shrink(maxWeeklyCounts);
-}
-
-- (void)_recordVisitAtTime:(NSTimeInterval)time increaseVisitCount:(BOOL)increaseVisitCount
-{
-    [self _padDailyCountsForNewVisit:time];
-
-    _private-&gt;_lastVisitedTime = time;
-
-    if (increaseVisitCount) {
-        ++_private-&gt;_visitCount;
-        ++_private-&gt;_dailyVisitCounts[0];
-    }
-
-    [self _collapseDailyVisitsToWeekly];
-}
-
</del><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @implementation WebHistoryItem (WebPrivate)
</span><span class="lines">@@ -548,14 +433,6 @@
</span><span class="cx">     return [self initWithURLString:[URL _web_originalDataAsString] title:title lastVisitedTimeInterval:0];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// This should not be called directly for WebHistoryItems that are already included
-// in WebHistory. Use -[WebHistory setLastVisitedTimeInterval:forItem:] instead.
-- (void)_setLastVisitedTimeInterval:(NSTimeInterval)time
-{
-    if (_private-&gt;_lastVisitedTime != time)
-        [self _recordVisitAtTime:time increaseVisitCount:YES];
-}
-
</del><span class="cx"> // FIXME: The only iOS difference here should be whether YES or NO is passed to dictionaryRepresentationIncludingChildren:
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> - (NSDictionary *)dictionaryRepresentation
</span><span class="lines">@@ -584,14 +461,8 @@
</span><span class="cx">         [dict setObject:[NSString stringWithFormat:@&quot;%.1lf&quot;, _private-&gt;_lastVisitedTime]
</span><span class="cx">                  forKey:lastVisitedTimeIntervalKey];
</span><span class="cx">     }
</span><del>-    if (_private-&gt;_visitCount)
-        [dict setObject:[NSNumber numberWithInt:_private-&gt;_visitCount] forKey:visitCountKey];
</del><span class="cx">     if (coreItem-&gt;lastVisitWasFailure())
</span><span class="cx">         [dict setObject:[NSNumber numberWithBool:YES] forKey:lastVisitWasFailureKey];
</span><del>-    if (_private-&gt;_lastVisitWasHTTPNonGet) {
-        ASSERT(coreItem-&gt;urlString().startsWith(&quot;http:&quot;, false) || coreItem-&gt;urlString().startsWith(&quot;https:&quot;, false));
-        [dict setObject:[NSNumber numberWithBool:YES] forKey:lastVisitWasHTTPNonGetKey];
-    }
</del><span class="cx">     if (Vector&lt;String&gt;* redirectURLs = coreItem-&gt;redirectURLs()) {
</span><span class="cx">         size_t size = redirectURLs-&gt;size();
</span><span class="cx">         ASSERT(size);
</span><span class="lines">@@ -602,24 +473,6 @@
</span><span class="cx">         [result release];
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    const Vector&lt;int&gt;&amp; dailyVisitCounts = _private-&gt;_dailyVisitCounts;
-    if (dailyVisitCounts.size()) {
-        NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:13];
-        for (size_t i = 0; i &lt; dailyVisitCounts.size(); ++i)
-            [array addObject:[NSNumber numberWithInt:dailyVisitCounts[i]]];
-        [dict setObject:array forKey:dailyVisitCountKey];
-        [array release];
-    }
-    
-    const Vector&lt;int&gt;&amp; weeklyVisitCounts = _private-&gt;_weeklyVisitCounts;
-    if (weeklyVisitCounts.size()) {
-        NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:5];
-        for (size_t i = 0; i &lt; weeklyVisitCounts.size(); ++i)
-            [array addObject:[NSNumber numberWithInt:weeklyVisitCounts[i]]];
-        [dict setObject:array forKey:weeklyVisitCountKey];
-        [array release];
-    }    
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     if (includesChildren &amp;&amp; coreItem-&gt;children().size()) {
</span><span class="cx"> #else
</span><span class="lines">@@ -668,12 +521,6 @@
</span><span class="cx">     return core(_private)-&gt;isTargetItem();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (int)visitCount
-{
-    ASSERT_MAIN_THREAD();
-    return _private-&gt;_visitCount;
-}
-
</del><span class="cx"> - (NSString *)RSSFeedReferrer
</span><span class="cx"> {
</span><span class="cx">     return nsStringNilIfEmpty(core(_private)-&gt;referrer());
</span><span class="lines">@@ -741,16 +588,6 @@
</span><span class="cx">     return core(_private)-&gt;lastVisitWasFailure();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_setLastVisitWasFailure:(BOOL)failure
-{
-    core(_private)-&gt;setLastVisitWasFailure(failure);
-}
-
-- (BOOL)_lastVisitWasHTTPNonGet
-{
-    return _private-&gt;_lastVisitWasHTTPNonGet;
-}
-
</del><span class="cx"> - (NSArray *)_redirectURLs
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;String&gt;* redirectURLs = core(_private)-&gt;redirectURLs();
</span><span class="lines">@@ -765,18 +602,6 @@
</span><span class="cx">     return [result autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (size_t)_getDailyVisitCounts:(const int**)counts
-{
-    *counts = _private-&gt;_dailyVisitCounts.data();
-    return _private-&gt;_dailyVisitCounts.size();
-}
-
-- (size_t)_getWeeklyVisitCounts:(const int**)counts
-{
-    *counts = _private-&gt;_weeklyVisitCounts.data();
-    return _private-&gt;_weeklyVisitCounts.size();
-}
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> - (void)_setScale:(float)scale isInitial:(BOOL)aFlag
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -49,10 +49,8 @@
</span><span class="cx"> - (id)initFromDictionaryRepresentation:(NSDictionary *)dict;
</span><span class="cx"> - (id)initWithWebCoreHistoryItem:(PassRefPtr&lt;WebCore::HistoryItem&gt;)item;
</span><span class="cx"> 
</span><del>-- (void)_mergeAutoCompleteHints:(WebHistoryItem *)otherItem;
</del><span class="cx"> - (void)setTitle:(NSString *)title;
</span><del>-- (void)_visitedWithTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount;
-- (void)_recordInitialVisit;
</del><ins>+- (void)_visitedWithTitle:(NSString *)title;
</ins><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><span class="lines">@@ -65,10 +63,5 @@
</span><span class="cx">     RefPtr&lt;WebCore::HistoryItem&gt; _historyItem;
</span><span class="cx"> 
</span><span class="cx">     NSTimeInterval _lastVisitedTime;
</span><del>-    int _visitCount;
-    Vector&lt;int&gt; _dailyVisitCounts;
-    Vector&lt;int&gt; _weeklyVisitCounts;
-
-    bool _lastVisitWasHTTPNonGet;
</del><span class="cx"> }
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -49,12 +49,8 @@
</span><span class="cx"> - (id)initWithURL:(NSURL *)URL title:(NSString *)title;
</span><span class="cx"> 
</span><span class="cx"> - (NSURL *)URL;
</span><del>-- (int)visitCount;
</del><span class="cx"> - (BOOL)lastVisitWasFailure;
</span><del>-- (void)_setLastVisitWasFailure:(BOOL)failure;
</del><span class="cx"> 
</span><del>-- (BOOL)_lastVisitWasHTTPNonGet;
-
</del><span class="cx"> - (NSString *)RSSFeedReferrer;
</span><span class="cx"> - (void)setRSSFeedReferrer:(NSString *)referrer;
</span><span class="cx"> 
</span><span class="lines">@@ -69,17 +65,11 @@
</span><span class="cx"> - (NSDictionary *)dictionaryRepresentationIncludingChildren:(BOOL)includesChildren;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-// This should not be called directly for WebHistoryItems that are already included
-// in WebHistory. Use -[WebHistory setLastVisitedTimeInterval:forItem:] instead.
-- (void)_setLastVisitedTimeInterval:(NSTimeInterval)time;
</del><span class="cx"> // Transient properties may be of any ObjC type.  They are intended to be used to store state per back/forward list entry.
</span><span class="cx"> // The properties will not be persisted; when the history item is removed, the properties will be lost.
</span><span class="cx"> - (id)_transientPropertyForKey:(NSString *)key;
</span><span class="cx"> - (void)_setTransientProperty:(id)property forKey:(NSString *)key;
</span><span class="cx"> 
</span><del>-- (size_t)_getDailyVisitCounts:(const int**)counts;
-- (size_t)_getWeeklyVisitCounts:(const int**)counts;
-
</del><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> - (void)_setScale:(float)scale isInitial:(BOOL)aFlag;
</span><span class="cx"> - (float)_scale;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -1017,11 +1017,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    [[WebHistory optionalSharedHistory] _visitedURL:loader-&gt;urlForHistory() 
-                                          withTitle:loader-&gt;title().string()
-                                             method:loader-&gt;originalRequestCopy().httpMethod()
-                                         wasFailure:loader-&gt;urlForHistoryReflectsFailure()
-                                 increaseVisitCount:!loader-&gt;clientRedirectSourceForHistory()]; // Do not increase visit count due to navigations that were not initiated by the user directly, avoiding growth from programmatic reloads.
</del><ins>+    [[WebHistory optionalSharedHistory] _visitedURL:loader-&gt;urlForHistory() withTitle:loader-&gt;title().string() method:loader-&gt;originalRequestCopy().httpMethod() wasFailure:loader-&gt;urlForHistoryReflectsFailure()];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
</span></span></pre>
</div>
</div>

</body>
</html>